]> git.ipfire.org Git - thirdparty/gettext.git/commit
msgfmt: Refactor --desktop handling
authorDaiki Ueno <ueno@gnu.org>
Mon, 5 Oct 2015 07:33:31 +0000 (16:33 +0900)
committerDaiki Ueno <ueno@gnu.org>
Tue, 6 Oct 2015 01:03:34 +0000 (10:03 +0900)
commitd5a1f03517517ac2474ee50ea0b4f5d270457478
tree635dcef4e3e78bc6c40cc59741de64e59ba5b21b
parent423d5cca70c2640eaf45dabdc36ed755701043a8
msgfmt: Refactor --desktop handling

* gettext-tools/src/msgfmt.c (get_languages): Avoid redundant memory
allocation.
(msgfmt_operand_list_init): New function.
(msgfmt_operand_list_destroy): New function.
(msgfmt_operand_list_append): New function.
(msgfmt_operand_list_add_directory): New function.
(msgfmt_desktop_bulk): Rewrite using msgfmt_operand_list_ty.
* gettext-tools/src/msgfmt.h (msgfmt_operand_ty,
msgfmt_operand_list_ty): New type.
* gettext-tools/src/write-desktop.c (msgdomain_write_desktop_bulk):
Simplify using msgfmt_operand_list_ty.
(msgdomain_write_desktop): Simplify using msgfmt_operand_list_ty.
* gettext-tools/src/write-desktop.h (msgdomain_write_desktop_bulk):
Take OPERANDS as the first argument, instead of LANGUAGES and MESSAGES.
gettext-tools/src/ChangeLog
gettext-tools/src/msgfmt.c
gettext-tools/src/msgfmt.h
gettext-tools/src/write-desktop.c
gettext-tools/src/write-desktop.h