X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isam%2Fisutil.c;fp=isam%2Fisutil.c;h=aae8c3e80a65f8fac48963f64d37a959544a86cc;hb=2fdd6275d8becc9c2317bd2b23daa3c569926392;hp=0000000000000000000000000000000000000000;hpb=b6918ef00ac2a731bb22b68e08b2df3b670ec589;p=idzebra-moved-to-github.git diff --git a/isam/isutil.c b/isam/isutil.c new file mode 100644 index 0000000..aae8c3e --- /dev/null +++ b/isam/isutil.c @@ -0,0 +1,45 @@ +/* + * Copyright (C) 1994, Index Data I/S + * All rights reserved. + * Sebastian Hammer, Adam Dickmeiss + * + * $Log: isutil.c,v $ + * Revision 1.1 1994-09-12 08:02:13 quinn + * Not functional yet + * + */ + +/* + * Small utilities needed by the isam system. Some or all of these + * may move to util/ along the way. + */ + +#include +#include + +#include +#include "isutil.h" + +char *strconcat(const char *s1, ...) +{ + va_list ap; + static char buf[512]; + char *p; + + va_start(ap, s1); + strcpy(buf, s1); + while ((p = va_arg(ap, char *))) + strcat(buf, p); + va_end(ap); + + return buf; +} + +int is_default_cmp(const void *k1, const void *k2) +{ + SYSNO b1, b2; + + memcpy(&b1, k1, sizeof(b1)); + memcpy(&b2, k2, sizeof(b2)); + return b1 - b2; +}