From b385fad64ec1afb51fd0ec9ad76567282ab20bfe Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 24 Apr 2003 19:34:19 +0000 Subject: [PATCH] Minor changes in Debug log messages --- recctrl/recgrs.c | 6 +++--- recctrl/regxread.c | 23 ++++++++++++++--------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/recctrl/recgrs.c b/recctrl/recgrs.c index a0cdef7..9b6cc84 100644 --- a/recctrl/recgrs.c +++ b/recctrl/recgrs.c @@ -1,4 +1,4 @@ -/* $Id: recgrs.c,v 1.75 2003-03-08 14:27:58 pop Exp $ +/* $Id: recgrs.c,v 1.76 2003-04-24 19:34:19 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps @@ -563,10 +563,10 @@ static void index_termlist (data1_node *par, data1_node *n, tlist->att->name, tlist->att->value, tlist->source); printf (" data=\""); - for (i = 0; ilength && i < 8; i++) + for (i = 0; ilength && i < 40; i++) fputc (wrd->string[i], stdout); fputc ('"', stdout); - if (wrd->length > 8) + if (wrd->length > 40) printf (" ..."); fputc ('\n', stdout); } diff --git a/recctrl/regxread.c b/recctrl/regxread.c index f56738d..9b8473b 100644 --- a/recctrl/regxread.c +++ b/recctrl/regxread.c @@ -1,5 +1,5 @@ -/* $Id: regxread.c,v 1.46 2002-09-24 19:41:00 adam Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 +/* $Id: regxread.c,v 1.47 2003-04-24 19:34:20 adam Exp $ + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps This file is part of the Zebra server. @@ -669,12 +669,17 @@ static void execData (struct lexSpec *spec, return ; #if REGX_DEBUG if (elen > 40) - logf (LOG_LOG, "data (%d bytes) %.15s ... %.*s", elen, + logf (LOG_LOG, "data(%d bytes) %.15s ... %.*s", elen, ebuf, 15, ebuf + elen-15); + else if (elen == 1 && ebuf[0] == '\n') + { + logf (LOG_LOG, "data(new line)"); + assert(0); + } else if (elen > 0) - logf (LOG_LOG, "data (%d bytes) %.*s", elen, elen, ebuf); + logf (LOG_LOG, "data(%d bytes) %.*s", elen, elen, ebuf); else - logf (LOG_LOG, "data (%d bytes)", elen); + logf (LOG_LOG, "data(%d bytes)", elen); #endif if (spec->d1_level <= 1) @@ -768,7 +773,7 @@ static void variantBegin (struct lexSpec *spec, ttype[type_len] = '\0'; #if REGX_DEBUG - logf (LOG_LOG, "variant begin %s %s (%d)", tclass, ttype, + logf (LOG_LOG, "variant begin(%s,%s,%d)", tclass, ttype, spec->d1_level); #endif @@ -793,7 +798,7 @@ static void variantBegin (struct lexSpec *spec, } #if REGX_DEBUG - logf (LOG_LOG, "variant node (%d)", spec->d1_level); + logf (LOG_LOG, "variant node(%d)", spec->d1_level); #endif parent = spec->d1_stack[spec->d1_level-1]; res = data1_mk_node2 (spec->dh, spec->m, DATA1N_variant, parent); @@ -838,7 +843,7 @@ static void tagBegin (struct lexSpec *spec, tagDataRelease (spec); #if REGX_DEBUG - logf (LOG_LOG, "begin tag %s (%d)", tag, spec->d1_level); + logf (LOG_LOG, "begin tag(%.*s, %d)", len, tag, spec->d1_level); #endif spec->d1_stack[spec->d1_level] = data1_mk_tag_n ( @@ -864,7 +869,7 @@ static void tagEnd (struct lexSpec *spec, int min_level, break; } #if REGX_DEBUG - logf (LOG_LOG, "end tag (%d)", spec->d1_level); + logf (LOG_LOG, "end tag(%d)", spec->d1_level); #endif } -- 1.7.10.4