X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fkdump.c;h=3ce82fd9d6cf4897e238fe3efb99e0245eb6b99b;hb=d8e960f5f1060148a5fffa7a767c72391662fbdc;hp=70662b93ee19a963b689515e126208ca26242922;hpb=896c0427df9d8eff5de6a1735dcd992e067df844;p=idzebra-moved-to-github.git diff --git a/index/kdump.c b/index/kdump.c index 70662b9..3ce82fd 100644 --- a/index/kdump.c +++ b/index/kdump.c @@ -1,6 +1,6 @@ -/* $Id: kdump.c,v 1.22 2002-08-02 19:26:55 adam Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 - Index Data Aps +/* $Id: kdump.c,v 1.28 2005-01-15 19:38:26 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS This file is part of the Zebra server. @@ -20,7 +20,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #include #include #include @@ -36,7 +35,13 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA char *prog; +int main(int argc, char **argv) +{ + exit(0); +} +#if 0 +/* old kdumper.. must be updated to use new codec .. */ int key_file_decode (FILE *f) { int c, d; @@ -59,6 +64,9 @@ int key_file_decode (FILE *f) d = (d << 8) + (getc (f) & 0xff); d = (d << 8) + (getc (f) & 0xff); break; + default: + d = 0; + assert (0); } return d; } @@ -94,6 +102,7 @@ static int read_one (FILE *inf, char *name, char *key, struct it_key *prevk) return 1; } + int main (int argc, char **argv) { int ret; @@ -122,15 +131,15 @@ int main (int argc, char **argv) } else if (ret == 'c') { - if (!(res = res_open (arg, 0))) + if (!(res = res_open (arg, 0, 0))) { - logf(LOG_FATAL, "Failed to open resource file %s", arg); + yaz_log(YLOG_FATAL, "Failed to open resource file %s", arg); exit (1); } } else { - logf (LOG_FATAL, "Unknown option '-%s'", arg); + yaz_log (YLOG_FATAL, "Unknown option '-%s'", arg); exit (1); } } @@ -140,11 +149,11 @@ int main (int argc, char **argv) exit (1); } if (!res) - res = res_open ("zebra.cfg", 0); + res = res_open ("zebra.cfg", 0, 0); zm = zebra_maps_open (res, 0); if (!(inf = fopen (key_fname, "r"))) { - logf (LOG_FATAL|LOG_ERRNO, "fopen %s", key_fname); + yaz_log (YLOG_FATAL|YLOG_ERRNO, "fopen %s", key_fname); exit (1); } printf ("t rg op sysno seqno txt\n"); @@ -178,9 +187,9 @@ int main (int argc, char **argv) zebra_maps_close (zm); if (fclose (inf)) { - logf (LOG_FATAL|LOG_ERRNO, "fclose %s", key_fname); + yaz_log (YLOG_FATAL|YLOG_ERRNO, "fclose %s", key_fname); exit (1); } - exit (0); } +#endif