-/* $Id: tstisamb.c,v 1.25 2006-10-30 16:21:29 adam Exp $
- Copyright (C) 1995-2006
- Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+ Copyright (C) 1995-2008 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
*/
+#if HAVE_SYS_TIMES_H
+#include <sys/times.h>
+#endif
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
#include <stdlib.h>
#include <string.h>
#include <yaz/log.h>
#include <idzebra/isamb.h>
#include <assert.h>
+static int log_level = 0;
+
static void log_item(int level, const void *b, const char *txt)
{
int x;
memcpy(&x, b, sizeof(int));
- yaz_log(YLOG_DEBUG, "%s %d", txt, x);
+ yaz_log(log_level, "%s %d", txt, x);
}
static void log_pr(const char *txt)
{
- yaz_log(YLOG_DEBUG, "%s", txt);
+ yaz_log(log_level, "%s", txt);
}
int compare_item(const void *a, const void *b)
ri->val = ri->val + ri->step;
*insertMode = ri->insertMode;
-#if 1
- yaz_log(YLOG_DEBUG, "%d %5d", ri->insertMode, x);
+#if 0
+ yaz_log(log_level, "%d %5d", ri->insertMode, x);
#endif
return 1;
}
nerrs++;
}
else if (nerrs)
- yaz_log(YLOG_LOG, "isamb_pp_read. n=%d Got %d",
+ yaz_log(log_level, "isamb_pp_read. n=%d Got %d",
n, x);
ri.val++;
yaz_log(YLOG_WARN, "isamb_open failed");
exit(2);
}
-#if 1
tst_insert(isb, 1);
tst_insert(isb, 2);
tst_insert(isb, 20);
tst_x(isb);
tst_append(isb, 1000);
-#endif
if (0)
identical_keys_tests(isb);