projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added include stdlib.h a few places to get prototype for atoi/exit/..
[idzebra-moved-to-github.git]
/
rset
/
rsprox.c
diff --git
a/rset/rsprox.c
b/rset/rsprox.c
index
d24d2ef
..
6c5856d
100644
(file)
--- a/
rset/rsprox.c
+++ b/
rset/rsprox.c
@@
-1,6
+1,6
@@
-/* $Id: rsprox.c,v 1.20 2004-10-22 10:12:52 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
- Index Data Aps
+/* $Id: rsprox.c,v 1.23 2005-01-15 19:38:35 adam Exp $
+ Copyright (C) 1995-2005
+ Index Data ApS
This file is part of the Zebra server.
This file is part of the Zebra server.
@@
-114,7
+114,7
@@
static RSFD r_open (RSET ct, int flag)
if (flag & RSETF_WRITE)
{
if (flag & RSETF_WRITE)
{
- logf (LOG_FATAL, "prox set type is read-only");
+ yaz_log (YLOG_FATAL, "prox set type is read-only");
return NULL;
}
rfd = rfd_create_base(ct);
return NULL;
}
rfd = rfd_create_base(ct);
@@
-133,7
+133,7
@@
static RSFD r_open (RSET ct, int flag)
}
p->rfd = nmem_malloc(ct->nmem,sizeof(*p->rfd) * info->rset_no);
}
}
p->rfd = nmem_malloc(ct->nmem,sizeof(*p->rfd) * info->rset_no);
}
- logf(LOG_DEBUG,"rsprox (%s) open [%p] n=%d",
+ yaz_log(YLOG_DEBUG,"rsprox (%s) open [%p] n=%d",
ct->control->desc, rfd, info->rset_no);
for (i = 0; i < info->rset_no; i++) {
ct->control->desc, rfd, info->rset_no);
for (i = 0; i < info->rset_no; i++) {
@@
-302,7
+302,7
@@
static int r_read (RSFD rfd, void *buf, TERMID *term)
static int r_write (RSFD rfd, const void *buf)
{
static int r_write (RSFD rfd, const void *buf)
{
- logf (LOG_FATAL, "prox set type is read-only");
+ yaz_log (YLOG_FATAL, "prox set type is read-only");
return -1;
}
return -1;
}
@@
-311,11
+311,11
@@
static void r_pos (RSFD rfd, double *current, double *total)
struct rset_prox_info *info = (struct rset_prox_info *)(rfd->rset->priv);
struct rset_prox_rfd *p=(struct rset_prox_rfd *)(rfd->priv);
int i;
struct rset_prox_info *info = (struct rset_prox_info *)(rfd->rset->priv);
struct rset_prox_rfd *p=(struct rset_prox_rfd *)(rfd->priv);
int i;
- double cur,tot=-1;
- double scur=0,stot=0;
- double r;
+ double r = 0.0;
+ double cur, tot = -1.0;
+ double scur = 0.0, stot = 0.0;
- logf (LOG_DEBUG, "rsprox_pos");
+ yaz_log (YLOG_DEBUG, "rsprox_pos");
for (i = 0; i < info->rset_no; i++)
{
for (i = 0; i < info->rset_no; i++)
{
@@
-336,7
+336,7
@@
static void r_pos (RSFD rfd, double *current, double *total)
*current=p->hits;
*total=*current/r ;
}
*current=p->hits;
*total=*current/r ;
}
- logf(LOG_DEBUG,"prox_pos: [%d] %0.1f/%0.1f= %0.4f ",
+ yaz_log(YLOG_DEBUG,"prox_pos: [%d] %0.1f/%0.1f= %0.4f ",
i,*current, *total, r);
}
i,*current, *total, r);
}