From 1bc3d2e03e5cb4105b40046bebed44d1934b0480 Mon Sep 17 00:00:00 2001 From: Frederic Marchal Date: Thu, 2 Apr 2015 21:18:24 +0200 Subject: [PATCH] Use the function name in a message to reduce the number of messages. --- util.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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); -- 2.47.2