From: Frederic Marchal Date: Thu, 2 Apr 2015 19:18:24 +0000 (+0200) Subject: Use the function name in a message to reduce the number of messages. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bc3d2e03e5cb4105b40046bebed44d1934b0480;p=thirdparty%2Fsarg.git Use the function name in a message to reduce the number of messages. --- diff --git a/util.c b/util.c index 095cf07..0f4c181 100644 --- a/util.c +++ b/util.c @@ -93,7 +93,11 @@ 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(_("End of word not found in getword after %d bytes.\n"),x); + /* + TRANSLATORS: The %s is the name of the function reporting the + error message. + */ + debuga(_("End of word not found in %s after %d bytes.\n"),__func__,x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop); @@ -133,7 +137,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(_("End of word not found in getword_multisep after %d bytes.\n"),x); + debuga(_("End of word not found in %s after %d bytes.\n"),__func__,x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop); @@ -159,7 +163,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(_("End of word not found in getword_skip after %d bytes.\n"),x); + debuga(_("End of word not found in %s after %d bytes.\n"),__func__,x); debuga(_("Line=\"%s\"\n"),gwarea->beginning); debuga(_("Record=\"%s\"\n"),gwarea->current); debuga(_("searching for \'x%x\'\n"),stop);