2 * Copyright (C) 1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.1 1995-09-04 09:10:36 adam
8 * More work on index add/del/update.
9 * Merge sort implemented.
10 * Initial work on z39 server.
21 int key_compare (const void *p1, const void *p2)
24 memcpy (&i1, p1, sizeof(i1));
25 memcpy (&i2, p2, sizeof(i2));
26 if ( i1.sysno != i2.sysno)
27 return i1.sysno - i2.sysno;
28 if ( i1.seqno != i2.seqno)
29 return i1.seqno - i2.seqno;
30 return i1.field - i2.field;
33 int key_compare_x (const struct it_key *i1, const struct it_key *i2)
35 if ( i1->sysno != i2->sysno)
36 return i1->sysno - i2->sysno;
37 if ( i1->seqno != i2->seqno)
38 return i1->seqno - i2->seqno;
39 return i1->field - i2->field;