]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Replace the "getword loop" messages
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Sun, 16 Dec 2012 17:06:24 +0000 (18:06 +0100)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Sun, 16 Dec 2012 17:06:24 +0000 (18:06 +0100)
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.

util.c

diff --git a/util.c b/util.c
index 7c08fcc70e1907fecf3ed0989578f9b4c1e84c00..0217a60122bbe899fee354289bf0297f88129ca6 100644 (file)
--- 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);