/*
- * Copyright (C) 1995, Index Data I/S
+ * Copyright (C) 1994-1995, Index Data I/S
* All rights reserved.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: kdump.c,v $
- * Revision 1.1 1995-09-04 09:10:36 adam
+ * Revision 1.4 1995-09-08 14:52:27 adam
+ * Minor changes. Dictionary is lower case now.
+ *
+ * Revision 1.3 1995/09/06 16:11:17 adam
+ * Option: only one word key per file.
+ *
+ * Revision 1.2 1995/09/04 12:33:42 adam
+ * Various cleanup. YAZ util used instead.
+ *
+ * Revision 1.1 1995/09/04 09:10:36 adam
* More work on index add/del/update.
* Merge sort implemented.
* Initial work on z39 server.
#include <assert.h>
#include <unistd.h>
-#include <util.h>
+#include <alexutil.h>
#include "index.h"
char *prog;
int ret;
char *arg;
char *key_fname = NULL;
- char key_string[1000];
+ char key_string[IT_MAX_WORD];
char key_info[256];
FILE *inf;
}
else
{
- log (LOG_FATAL, "Unknown option '-%s'", arg);
+ logf (LOG_FATAL, "Unknown option '-%s'", arg);
exit (1);
}
}
}
if (!(inf = fopen (key_fname, "r")))
{
- log (LOG_FATAL|LOG_ERRNO, "fopen %s", key_fname);
+ logf (LOG_FATAL|LOG_ERRNO, "fopen %s", key_fname);
exit (1);
}
while (read_one (inf, key_string, key_info))
struct it_key k;
memcpy (&k, key_info+1, sizeof(k));
- printf ("%s sysno=%d op=%d\n", key_string, k.sysno, *key_info);
+ printf ("%7d op=%d s=%-3d %s\n", k.sysno, *key_info, k.seqno,
+ key_string);
}
if (fclose (inf))
{
- log (LOG_FATAL|LOG_ERRNO, "fclose %s", key_fname);
+ logf (LOG_FATAL|LOG_ERRNO, "fclose %s", key_fname);
exit (1);
}