X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fextract.c;h=7374470903e022c3dde100cc8ba47ddd526facf0;hb=eaa8c71186392f0d2a1ab714dc6f3f0a4da71d03;hp=a085d728215cdc2a36589fc4b5146c72277c063d;hpb=b9093505b17a074e79137ed64595c8269f77d330;p=idzebra-moved-to-github.git diff --git a/index/extract.c b/index/extract.c index a085d72..7374470 100644 --- a/index/extract.c +++ b/index/extract.c @@ -4,7 +4,13 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: extract.c,v $ - * Revision 1.75 1997-09-17 12:19:12 adam + * Revision 1.76 1997-10-27 14:33:04 adam + * Moved towards generic character mapping depending on "structure" + * field in abstract syntax file. Fixed a few memory leaks. Fixed + * bug with negative integers when doing searches with relational + * operators. + * + * Revision 1.75 1997/09/17 12:19:12 adam * Zebra version corresponds to YAZ version 1.4. * Changed Zebra server so that it doesn't depend on global common_resource. * @@ -525,7 +531,7 @@ static void wordInit (RecWord *p) { p->attrSet = 1; p->attrUse = 1016; - p->which = Word_String; + p->reg_type = 'w'; } struct recKeys { @@ -589,19 +595,9 @@ static void addRecordKey (const RecWord *p) memcpy (dst, &attrUse, sizeof(attrUse)); dst += sizeof(attrUse); } - switch (p->which) - { - case Word_String: - *dst++ = 'w'; - break; - case Word_Phrase: - *dst++ = 'p'; - break; - case Word_Numeric: - *dst++ = 'n'; - } - for (i = 0; p->u.string[i] && i < IT_MAX_WORD-3; i++) - *dst++ = p->u.string[i]; + *dst++ = p->reg_type; + for (i = 0; p->string[i] && i < IT_MAX_WORD-3; i++) + *dst++ = p->string[i]; *dst++ = '\0'; if (!diff) @@ -1002,7 +998,7 @@ static int recordExtract (SYSNO *sysno, const char *fname, extractCtrl.seekf = file_seek; extractCtrl.tellf = file_tell; extractCtrl.endf = file_end; - extractCtrl.map_chrs_input = map_chrs_input; + extractCtrl.zebra_maps = rGroup->zebra_maps; extractCtrl.flagShowRecords = rGroup->flagShowRecords; if (rGroup->flagShowRecords) printf ("File: %s %ld\n", fname, (long) recordOffset);