[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] argp_doc mishandles doc strings starting or ending with \v

From: Colin Watson
Subject: [PATCH] argp_doc mishandles doc strings starting or ending with \v
Date: Wed, 6 Aug 2008 20:15:31 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

In man-db's apropos program, I use the following doc string:

  static const char apropos_doc[] = "\v" N_("The --regex option is enabled by 

The argp documentation says nothing to suggest that I can't leave the
part of argp->doc before \v empty, to provide only extra text to be
printed after the options. However, this breaks because argp_doc ends up
calling dgettext (argp->argp_domain, ""), which gets translated to the
PO file header. The result looks like this:

  Usage: apropos [OPTION...] KEYWORD...
  Project-Id-Version: man-db
  Report-Msgid-Bugs-To: FULL NAME <address@hidden>
  POT-Creation-Date: 2008-01-27 16:58+0000
  PO-Revision-Date: 2007-11-20 13:30+0000
  Last-Translator: Jen Ockwell <address@hidden>
  Language-Team: English (United Kingdom) <address@hidden>
  MIME-Version: 1.0
  Content-Type: text/plain; charset=UTF-8
  Content-Transfer-Encoding: 8bit
  X-Launchpad-Export-Date: 2008-05-28 11:32+0000
  X-Generator: Launchpad (build Unknown)
    -d, --debug                emit debugging messages
    -v, --verbose              print verbose warning messages
    -e, --exact                search each keyword for exact match
    -r, --regex                interpret each keyword as a regex
    -w, --wildcard             the keyword(s) contain wildcards
    -a, --and                  require all keywords to match
    -l, --long                 do not trim output to terminal width
    -C, --config-file=FILE     use this user configuration file
    -L, --locale=LOCALE        define the locale for this search
    -m, --systems=SYSTEM       use manual pages from other systems
    -M, --manpath=PATH         set search path for manual pages to PATH
    -s, --section=SECTION      search only this section
    -?, --help                 give this help list
        --usage                give a short usage message
    -V, --version              print program version
  Mandatory or optional arguments to long options are also mandatory or optional
  for any corresponding short options.
  The --regex option is enabled by default.
  Report bugs to address@hidden

The attached patch fixes this.

2008-08-06  Colin Watson  <address@hidden>

        * lib/argp-help.c (argp_doc): Don't translate the empty string.


Colin Watson                                       address@hidden

Attachment: gnulib.argp-doc-empty-string.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]