X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=index%2Fkdump.c;h=6d78d7040c7f550d6aae38afc82554ad0c765ce6;hp=0e2fc2d25b0fd1b54c613abfa181a65d9cb6237c;hb=2e4e9c6def27f1e1463dcb6f205fab6a98054f38;hpb=2b1851bd5565e3d21f9cf9a37661a584c063b75f diff --git a/index/kdump.c b/index/kdump.c index 0e2fc2d..6d78d70 100644 --- a/index/kdump.c +++ b/index/kdump.c @@ -1,77 +1,25 @@ -/* - * Copyright (C) 1994-1999, Index Data - * All rights reserved. - * Sebastian Hammer, Adam Dickmeiss - * - * $Log: kdump.c,v $ - * Revision 1.20 2002-04-04 14:14:13 adam - * Multiple registers (alpha early) - * - * Revision 1.19 2000/12/05 10:01:44 adam - * Fixed bug regarding user-defined attribute sets. - * - * Revision 1.18 1999/09/07 07:19:21 adam - * Work on character mapping. Implemented replace rules. - * - * Revision 1.17 1999/02/02 14:50:55 adam - * Updated WIN32 code specific sections. Changed header. - * - * Revision 1.16 1998/05/20 10:12:17 adam - * Implemented automatic EXPLAIN database maintenance. - * Modified Zebra to work with ASN.1 compiled version of YAZ. - * - * Revision 1.15 1998/03/05 08:45:12 adam - * New result set model and modular ranking system. Moved towards - * descent server API. System information stored as "SGML" records. - * - * Revision 1.14 1997/10/27 14:33:04 adam - * Moved towards generic character mapping depending on "structure" - * field in abstract syntax file. Fixed a few memory leaks. Fixed - * bug with negative integers when doing searches with relational - * operators. - * - * Revision 1.13 1997/09/09 13:38:07 adam - * Partial port to WIN95/NT. - * - * Revision 1.12 1997/09/05 09:52:32 adam - * Extra argument added to function chr_read_maptab (tab path). - * - * Revision 1.11 1996/10/29 14:06:49 adam - * Include zebrautl.h instead of alexutil.h. - * - * Revision 1.10 1996/06/04 14:56:12 quinn - * Fix - * - * Revision 1.9 1996/06/04 14:18:53 quinn - * Charmap work - * - * Revision 1.8 1996/06/04 10:18:59 adam - * Minor changes - removed include of ctype.h. - * - * Revision 1.7 1995/10/10 12:24:38 adam - * Temporary sort files are compressed. - * - * Revision 1.6 1995/09/29 14:01:42 adam - * Bug fixes. - * - * Revision 1.5 1995/09/11 13:09:35 adam - * More work on relevance feedback. - * - * 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. - * - */ +/* $Id: kdump.c,v 1.25 2004-08-04 08:35:23 adam Exp $ + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 + Index Data Aps + +This file is part of the Zebra server. + +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 +Software Foundation; either version 2, or (at your option) any later +version. + +Zebra is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Zebra; see the file LICENSE.zebra. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. +*/ + #include #include #include @@ -87,7 +35,12 @@ char *prog; - +#if IT_KEY_NEW +int main(int argc, char **argv) +{ + exit(0); +} +#else int key_file_decode (FILE *f) { int c, d; @@ -110,6 +63,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; } @@ -145,6 +101,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; @@ -173,7 +130,7 @@ 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); exit (1); @@ -191,8 +148,8 @@ int main (int argc, char **argv) exit (1); } if (!res) - res = res_open ("zebra.cfg", 0); - zm = zebra_maps_open (res); + 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); @@ -232,6 +189,6 @@ int main (int argc, char **argv) logf (LOG_FATAL|LOG_ERRNO, "fclose %s", key_fname); exit (1); } - exit (0); } +#endif