Various cleanup. YAZ util used instead.
[idzebra-moved-to-github.git] / isam / isutil.c
1 /*
2  * Copyright (C) 1994, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: isutil.c,v $
7  * Revision 1.2  1995-09-04 12:33:46  adam
8  * Various cleanup. YAZ util used instead.
9  *
10  * Revision 1.1  1994/09/12  08:02:13  quinn
11  * Not functional yet
12  *
13  */
14
15 /*
16  * Small utilities needed by the isam system. Some or all of these
17  * may move to util/ along the way.
18  */
19
20 #include <stdio.h>
21 #include <string.h>
22 #include <stdarg.h>
23
24 #include <isam.h>
25 #include "isutil.h"
26
27 char *strconcat(const char *s1, ...)
28 {
29     va_list ap;
30     static char buf[512];
31     char *p;
32
33     va_start(ap, s1);
34     strcpy(buf, s1);
35     while ((p = va_arg(ap, char *)))
36         strcat(buf, p);
37     va_end(ap);
38     
39     return buf;
40 }
41
42 int is_default_cmp(const void *k1, const void *k2)
43 {
44     SYSNO b1, b2;
45
46     memcpy(&b1, k1, sizeof(b1));
47     memcpy(&b2, k2, sizeof(b2));
48     return b1 - b2;
49 }