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
Moved zebrautl.h to idzebra/util.h.
[idzebra-moved-to-github.git]
/
recctrl
/
safari.c
diff --git
a/recctrl/safari.c
b/recctrl/safari.c
index
a21179f
..
a3a98cb
100644
(file)
--- a/
recctrl/safari.c
+++ b/
recctrl/safari.c
@@
-1,6
+1,6
@@
-/* $Id: safari.c,v 1.1 2004-11-29 21:55:28 adam Exp $
- Copyright (C) 2004
- Index Data Aps
+/* $Id: safari.c,v 1.6 2005-03-30 09:25:24 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.
@@
-25,7
+25,7
@@
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include <assert.h>
#include <ctype.h>
#include <assert.h>
#include <ctype.h>
-#include <zebrautl.h>
+#include <idzebra/util.h>
#include <idzebra/recctrl.h>
struct safari_info {
#include <idzebra/recctrl.h>
struct safari_info {
@@
-129,8
+129,10
@@
static int safari_extract(void *clientData, struct recExtractCtrl *p)
int nor = 0;
char field[40];
char *cp;
int nor = 0;
char field[40];
char *cp;
+#if 0
yaz_log(YLOG_LOG, "safari line: %s", line);
yaz_log(YLOG_LOG, "safari line: %s", line);
- if (sscanf(line, "%lld %lld %lld %39s %n",
+#endif
+ if (sscanf(line, ZINT_FORMAT " " ZINT_FORMAT " " ZINT_FORMAT " %39s %n",
&recWord.record_id, &recWord.section_id, &recWord.seqno,
field, &nor) < 4)
{
&recWord.record_id, &recWord.section_id, &recWord.seqno,
field, &nor) < 4)
{
@@
-139,8
+141,9
@@
static int safari_extract(void *clientData, struct recExtractCtrl *p)
}
for (cp = line + nor; *cp == ' '; cp++)
;
}
for (cp = line + nor; *cp == ' '; cp++)
;
- recWord.string = cp;
- recWord.length = strlen(cp);
+ recWord.attrStr = field;
+ recWord.term_buf = cp;
+ recWord.term_len = strlen(cp);
(*p->tokenAdd)(&recWord);
}
fi_close(fi);
(*p->tokenAdd)(&recWord);
}
fi_close(fi);