From: Frédéric Marchal Date: Sun, 16 Dec 2012 17:06:24 +0000 (+0100) Subject: Replace the "getword loop" messages X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=22276ff3aadc2a737a87170aa62d84ada59c5140;p=thirdparty%2Fsarg.git Replace the "getword loop" messages The "getword loop" messages are unclear. They don't explain what went wrong. The new messages explain that the end of a word or number was not found. --- diff --git a/util.c b/util.c index 7c08fcc..0217a60 100644 --- a/util.c +++ b/util.c @@ -83,7 +83,7 @@ int getword(char *word, int limit, struct getwordstruct *gwarea, char stop) for(x=0;((gwarea->current[x]) && (gwarea->current[x] != stop ));x++) { if(x>=limit) { - debuga(_("getword loop detected after %d bytes.\n"),x); + debuga(_("End of word not found in getword after %d bytes.\n"),x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop); @@ -124,7 +124,7 @@ int getword_multisep(char *word, int limit, struct getwordstruct *gwarea, char s for(x=0;((gwarea->current[x]) && (gwarea->current[x] != stop ));x++) { if(x>=limit) { - debuga(_("getword_multisep loop detected.\n")); + debuga(_("End of word not found in getword_multisep after %d bytes.\n"),x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop); @@ -151,7 +151,7 @@ int getword_skip(int limit, struct getwordstruct *gwarea, char stop) for(x=0;(gwarea->current[x] && (gwarea->current[x] != stop ));x++) { if(x>=limit) { - debuga(_("getword_skip loop detected after %d bytes.\n"),x); + debuga(_("End of word not found in getword_skip after %d bytes.\n"),x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop); @@ -190,7 +190,7 @@ int getword_atoll(long long int *number, struct getwordstruct *gwarea, char stop *number=(*number * 10) + digit; } if(gwarea->current[x] && gwarea->current[x]!=stop) { - debuga(_("getword_atoll loop detected after %d bytes.\n"),x); + debuga(_("End of number not found in getword_atoll after %d bytes.\n"),x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop); @@ -229,7 +229,7 @@ int getword_atoi(int *number, struct getwordstruct *gwarea, char stop) *number=(*number * 10) + digit; } if(gwarea->current[x] && gwarea->current[x]!=stop) { - debuga(_("getword_atoi loop detected after %d bytes.\n"),x); + debuga(_("End of number not found in getword_atoi after %d bytes.\n"),x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop); @@ -268,7 +268,7 @@ int getword_atol(long int *number, struct getwordstruct *gwarea, char stop) *number=(*number * 10) + digit; } if(gwarea->current[x] && gwarea->current[x]!=stop) { - debuga(_("getword_atol loop detected after %ld bytes.\n"),x); + debuga(_("End of number not found in getword_atol after %ld bytes.\n"),x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop); @@ -309,7 +309,7 @@ int getword_atolu(unsigned long int *number, struct getwordstruct *gwarea, char *number=(*number * 10) + digit; } if(gwarea->current[x] && gwarea->current[x]!=stop) { - debuga(_("getword_atolu loop detected after %ld bytes.\n"),x); + debuga(_("End of number not found in getword_atolu after %ld bytes.\n"),x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop);