Eric Blake wrote:
> merge 11470 11472
> thanks
>
> On 05/14/2012 01:27 PM, Petr Pisar wrote:
>> The problem is such string does not pass through msgfmt tool while compiling
>> the catalog because the '% ' is not a valid printf sequence.
>>
>> Solution is to suppress the auto-detection by adding /*xgettext:no-c-format*/
>> before the fputs() line in the source code.
>
> Thanks.  You're the third person to report this today, but the first to
> provide a potential patch.  Are you comfortable submitting that fix in
> 'git format-patch' form with a proper commit message?  If not, we will
> probably do it on your behalf in the next 24 hours or so.

Thanks for all the replies and for merging those, Eric.

I wrote the patch.  As expected, it was more work to collect and
insert names in THANKS.in than to make the actual change ;-)
Note that Göran's name is already in the generated THANKS file,
so I didn't add it below.

If anyone listed prefers a different spelling of name or email,
just let us know.

>From 54be50197b47ba9200a1c3e48847fa959d4f5bfd Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Wed, 16 May 2012 07:26:36 +0200
Subject: [PATCH] maint: tell xgettext that fputs arg "93% of..." is not a C
 format string
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* src/fmt.c (usage): Add a comment to tell
xgettext that the "% o" in fputs argument string of "...93% of..."
is not a C format string.  Reported by Toomas Soome, Göran Uddeborg,
Petr Pisar, Primoz PETERLIN and Chusslove Illich via
http://bugs.gnu.org/11470
---
 THANKS.in | 4 ++++
 src/fmt.c | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/THANKS.in b/THANKS.in
index 5c7dde8..6c826af 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -121,6 +121,7 @@ Christian Rose                      [email protected]
 Christian von Roques                [email protected]
 Christophe LYON                     [email protected]
 Chuck Hedrick                       [email protected]
+Chusslove Illich                    [email protected]
 Clark Morgan                        [email protected]
 Clement Wang                        [email protected]
 Colin Plumb                         [email protected]
@@ -482,6 +483,7 @@ Peter Horst                         [email protected]
 Peter Moulder                       [email protected]
 Peter Samuelson                     [email protected]
 Peter Seebach                       [email protected]
+Petr Pisar                          [email protected]
 Petr Uzel                           [email protected]
 Petter Reinholdtsen                 [email protected]
 Phelippe Neveu                      [email protected]
@@ -496,6 +498,7 @@ Piotr Gackiewicz                    [email protected]
 Piotr Kwapulinski                   [email protected]
 Prashant TR                         [email protected]
 Priit Jõerüüt                       [email protected]
+Primoz PETERLIN                     [email protected]
 Rainer Orth                         [email protected]
 Ralf W. Stephan                     [email protected]
 Ralph Loader                        [email protected]
@@ -593,6 +596,7 @@ Ton Nijkes                          [email protected]
 Tony Kocurko                        [email protected]
 Tony Leneis                         [email protected]
 Tony Robinson                       [email protected]
+Toomas Soome                        [email protected]
 Toralf Förster                      [email protected]
 Torbjorn Granlund                   [email protected]
 Torbjorn Lindgren                   [email protected]
diff --git a/src/fmt.c b/src/fmt.c
index 3da198e..3e93654 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -281,10 +281,12 @@ Mandatory arguments to long options are mandatory for 
short options too.\n\
   -p, --prefix=STRING       reformat only lines beginning with STRING,\n\
                               reattaching the prefix to reformatted lines\n\
   -s, --split-only          split long lines, but do not refill\n\
 "),
              stdout);
+      /* Tell xgettext that the "% o" below is not a printf-style
+         format string:  xgettext:no-c-format */
       fputs (_("\
   -t, --tagged-paragraph    indentation of first line different from second\n\
   -u, --uniform-spacing     one space between words, two after sentences\n\
   -w, --width=WIDTH         maximum line width (default of 75 columns)\n\
   -g, --goal=WIDTH          goal width (default of 93% of width)\n\
--
1.7.10.2.520.g6a4a482



Reply via email to