X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=index%2Fkdump.c;h=a3d39018014eaf6347a7ac0de4a1248d0af53790;hb=1ccf2613ceef2359f589cb3dd7e72a899c618b2f;hp=3cff3d4b839b55e9550dd1011f6402f954c9222f;hpb=ce3907338568fce46c5751e7e1091a5ad1c8e291;p=idzebra-moved-to-github.git diff --git a/index/kdump.c b/index/kdump.c index 3cff3d4..a3d3901 100644 --- a/index/kdump.c +++ b/index/kdump.c @@ -1,10 +1,23 @@ /* - * Copyright (C) 1994-1996, Index Data I/S + * Copyright (C) 1994-1999, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: kdump.c,v $ - * Revision 1.15 1998-03-05 08:45:12 adam + * 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. * @@ -59,7 +72,7 @@ #include #include #include -#ifdef WINDOWS +#ifdef WIN32 #include #else #include @@ -153,7 +166,7 @@ int main (int argc, char **argv) } else if (ret == 'v') { - log_init (log_mask_str(arg), prog, NULL); + yaz_log_init (yaz_log_mask_str(arg), prog, NULL); } else if (ret == 'c') { @@ -182,6 +195,7 @@ int main (int argc, char **argv) logf (LOG_FATAL|LOG_ERRNO, "fopen %s", key_fname); exit (1); } + printf ("t rg op sysno seqno txt\n"); while (read_one (inf, key_string, key_info, &prevk)) { struct it_key k; @@ -199,8 +213,11 @@ int main (int argc, char **argv) while (*from) { const char *res = zebra_maps_output (zm, reg_type, &from); - while (*res) - *(to++) = *(res++); + if (!res) + *to++ = *from++; + else + while (*res) + *to++ = *res++; } *to = '\0'; printf ("%c %3d %c %7d %5d %s\n", reg_type, usedb_type, op ? 'i':'d',