]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Factor out commonly used mixed_string_buffer
authorDaiki Ueno <ueno@gnu.org>
Fri, 2 May 2014 06:58:04 +0000 (15:58 +0900)
committerDaiki Ueno <ueno@gnu.org>
Fri, 2 May 2014 08:57:58 +0000 (17:57 +0900)
commitf597467a209e616f26c73eb1d880f34f40505047
treed2f8cbb4d5a118cb5bb0edc2b726dfb5ec1e06f3
parent250a942908bb43613899e8bbc5ea7b87e533a1e9
xgettext: Factor out commonly used mixed_string_buffer

* x-python.c (init_mixed_string_buffer)
(mixed_string_buffer_append_byte)
(mixed_string_buffer_append_unicode_grow)
(mixed_string_buffer_append_unicode)
(mixed_string_buffer_flush_utf16_surr)
(mixed_string_buffer_flush_curr_buffer)
(mixed_string_buffer_append, mixed_string_buffer_result)
(free_mixed_string_buffer): Move to...
* xgettext.c: ...here.
(mixed_string_buffer_alloc): Rename from init_mixed_string_buffer.
(mixed_string_buffer_append_to_curr_buffer): Rename from
mixed_string_buffer_append_byte.
(mixed_string_buffer_append_to_utf8_buffer): Rename from
mixed_string_buffer_append_unicode.
(mixed_string_buffer_grow_utf8_buffer): Rename from
mixed_string_buffer_append_unicode_grow.
(mixed_string_buffer_append_char): Split from
mixed_string_buffer_append.
(mixed_string_buffer_append_unicode): Split from
mixed_string_buffer_append.
(mixed_string_buffer_done): New function merging
mixed_string_buffer_result and free_mixed_string_buffer.
* xgettext.h (mixed_string_buffer): New struct moved from
x-python.c; add logical_file_name and line_number fields.
(mixed_string_buffer_alloc): New function declaration.
(mixed_string_buffer_append_char): New function declaration.
(mixed_string_buffer_append_unicode): New function declaration.
(mixed_string_buffer_done): New function declaration.
* x-javascript.c (init_mixed_string_buffer)
(mixed_string_buffer_append_byte)
(mixed_string_buffer_append_unicode_grow)
(mixed_string_buffer_append_unicode)
(mixed_string_buffer_flush_utf16_surr)
(mixed_string_buffer_flush_curr_buffer)
(mixed_string_buffer_append, mixed_string_buffer_result)
(free_mixed_string_buffer): Remove.
gettext-tools/src/ChangeLog
gettext-tools/src/x-javascript.c
gettext-tools/src/x-python.c
gettext-tools/src/xgettext.c
gettext-tools/src/xgettext.h