GNU bug report logs - #11472
Message src/fmt.c:285 marked as c-formatted string erroneously

Previous Next

Package: coreutils;

Reported by: Petr Pisar <petr.pisar <at> atlas.cz>

Date: Mon, 14 May 2012 21:54:02 UTC

Severity: normal

Merged with 11470, 11471, 11483, 11494, 11740

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Petr Pisar <petr.pisar <at> atlas.cz>
To: bug-coreutils <at> gnu.org
Subject: Message src/fmt.c:285 marked as c-formatted string erroneously
Date: Mon, 14 May 2012 21:27:42 +0200
[Message part 1 (text/plain, inline)]
Hello,

coreutils-8.17 contains this message:

#: src/fmt.c:285
#, c-format
msgid ""
"  -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"

The message is detected by xgettext as C formatted string because of the
percentage character.

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.

-- Petr
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 12 years and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.