]> git.ipfire.org Git - thirdparty/gettext.git/commit
msgfmt: Fix -k/--keyword option handling.
authorBruno Haible <bruno@clisp.org>
Fri, 2 Dec 2022 01:52:15 +0000 (02:52 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 2 Dec 2022 01:52:15 +0000 (02:52 +0100)
commitd4d42aee0e5d0de62278cd0ce3b651e34b533465
tree6d75789cfe4a8be2dec97cd29356f5be785e0845
parent21e08dd928f6b1484989a4b2a01df19b27757f4c
msgfmt: Fix -k/--keyword option handling.

Reported by Daniel <daniel.rf710@gmail.com> in
<https://savannah.gnu.org/bugs/index.php?63455>.

* gettext-tools/src/msgfmt.c (long_options): Declare that --keyword takes an
optional argument.
(main): Recognize -k as an alternative to --keyword.
Ensure that desktop_keywords is initialized before use.
Don't set desktop_default_keywords to false when an option -kKWSPEC or
--keyword=KWSPEC is seen.
Don't destroy the desktop_keywords table too early.
Don't destroy the desktop_keywords table when the program is terminating anyway.
gettext-tools/src/msgfmt.c