From 084ad8d210469872bda11c201267a361ca295435 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 25 May 1999 12:33:32 +0000 Subject: [PATCH] Fixed bug in Tcl filter. --- recctrl/regxread.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/recctrl/regxread.c b/recctrl/regxread.c index bb26858..b7204dd 100644 --- a/recctrl/regxread.c +++ b/recctrl/regxread.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: regxread.c,v $ - * Revision 1.24 1999-05-21 11:08:46 adam + * Revision 1.25 1999-05-25 12:33:32 adam + * Fixed bug in Tcl filter. + * + * Revision 1.24 1999/05/21 11:08:46 adam * Tcl filter attempts to read .tflt. Improvements to configure * script so that it reads uninstalled Tcl source. * @@ -710,15 +713,7 @@ int readFileSpec (struct lexSpec *spec) xfree (lineBuf); return -1; } - logf (LOG_LOG, "reading regx filter %s.flt", lineBuf); - sprintf (lineBuf, "%s.flt", spec->name); - if (!(spec_inf = yaz_path_fopen (data1_get_tabpath(spec->dh), - lineBuf, "r"))) - { - logf (LOG_ERRNO|LOG_WARN, "cannot read spec file %s", spec->name); - xfree (lineBuf); - return -1; - } + logf (LOG_LOG, "reading regx filter %s", lineBuf); #if HAVE_TCL_H if (spec->tcl_interp) logf (LOG_LOG, "Tcl enabled"); @@ -1298,17 +1293,15 @@ static int cmd_tcl_end (ClientData clientData, Tcl_Interp *interp, { int min_level = 1; char *element = 0; - if (!strcmp(argv[2], "-record")) + if (argc >= 3 && !strcmp(argv[2], "-record")) { min_level = 0; if (argc == 4) element = argv[3]; } else - { if (argc == 3) element = argv[2]; - } tagEnd (spec, min_level, element, (element ? strlen(element) : 0)); if (spec->d1_level == 0) { -- 1.7.10.4