From: Bruno Haible Date: Mon, 19 Aug 2019 08:24:30 +0000 (+0200) Subject: doc: Fix documentation of gettext, ngettext programs. X-Git-Tag: v0.20.2~47 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a08403515b6b2ebe6ab66edf4bcfba5437c3e7a;p=thirdparty%2Fgettext.git doc: Fix documentation of gettext, ngettext programs. * gettext-runtime/doc/rt-gettext.texi: Clarify when the additional newline is emitted. * gettext-runtime/doc/rt-ngettext.texi: Remove '\c' from the list of recognized escape sequences. --- diff --git a/gettext-runtime/doc/rt-gettext.texi b/gettext-runtime/doc/rt-gettext.texi index 4cb3fb02b..dc6a97693 100644 --- a/gettext-runtime/doc/rt-gettext.texi +++ b/gettext-runtime/doc/rt-gettext.texi @@ -51,8 +51,8 @@ Display this help and exit. @item -n @opindex -n@r{, @code{gettext} option} -Suppress trailing newline. By default, @code{gettext} adds a newline to -the output. +This option has only an effect if the @code{-s} option is given. It +suppresses the additional newline at the end. @item -V @itemx --version @@ -72,4 +72,7 @@ environment variable @code{TEXTDOMAINDIR}. When used with the @code{-s} option the program behaves like the @samp{echo} command. But it does not simply copy its arguments to stdout. Instead those -messages found in the selected catalog are translated. +messages found in the selected catalog are translated. Also, a newline is +added at the end, unless either the option @code{-n} is specified or the +option @code{-e} is specified and some of the argument strings contains a +@samp{\c} escape sequence. diff --git a/gettext-runtime/doc/rt-ngettext.texi b/gettext-runtime/doc/rt-ngettext.texi index 9b66159eb..abdcc9adb 100644 --- a/gettext-runtime/doc/rt-ngettext.texi +++ b/gettext-runtime/doc/rt-ngettext.texi @@ -33,7 +33,7 @@ corresponds to a package, a program, or a module of a program. @opindex -e@r{, @code{ngettext} option} Enable expansion of some escape sequences. This option is for compatibility with the @samp{gettext} program. The escape sequences -@samp{\a}, @samp{\b}, @samp{\c}, @samp{\f}, @samp{\n}, @samp{\r}, @samp{\t}, +@samp{\a}, @samp{\b}, @samp{\f}, @samp{\n}, @samp{\r}, @samp{\t}, @samp{\v}, @samp{\\}, and @samp{\} followed by one to three octal digits, are interpreted like the System V @samp{echo} program did.