Do not warn about empty records unless they are marked as new.
[idzebra-moved-to-github.git] / recctrl / safari.c
index f3a55b1..6a1c585 100644 (file)
@@ -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.5 2005-03-09 13:45:29 adam Exp $
+   Copyright (C) 1995-2005
+   Index Data ApS
 
 This file is part of the Zebra server.
 
@@ -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);