Include of zebrautl.h instead of alexutil.h.
[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.3  1996-10-29 13:56:55  adam
8  * Include of zebrautl.h instead of alexutil.h.
9  *
10  * Revision 1.2  1995/09/04 12:33:46  adam
11  * Various cleanup. YAZ util used instead.
12  *
13  * Revision 1.1  1994/09/12  08:02:13  quinn
14  * Not functional yet
15  *
16  */
17
18 /*
19  * Small utilities needed by the isam system. Some or all of these
20  * may move to util/ along the way.
21  */
22
23 #include <stdio.h>
24 #include <string.h>
25 #include <stdarg.h>
26
27 #include <isam.h>
28 #include "isutil.h"
29
30 char *strconcat(const char *s1, ...)
31 {
32     va_list ap;
33     static char buf[512];
34     char *p;
35
36     va_start(ap, s1);
37     strcpy(buf, s1);
38     while ((p = va_arg(ap, char *)))
39         strcat(buf, p);
40     va_end(ap);
41     
42     return buf;
43 }
44
45 int is_default_cmp(const void *k1, const void *k2)
46 {
47     int b1, b2;
48
49     memcpy(&b1, k1, sizeof(b1));
50     memcpy(&b2, k2, sizeof(b2));
51     return b1 - b2;
52 }