xgettext: Recognize gettext -e invocations in shell parser.
Reported by Eugene V. Lyubimkin <jackyf.devel@gmail.com>
in <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507091>.
* gettext-runtime/src/escapes.h: New file, extracted from
gettext-runtime/src/gettext.c.
* gettext-runtime/src/gettext.c: Include escapes.h.
(expand_escape): Remove function.
(inhibit_added_newline): New variable.
(add_newline): Remove variable.
(main): Initialize inhibit_added_newline. Invoke expand_escapes instead of
expand_escape.
* gettext-runtime/src/ngettext.c: Include escapes.h.
(expand_escape): Remove function.
(main): Invoke expand_escapes instead of expand_escape.
* gettext-runtime/src/Makefile.am (gettext_SOURCES, ngettext_SOURCES): Add
escapes.h.
* gettext-tools/tests/tstgettext.c: Include escapes.h.
(expand_escape): Remove function.
(inhibit_added_newline): New variable.
(add_newline): Remove variable.
(main): Initialize inhibit_added_newline. Invoke expand_escapes instead of
expand_escape.
* gettext-tools/tests/Makefile.am (tstgettext_SOURCES): Add escapes.h.
* gettext-tools/src/x-sh.c: Include escapes.h.
(read_command): Recognize a '-e' option in the argument list of gettext and
ngettext.
* gettext-tools/src/Makefile.am (xgettext_SOURCES): Add escapes.h.
* gettext-tools/tests/xgettext-sh-1: Test the recognition of gettext -e
arguments.
* NEWS: Mention the change.