2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.5 1995-09-11 13:09:34 adam
8 * More work on relevance feedback.
10 * Revision 1.4 1995/09/08 14:52:27 adam
11 * Minor changes. Dictionary is lower case now.
13 * Revision 1.3 1995/09/07 13:58:36 adam
14 * New parameter: result-set file descriptor (RSFD) to support multiple
15 * positions within the same result-set.
16 * Boolean operators: and, or, not implemented.
17 * Result-set references.
19 * Revision 1.2 1995/09/06 16:11:17 adam
20 * Option: only one word key per file.
22 * Revision 1.1 1995/09/04 09:10:36 adam
23 * More work on index add/del/update.
24 * Merge sort implemented.
25 * Initial work on z39 server.
37 void key_logdump (int logmask, const void *p)
41 memcpy (&key, p, sizeof(key));
43 logf (logmask, "%7d s=%-3d", key.sysno, key.seqno);
45 logf (logmask, "%7d f=%-3d", key.sysno, key.freq);
49 int key_compare (const void *p1, const void *p2)
52 memcpy (&i1, p1, sizeof(i1));
53 memcpy (&i2, p2, sizeof(i2));
54 if (i1.sysno != i2.sysno)
56 if (i1.sysno > i2.sysno)
62 if (i1.seqno != i2.seqno)
64 if (i1.seqno > i2.seqno)
70 if (i1.freq != i2.freq)
72 if (i1.freq > i2.freq)
79 if (i1.field != i2.field)
81 if (i1.field > i2.field)
90 int index_char_cvt (int c)