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