X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=recctrl%2Fsafari.c;h=a3a98cb8b0d7ecca8d1d765edc18ca03a341dd54;hb=deff57cfa9d9b39c4a4f1c9b82a64c6e61d821a4;hp=f3a55b1657347e0eafa922592876830cc017a7ee;hpb=a7138d8cfaa70cfe8d2e7ab4cc05cb5bbe7a7639;p=idzebra-moved-to-github.git diff --git a/recctrl/safari.c b/recctrl/safari.c index f3a55b1..a3a98cb 100644 --- a/recctrl/safari.c +++ b/recctrl/safari.c @@ -1,6 +1,6 @@ -/* $Id: safari.c,v 1.2 2005-01-02 23:03:58 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. @@ -25,7 +25,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include -#include +#include #include struct safari_info { @@ -129,7 +129,9 @@ static int safari_extract(void *clientData, struct recExtractCtrl *p) int nor = 0; char field[40]; char *cp; +#if 0 yaz_log(YLOG_LOG, "safari line: %s", line); +#endif if (sscanf(line, ZINT_FORMAT " " ZINT_FORMAT " " ZINT_FORMAT " %39s %n", &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++) ; - 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);