X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fmain.c;h=97ac380aa327d0d4e0a92ec9d8896c526d701470;hb=35590968609f84a4ac4f4965c7b359cf06640491;hp=bda4eab41cafcbd91329aa30b3eea38d1c004272;hpb=85a2a0b28cb516d28ac70b7824f2b7d4b07e56ae;p=idzebra-moved-to-github.git diff --git a/index/main.c b/index/main.c index bda4eab..97ac380 100644 --- a/index/main.c +++ b/index/main.c @@ -1,10 +1,21 @@ /* - * Copyright (C) 1994-1998, Index Data I/S + * Copyright (C) 1994-1998, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: main.c,v $ - * Revision 1.57 1998-05-20 10:12:18 adam + * Revision 1.60 1998-10-28 10:54:39 adam + * SDRKit integration. + * + * Revision 1.59 1998/10/16 08:14:32 adam + * Updated record control system. + * + * Revision 1.58 1998/06/08 14:43:13 adam + * Added suport for EXPLAIN Proxy servers - added settings databasePath + * and explainDatabase to facilitate this. Increased maximum number + * of databases and attributes in one register. + * + * Revision 1.57 1998/05/20 10:12:18 adam * Implemented automatic EXPLAIN database maintenance. * Modified Zebra to work with ASN.1 compiled version of YAZ. * @@ -224,6 +235,14 @@ #include "index.h" #include "recindex.h" +#ifndef ZEBRASDR +#define ZEBRASDR 0 +#endif + +#if ZEBRASDR +#include "zebrasdr.h" +#endif + char *prog; Res common_resource = 0; @@ -242,6 +261,9 @@ int main (int argc, char **argv) nmem_init (); +#if ZEBRASDR + zebraSdr_std (); +#endif rGroupDef.groupName = NULL; rGroupDef.databaseName = NULL; rGroupDef.path = NULL; @@ -250,9 +272,13 @@ int main (int argc, char **argv) rGroupDef.flagStoreData = -1; rGroupDef.flagStoreKeys = -1; rGroupDef.flagRw = 1; + rGroupDef.databaseNamePath = 0; + rGroupDef.explainDatabase = 0; rGroupDef.fileVerboseLimit = 100000; rGroupDef.zebra_maps = NULL; rGroupDef.dh = data1_create (); + rGroupDef.recTypes = recTypes_init (rGroupDef.dh); + recTypes_default_handlers (rGroupDef.recTypes); prog = *argv; if (argc < 2) @@ -278,7 +304,7 @@ int main (int argc, char **argv) ); exit (1); } - while ((ret = options ("sVt:c:g:d:m:v:nf:", argv, argc, &arg)) != -2) + while ((ret = options ("sVt:c:g:d:m:v:nf:l:", argv, argc, &arg)) != -2) { if (ret == 0) { @@ -459,7 +485,9 @@ int main (int argc, char **argv) fprintf (stderr, "Zebra %s %s\n", ZEBRAVER, ZEBRADATE); } else if (ret == 'v') - log_init (log_mask_str(arg), prog, NULL); + log_init_level (log_mask_str(arg)); + else if (ret == 'l') + log_init_file (arg); else if (ret == 'm') mem_max = 1024*1024*atoi(arg); else if (ret == 'd')