1 2013-11-11 Daiki Ueno <ueno@gnu.org>
3 * x-c.c (phase5_get): Fix misuse of a logical operator.
4 * x-perl.c (extract_quotelike_pass3): Likewise.
5 * x-vala.c (phase3_get): Likewise.
6 Reported by David Binderman at: <https://savannah.gnu.org/bugs/?40528>.
8 2013-08-12 Daiki Ueno <ueno@gnu.org>
10 * xgettext.c (remember_a_message): Handle multi-line extracted
12 Reported by Gabor Kelemen in
13 <http://lists.gnu.org/archive/html/bug-gettext/2013-08/msg00026.html>.
15 2013-08-08 Miguel Angel Arruga Vivas <rosen644835@gmail.com> (tiny change)
17 Fix copyright year in xgettext version string.
18 * xgettext.c (main): Update copyright year.
20 2013-07-11 Daiki Ueno <ueno@gnu.org>
22 Fix crash when parsing '..' with non-string argument.
23 Reported by Koen Dergent at <http://savannah.gnu.org/bugs/?39458>.
24 * x-lua.c (extract_balanced): Skip stray '..'.
26 2013-06-27 Daiki Ueno <ueno@gnu.org>
28 * x-python.c (phase5_pushback): Increment size to 2.
30 2013-06-25 Daiki Ueno <ueno@gnu.org>
32 Fix handling of \u escape sequences in Tcl.
33 * x-tcl.c (do_getc_escaped): Fix handling of \u.
34 Reported by Guido Berhoerster in
35 <https://lists.gnu.org/archive/html/bug-gettext/2013-06/msg00022.html>.
37 2013-06-17 Daiki Ueno <ueno@gnu.org>
39 * x-python.c (init_flag_table_python): Enable python-brace-format
42 2013-06-17 Daiki Ueno <ueno@gnu.org>
44 * x-glade.c (start_element_null): New function.
45 (end_element_null): New function.
46 (element_parser_null): New variable.
47 (start_element_handler): Use element_parser_null if the top-level
48 element does not indicate a valid Glade file.
49 (do_extract_glade): Initialize element_parser to
50 element_parser_null rather than NULL.
52 2013-06-13 Miguel Angel Arruga Vivas <rosen644835@gmail.com>
53 Daiki Ueno <ueno@gnu.org>
55 Support for GtkBuilder file format in the Glade scanner.
56 * x-glade.h (EXTENSIONS_GLADE): Recognize .ui.
57 * x-glade.c (element_parser): New struct.
58 (start_element_glade1): New function split from start_element_handler.
59 (end_element_glade1): New function split from end_element_handler.
60 (start_element_glade2): New function split from start_element_handler.
61 (end_element_glade2): New function split from end_element_handler.
62 (start_element_gtkbuilder): New function.
63 (end_element_gtkbuilder): New function.
64 (element_parser_glade1): New variable.
65 (element_parser_glade2): New variable.
66 (element_parser_gtkbuilder): New variable.
67 (start_element_handler): Delegate the actual parsing logic to
68 specific element_parser.
69 (end_element_handler): Likewise.
70 Thanks to Miguel Ángel Arruga Vivas for the initial implementation
72 <https://lists.gnu.org/archive/html/bug-gettext/2013-03/msg00074.html>
75 2013-06-10 Daiki Ueno <ueno@gnu.org>
77 * Makefile.am: Use $(MKDIR_P) instead of $(mkdir_p).
78 Suggested by Stefano Lattarini in
79 <https://lists.gnu.org/archive/html/bug-gettext/2013-04/msg00044.html>.
81 2013-06-04 Daiki Ueno <ueno@gnu.org>
86 * xgettext.c: Include x-vala.h.
87 (flag_table_vala): New variable.
88 (main): Invoke init_flag_table_vala, x_vala_extract_all,
90 (usage): Mention Vala source language.
91 (language_to_extractor): Add Vala rule.
92 (extension_to_language): Add Vala rule.
93 * Makefile.am (noinst_HEADERS): Add x-vala.h.
94 (xgettext_SOURCES): Add x-vala.c.
97 2013-05-21 Daiki Ueno <ueno@gnu.org>
99 * x-javascript.c (phase7_getuc): Treat non-legitimate character
100 escape sequences more strictly.
102 2013-05-20 Pavel Kharitonov <ineiev@gnu.org> (tiny change)
104 Add --previous option to msgattrib.
105 * msgattrib.c (long_options, main, process_message_list):
106 (usage): Add --previous option.
108 2013-05-12 Daiki Ueno <ueno@gnu.org>
110 Fix end-of-string handling in JavaScript scanner.
111 * x-javascript.c (phase7_getuc): Remove unused BACKSLASH_COUNTER
112 argument; all callers changed.
113 Reported by Andreas Stricker in
114 <http://lists.gnu.org/archive/html/bug-gettext/2013-04/msg00051.html>.
116 2013-05-03 Daiki Ueno <ueno@gnu.org>
118 * user-email.sh.in (lowercase_sed): Don't use non-portable
119 character escape in sed 's' command.
120 Reported by Ben Fox-Moore in
121 <http://lists.gnu.org/archive/html/bug-gettext/2013-05/msg00003.html>
122 and thanks to Ineiev for the suggestion.
124 2013-04-26 Daiki Ueno <ueno@gnu.org>
126 Support for Python brace format.
127 * message.h (format_type): New enum value 'format_python_brace.
128 (NFORMATS): Increment.
129 * message.c (format_language): Add format_python_brace entry.
130 (format_language_pretty): Likewise.
131 * format.h (formatstring_python_brace): New declaration.
132 * format-python-brace.c: New file.
133 * format.c (formatstring_parsers): Add formatstring_python_brace.
134 * x-python.h (SCANNERS_PYTHON): Refar to formatstring_python_brace.
135 * xgettext.c (xgettext_record_flag): Handle format_python_brace.
138 2013-04-22 Daiki Ueno <ueno@gnu.org>
140 Make msgfmt --check-header more reliable.
141 * msgl-check.c (check_header_entry): Don't use c_strstr to parse
144 2013-04-22 Daiki Ueno <ueno@gnu.org>
146 Support CR/LF line terminators in Python sources even on Unix.
147 * x-python.c (phase0_getc, phase0_ungetc): New functions.
148 (phase1_getc): Use them instead of calling getc/ungetc directly.
150 2013-04-22 Daiki Ueno <ueno@gnu.org>
152 Support explicit string concatenation in Python.
153 * x-python.c (enum token_type_ty): New enumeration item
155 (free_token): New function.
156 (phase5_get): Recognize token_type_plus.
157 (x_python_lex): Handle string concatenation with '+'.
158 (extract_balanced): Handle token_type_plus.
160 2013-04-18 Daiki Ueno <ueno@gnu.org>
162 * xgettext.c (usage): Wrap long lines in --help output.
164 2013-04-17 Andreas Stricker <astricker@futurelab.ch>
166 Support for JavaScript.
167 * message.h (format_type): New enum value 'format_javascript'.
168 (NFORMATS): Increment.
169 * message.c (format_language): Add format_javascript entry.
170 (format_language_pretty): Likewise.
171 * format.h (formatstring_javascript): New declaration.
172 * format-javascript.c: New file.
173 * format.c (formatstring_parsers): Add formatstring_javascript.
174 * x-javascript.h: New file.
175 * x-javascript.c: New file.
176 * xgettext.c: Include x-javascript.h.
177 (flag_table_javascript): New variable.
178 (main): Invoke init_flag_table_javascript, x_javascript_extract_all,
179 x_javascript_keyword.
180 (usage): Mention JavaScript source language.
181 (xgettext_record_flag): Handle format_javascript.
182 (language_to_extractor): Add JavaScript rule.
183 (extension_to_language): Add JavaScript rule.
184 * Makefile.am (noinst_HEADERS): Add x-javascript.h.
185 (FORMAT_SOURCE): Add format-javascript.c.
186 (xgettext_SOURCES): Add x-javascript.c.
189 2013-04-16 Ľubomír Remák <lubomirr@lubomirr.eu>
191 Support for escape sequences added in Lua 5.2.
192 * x-lua.c (phase3_get): Add \x and \z escape sequences.
194 2013-04-11 Ľubomír Remák <lubomirr@lubomirr.eu>
197 * message.h (format_type): New enum value 'format_lua'.
198 (NFORMATS): Increment.
199 * message.c (format_language): Add format_lua entry.
200 (format_language_pretty): Likewise.
201 * format.h (formatstring_lua): New declaration.
202 * format-lua.c: New file.
203 * format.c (formatstring_parsers): Add formatstring_lua.
206 * xgettext.c: Include x-lua.h.
207 (flag_table_lua): New variable.
208 (main): Invoke init_flag_table_lua, x_lua_extract_all,
210 (usage): Mention Lua source language.
211 (xgettext_record_flag): Handle format_lua.
212 (language_to_extractor): Add Lua rule.
213 (extension_to_language): Add Lua rule.
214 * Makefile.am (noinst_HEADERS): Add x-lua.h.
215 (FORMAT_SOURCE): Add format-lua.c.
216 (xgettext_SOURCES): Add x-lua.c.
219 2013-03-15 Miguel Ángel Arruga Vivas <rosen644835@gmail.com>
220 Daiki Ueno <ueno@gnu.org>
222 Extract msgctxt from Glade input files.
223 Reported at <https://savannah.gnu.org/bugs/?34506>
224 * x-glade.c (struct element_state): Add field 'extract_context'.
225 (start_element_handler): Check "context" attribute if the string
227 (end_element_handler): Extract msgctxt if extract_context is set.
229 2013-02-25 Daiki Ueno <ueno@gnu.org>
231 * Makefile.am (libgettextsrc_la_CPPFLAGS): Define to specify Woe32
234 2013-01-09 Andreas Stricker <astricker@futurelab.ch> (tiny change)
236 * po-xerror.c: Include error.h for error_message_count.
237 * read-catalog-abstract.c: Likewise.
239 2013-01-06 Daiki Ueno <ueno@gnu.org>
241 * msgl-fsearch.c (message_fuzzy_index_ty): Don't use float-derived
242 integer SHORT_MSG_MAX to define array.
243 (message_fuzzy_index_alloc): Allocate memory for 'short_messages'
245 (message_fuzzy_index_free): Free it.
247 2013-01-03 Daiki Ueno <ueno@gnu.org>
249 * xgettext.c (construct_header): Fix memory leak.
251 2012-12-25 Daiki Ueno <ueno@gnu.org>
253 * gettext-0.18.2 released.
255 2012-06-03 Jim Meyering <jim@meyering.net>
257 * msginit.c: Spelling fixes.
258 * write-catalog.c: Likewise.
260 2012-05-03 Bruno Haible <bruno@clisp.org>
262 Document msgfmt option --endianness.
263 * msgfmt.c (usage): Document the option --endianness.
264 Reported by Paul Martin <pm@debian.org> via
265 Santiago Vila <sanvila@unex.es>.
267 2012-01-26 Bruno Haible <bruno@clisp.org>
270 * hostname.c (usage): Quote 'like this', not `like this', as per the
271 recent change to the GNU coding standards.
272 * msgattrib.c (usage): Likewise.
273 * msgcat.c (usage): Likewise.
274 * msgcmp.c (usage): Likewise.
275 * msgcomm.c (usage): Likewise.
276 * msgconv.c (usage): Likewise.
277 * msgen.c (usage): Likewise.
278 * msgexec.c (usage): Likewise.
279 * msgfilter.c (usage): Likewise.
280 * msgfmt.c (usage, msgfmt_set_domain, msgfmt_frob_new_message):
282 * msggrep.c (usage): Likewise.
283 * msginit.c (usage): Likewise.
284 * msgl-cat.c (catenate_msgdomain_list): Likewise.
285 * msgl-check.c (check_pair, check_header_entry): Likewise.
286 * msgmerge.c (usage): Likewise.
287 * msgunfmt.c (usage): Likewise.
288 * msguniq.c (usage): Likewise.
289 * recode-sr-latin.c (usage): Likewise.
290 * urlget.c (usage): Likewise.
291 * write-po.c (wrap): Likewise.
292 * xgettext.c (main, usage, remember_a_message, construct_header,
293 language_to_extractor): Likewise.
294 * po-gram-gen.y: Likewise.
295 * po-error.h: Likewise.
296 * po-lex.h: Likewise.
297 * read-catalog-abstract.h: Likewise.
300 2011-10-04 Bruno Haible <bruno@clisp.org>
302 xgettext for Scheme: Understand guile 2.0 comment syntax, part 2.
303 * x-scheme.c (read_object): Extract and don't ignore block comments.
304 Understand the #|...|# syntax of SRFI-30. (Code copied from x-lisp.c.)
306 2011-10-04 Bruno Haible <bruno@clisp.org>
308 xgettext for Scheme: Understand guile 2.0 comment syntax, part 1.
309 * x-scheme.c (read_object): Understand !# as a block comment terminator
310 even when not surrounded by newlines.
311 Reported by David Pirotte <david@altosw.be>
312 via Santiago Vila <sanvila@unex.es>.
314 2011-07-29 Bruno Haible <bruno@clisp.org>
316 Fix xgettext crash when extracting a message with plural that is
318 * xgettext.h (remember_a_message): Document the return value.
319 * xgettext.c (arglist_parser_done): Handle the case where
320 remember_a_message returned NULL.
321 * x-smalltalk.c (extract_smalltalk): Likewise.
322 * x-ycp.c (extract_parenthesized): Likewise.
323 Reported by Jean-Luc Coulon <jean-luc.coulon@wanadoo.fr> via
324 Santiago Vila <sanvila@unex.es>.
326 2011-06-13 Bruno Haible <bruno@clisp.org>
328 Avoid compilation error on Solaris 7 with cc.
329 * msgl-fsearch.c (SHORT_MSG_MAX): Define more directly with SunPRO C.
331 2011-06-04 Bruno Haible <bruno@clisp.org>
333 Avoid link error when linking statically on AIX 7.
334 * Makefile.am (xgettext_LDADD): Add LTLIBICONV.
336 2011-04-13 Bruno Haible <bruno@clisp.org>
338 * msgcat.c (usage): Fix description of --use-first.
339 * msgcomm.c (usage): Fix typo.
340 Reported by Matthijs Kooijman.
342 2011-06-04 Bruno Haible <bruno@clisp.org>
344 Update after __attibute__ is no longer defined by gnulib.
345 * msgl-check.c (formatstring_error_logger): Use __attribute__ only with
346 compiler versions that support it.
348 2011-06-02 Bruno Haible <bruno@clisp.org>
350 Use u8_mbtoucr instead of u8_mbtouc in some places.
351 * po-lex.c (mbfile_getc): Call u8_mbtoucr instead of u8_mbtouc.
352 * x-csharp.c (phase2_getc): Likewise.
353 * x-python.c (phase2_getc): Likewise.
354 Needed after libunistring changed on 2010-11-13.
356 2011-06-02 Bruno Haible <bruno@clisp.org>
358 Update after gnulib changed.
359 * msgexec.c: Include spawn-pipe.h instead of pipe.h.
360 * msginit.c: Likewise.
361 * read-csharp.c: Likewise.
362 * read-java.c: Likewise.
363 * read-resources.c: Likewise.
364 * read-tcl.c: Likewise.
365 * write-resources.c: Likewise.
367 2010-11-20 Bruno Haible <bruno@clisp.org>
370 * write-po.c (wrap): Treat uClibc like a non-glibc platform.
371 * format-c-parse.h (HANDLE_I_FLAG): Likewise.
372 * po-charset.c (po_lex_charset_set): Likewise.
373 * recode-sr-latin.c (process): Likewise.
374 * x-python.c (set_current_file_source_encoding): Likewise.
375 * xgettext.c (main): Likewise.
377 2010-11-13 Ihar Hrachyshka <ihar.hrachyshka@gmail.com> (tiny change)
379 * plural-table.c (plural_table): Added Belarusian, copied from Russian
382 2010-11-07 Bruno Haible <bruno@clisp.org>
384 format-c.c: Share code with libintlext.
385 * format-c-parse.h: New file, extracted from format-c.c.
386 * format-c.c: Include it.
387 (format_parse_entrails): Remove function.
388 * Makefile.am (FORMAT_SOURCE): Add format-c-parse.h.
391 2010-11-07 Bruno Haible <bruno@clisp.org>
393 format-c.c: Prepare for sharing code with libintlext.
394 * format-c.c: Move INVALID_* macros.
396 (SYSDEP_SEGMENTS_PROCESSED): New macro.
397 (FAT_BASIC_MASK): New enumeration value.
398 (HANDLE_I_FLAG): New macro.
399 (format_parse_entrails): New function, extracted from format_parse.
400 Use the IF_OOM, SYSDEP_SEGMENTS_PROCESSED, HANDLE_I_FLAG macros. Handle
401 I64 as a size specifier on native Win32.
402 (format_parse): Rewritten to call format_parse_entrails.
404 2010-11-07 Bruno Haible <bruno@clisp.org>
406 format-c.c: Prepare for sharing code with libintlext.
407 * format-c.c (INVALID_ANGLE_BRACKET, INVALID_IGNORED_ARGUMENT): New
409 (format_parse): Use them.
411 2011-06-07 Bruno Haible <bruno@clisp.org>
413 Rely more on libtool.
414 * Makefile.am (libgettextsrc_la_LDFLAGS): Use -no-undefined always.
415 Don't use @LTNOUNDEF@.
417 2010-06-06 Bruno Haible <bruno@clisp.org>
419 Bug fixes in libgettextpo.
420 * msgl-check.h (check_message_list): Add ignore_untranslated_messages,
421 ignore_fuzzy_messages arguments.
422 * msgl-check.c (check_plural, check_message_list): Likewise.
423 * msgfmt.c (main): Update.
425 2010-06-04 Bruno Haible <bruno@clisp.org>
427 * gettext-0.18.1 released.
429 2010-06-03 Bruno Haible <bruno@clisp.org>
431 xgettext: Recognize language of files ending in .perl.
432 * x-perl.h (EXTENSIONS_PERL): Recognize .perl.
433 Suggested by Ævar Arnfjörð Bjarmason <avarab@gmail.com>.
435 2010-06-03 Bruno Haible <bruno@clisp.org>
437 urlget: Don't attempt to run the Java program if we don't install it.
438 * Makefile.am (USEJAVA): New variable.
439 (DEFS): Define USEJAVA.
440 * urlget.c (fetch): Don't try to use Java is USEJAVA is 0.
442 2010-05-19 Bruno Haible <bruno@clisp.org>
444 Link with libunistring, if it exists.
445 * Makefile.am (LDADD, libgettextsrc_la_LDFLAGS): Add LTLIBUNISTRING.
447 2010-05-18 Bruno Haible <bruno@clisp.org>
449 Correct program dependencies.
450 * Makefile.am (OTHERPROGDEPENDENCIES): New variable.
451 (recode_sr_latin_LDADD): Remove redundant variable.
452 (recode_sr_latin_DEPENDENCIES): Use OTHERPROGDEPENDENCIES.
453 (hostname_DEPENDENCIES, urlget_DEPENDENCIES): New variables.
455 2010-05-09 Bruno Haible <bruno@clisp.org>
457 * gettext-0.18 released.
459 2010-05-09 Bruno Haible <bruno@clisp.org>
461 * msgattrib.c (main): Update year in --version output.
462 * msgcat.c (main): Likewise.
463 * msgcmp.c (main): Likewise.
464 * msgcomm.c (main): Likewise.
465 * msgconv.c (main): Likewise.
466 * msgen.c (main): Likewise.
467 * msgexec.c (main): Likewise.
468 * msgfilter.c (main): Likewise.
469 * msgfmt.c (main): Likewise.
470 * msggrep.c (main): Likewise.
471 * msginit.c (main): Likewise.
472 * msgmerge.c (main): Likewise.
473 * msgunfmt.c (main): Likewise.
474 * msguniq.c (main): Likewise.
475 * xgettext.c (main): Likewise.
477 2010-04-25 Bruno Haible <bruno@clisp.org>
479 Update support of object-pascal-format strings.
480 * format-pascal.c: Update description of format strings.
481 (enum format_arg_type): Remove FAT_INTEGER64.
482 (format_parse): Accept an empty digit sequence before ':'. Treat 'd',
483 'u', 'x' the same way.
486 2010-04-05 Bruno Haible <bruno@clisp.org>
488 Interoperability with mono versions >= 2009-02-27.
489 * write-csharp.c (write_csharp_code): Emit a TableInitialized field.
490 Change ReadResources so that it may be called multiple times, even
492 Reported by Guido Flohr <guido@imperia.net>
494 2010-03-31 Guido Flohr <guido@imperia.net>
496 Improve how xgettext handles Perl syntax ambiguities.
497 * x-perl.c(enum token_type_ty): New enumeration items
498 token_type_number, token_type_object.
499 (struct token_ty): New field 'last_type'.
500 (token2string): Handle token_type_number, token_type_object.
501 (free_token): Likewise.
502 (prefer_division_over_regexp): Remove variable.
503 (extract_variable): Recognize token of type token_type_object.
504 (prefer_regexp_over_division): New function.
505 (last_token_type): Renamed from last_token.
506 (x_perl_prelex): Assign the token's last_type. Recognize token of type
507 token_type_number. Don't special-case "grep" and "split". Invoke
508 prefer_regexp_over_division for disambiguation.
509 (token_stack_dump): Handle token_type_number, token_type_object.
510 (x_perl_lex): Assign the token's last_type. Update last_token_type
512 (collect_message): Invoke prefer_regexp_over_division for
514 (extract_balanced): Don't set last_token_type here. Handle
515 token_type_number, token_type_object.
516 (extract_perl): Initialize last_token_type here.
517 Reported by Guillem Jover <guillem@debian.org> via Santiago Vila.
519 * x-perl.c (x_perl_prelex): Clarify interpolate_keywords arguments.
521 * x-perl.c (eaten_here): Renamed from here_eaten.
522 (phase1_getc, get_here_document, skip_pod, extract_perl): Update.
524 2010-03-13 Bruno Haible <bruno@clisp.org>
526 New options --color, --style for many programs.
527 * msgattrib.c: Include color.h.
528 (long_options): Add options --color, --style.
529 (main): Implement them.
530 (usage): Document them.
531 * msgcomm.c: Include color.h.
532 (long_options): Add options --color, --style.
533 (main): Implement them.
534 (usage): Document them.
535 * msgconv.c: Include color.h.
536 (long_options): Add options --color, --style.
537 (main): Implement them.
538 (usage): Document them.
539 * msgen.c: Include color.h.
540 (long_options): Add options --color, --style.
541 (main): Implement them.
542 (usage): Document them.
543 * msgfilter.c: Include color.h.
544 (long_options): Add options --color, --style.
545 (main): Implement them.
546 (usage): Document them.
547 * msggrep.c: Include color.h.
548 (long_options): Add options --color, --style.
549 (main): Implement them.
550 (usage): Document them.
551 * msginit.c: Include color.h.
552 (long_options): Add options --color, --style.
553 (main): Implement them.
554 (usage): Document them.
555 * msgmerge.c: Include color.h.
556 (long_options): Add options --color, --style.
557 (main): Implement them.
558 (usage): Document them.
559 * msgunfmt.c: Include color.h.
560 (long_options): Add options --color, --style.
561 (main): Implement them.
562 (usage): Document them.
563 * msguniq.c: Include color.h.
564 (long_options): Add options --color, --style.
565 (main): Implement them.
566 (usage): Document them.
567 * xgettext.c: Include color.h.
568 (long_options): Add options --color, --style.
569 (main): Implement them.
570 (usage): Document them.
571 Reported by Kalle Olavi Niemitalo <kon@iki.fi>
572 via Santiago Vila <sanvila@unex.es>.
574 2010-02-20 Bruno Haible <bruno@clisp.org>
576 * plural-table.c (plural_table): Add Bulgarian.
577 Reported by Roumen Petrov <transl@roumenpetrov.info>.
579 2010-02-20 Bruno Haible <bruno@clisp.org>
581 * plural-table.c (plural_table): Sort in the same order as
584 2010-02-17 Bruno Haible <bruno@clisp.org>
586 Fix error in conversion of large PO file (> 4000 msgs) to Java class.
587 * write-java.c: Include minmax.h.
588 (write_java1_init_statements, write_java2_init_statements): New
589 functions, extracted from write_java_code.
590 (write_java_code): If there are many messages, split the initialization
591 code into several static methods.
592 Reported by sasha <predator@savannah.gnu.org>.
594 2009-12-21 Bruno Haible <bruno@clisp.org>
596 * lang-table.c (language_table): Add Mapudungun, Lower Sorbian,
597 Upper Sorbian, Mohawk, Yakut, Southern Sami, Lule Sami, Inari Sami,
599 * msginit.c (catalogname_for_locale): Add Mapudungun, Lower Sorbian,
600 Upper Sorbian, Yakut, Inari Sami, Skolt Sami.
602 2009-12-12 Bruno Haible <bruno@clisp.org>
604 * *.h, *.c, *.y: Untabify.
606 2009-11-28 Bruno Haible <bruno@clisp.org>
608 * x-perl.c (extract_variable): Fix tp->type when returning at EOF.
609 Reported by Guido Flohr <guido@imperia.bg>.
611 2009-11-15 Bruno Haible <bruno@clisp.org>
613 * x-python.c: Update comments regarding PEP 0263.
615 2009-09-05 Bruno Haible <bruno@clisp.org>
617 * write-po.c (wrap): Remove unused initialization.
618 * x-glade.c (comment_handler): Likewise.
619 * xgettext.c (flag_context_list_table_insert): Add comment.
620 Found by clang's static analyzer.
622 2009-08-30 Bruno Haible <bruno@clisp.org>
624 Accommodate the Solaris iconv_open function, which cannot convert
625 directly between many pairs of encodings.
626 * msgl-iconv.h (convert_string_directly): Renamed from convert_string.
627 * msgl-iconv.c: Include xstriconveh.h.
628 (convert_string_directly): Renamed from convert_string.
629 (convert_string): New function.
630 (convert_string_list, convert_prev_msgid, convert_msgid,
631 iconvable_string_list, iconvable_prev_msgid, iconvable_msgid): Change
632 argument type to 'const iconveh_t *'.
633 (convert_msgstr, iconvable_string, iconvable_msgstr): Likewise. Invoke
634 xmem_cd_iconveh instead of xmem_cd_iconv.
635 (iconv_message_list_internal, is_message_list_iconvable): Invoke
636 iconveh_open, iconveh_close instead of iconv_open, iconv_close.
637 * xgettext.c (from_current_source_encoding): Update.
639 2009-08-16 Bruno Haible <bruno@clisp.org>
641 Reduce dependency on project-id heuristic.
642 * msginit.c (project_id): Add header argument. Return first part of
643 Project-Id-Version field if present.
644 (fill_header): Update.
646 2009-08-13 Bruno Haible <bruno@clisp.org>
648 * msgexec.c: Include msgl-charset.h.
649 (main): Invoke compare_po_locale_charsets.
650 (process_string): Add comment.
651 * msgfilter.c (process_message): Likewise.
653 2009-08-10 Bruno Haible <bruno@clisp.org>
656 * msgfilter.c (sub_argv): Change type to 'const char **'.
659 2009-08-10 Bruno Haible <bruno@clisp.org>
661 Use type 'ucs4_t' more often. Avoids gcc warnings on Cygwin.
662 * po-lex.c (struct mbchar): Change type of 'uc'.
664 * read-properties.c (read_escaped_string): Change type of local
666 * read-stringtable.c (phase2_getc): Likewise.
667 * write-properties.c (conv_to_java, write_escaped_string): Change type
668 of local variables 'uc', 'uc1', 'uc2'.
669 * write-java.c (string_hashcode, write_java_string): Likewise.
670 * write-csharp.c (construct_class_name, write_csharp_string): Change
671 type of local variable 'uc'.
672 * write-tcl.c (write_tcl_string): Likewise.
673 * write-qt.c (conv_to_iso_8859_1, conv_to_utf16): Likewise.
674 * x-python.c (phase2_getc, mixed_string_buffer_append): Likewise.
675 (mixed_string_buffer_append_unicode): Change argument type to 'ucs4_t'.
676 * x-java.c (string_buffer_append): Change type of local variable 'uc'.
677 (string_buffer_append_unicode): Change argument type to 'ucs4_t'.
678 * x-csharp.c (phase2_getc): Change type of local variable 'uc'.
680 2009-08-04 Bruno Haible <bruno@clisp.org>
682 Port msgfilter to Woe32 platforms.
683 * msgfilter.c: Don't include errno.h, fcntl.h, io.h, sys/select.h,
684 pipe.h, wait-process.h. Include pipe-filter.h instead.
685 (HAVE_SELECT): Remove undefine.
686 (nonintr_close, nonintr_read, nonintr_write, nonintr_select): Remove
688 (O_NONBLOCK): Remove fallback.
689 (IS_EAGAIN): Remove macro.
690 (struct locals): New type.
691 (prepare_write, done_write, prepare_read, done_read): New functions.
692 (generic_filter): Implement using pipe_filter_ii_execute.
694 2009-07-27 Часлав Илић (Chusslove Illich) <caslav.ilic@gmx.net>
696 Extend recode-sr-latin to also transform letters with accents.
697 * filter-sr-latin.c (table): Add entries for letters with accents.
698 (IS_UPPERCASE_CYRILLIC): Recognize also U+04E2, U+04EE.
699 (serbian_to_latin): Update.
701 2009-06-06 Bruno Haible <bruno@clisp.org>
703 * x-perl.c (x_perl_prelex): Recognize the perl 5.10 operator '//'.
704 Reported by Kevin Ryde <user42@zip.com.au>.
706 2009-05-29 Bruno Haible <bruno@clisp.org>
708 Improve msgfmt error message about format directive mismatches
710 * format.h (struct formatstring_parser): Add pretty_msgid argument to
712 * format-awk.c (format_check): Add pretty_msgid argument.
713 * format-boost.c (format_check): Likewise.
714 * format-c.c (format_check): Likewise.
715 * format-csharp.c (format_check): Likewise.
716 * format-elisp.c (format_check): Likewise.
717 * format-gcc-internal.c (format_check): Likewise.
718 * format-gfc-internal.c (format_check): Likewise.
719 * format-java.c (format_check): Likewise.
720 * format-kde.c (format_check): Likewise.
721 * format-librep.c (format_check): Likewise.
722 * format-lisp.c (format_check): Likewise.
723 * format-pascal.c (format_check): Likewise.
724 * format-perl-brace.c (format_check): Likewise.
725 * format-perl.c (format_check): Likewise.
726 * format-php.c (format_check): Likewise.
727 * format-python.c (format_check): Likewise.
728 * format-qt.c (format_check): Likewise.
729 * format-qt-plural.c (format_check): Likewise.
730 * format-scheme.c (format_check): Likewise.
731 * format-sh.c (format_check): Likewise.
732 * format-tcl.c (format_check): Likewise.
733 * format-ycp.c (format_check): Likewise.
734 * format.c (check_msgid_msgstr_format_i): Pass either "msgid" or
735 "msgid_plural" as pretty_msgid argument.
737 2009-05-23 Bruno Haible <bruno@clisp.org>
739 * Makefile.am (libgettextsrc_la_LINK, msgattrib_LINK, msgcat_LINK,
740 msgcomm_LINK, msgconv_LINK, msgen_LINK, msgfilter_LINK, msggrep_LINK,
741 msgmerge_LINK, msguniq_LINK, xgettext_LINK): Add $(AM_V_lt) flag.
743 2009-05-16 Bruno Haible <bruno@clisp.org>
745 Extract comments meant for translators from Glade input files.
746 * xgettext.h (remember_a_message): Add 'extracted_comment' argument.
747 * xgettext.c (remember_a_message): Likewise.
748 (arglist_parser_done): Update.
749 * x-glade.c (struct element_state): Add field 'extracted_comment'.
750 (start_element_handler): Fill it.
751 (end_element_handler): Pass it to 'remember_a_message', free it.
752 * x-awk.c (extract_parenthesized): Update.
753 * x-c.c (extract_parenthesized): Update.
754 * x-csharp.c (extract_parenthesized): Update.
755 * x-elisp.c (read_object): Update.
756 * x-java.c (extract_parenthesized): Update.
757 * x-librep.c (read_object): Update.
758 * x-lisp.c (read_object): Update.
759 * x-perl.c (extract_variable, interpolate_keywords, extract_balanced):
761 * x-php.c (extract_balanced): Update.
762 * x-python.c (extract_balanced): Update.
763 * x-rst.c (extract_rst): Update.
764 * x-scheme.c (read_object): Update.
765 * x-sh.c (read_word, read_command): Update.
766 * x-smalltalk.c (extract_smalltalk): Update.
767 * x-tcl.c (read_command): Update.
768 * x-ycp.c (extract_parenthesized): Update.
769 Reported by <sandro.bonazzola@gmail.com>
770 at <https://savannah.gnu.org/bugs/?26570>.
772 2009-03-29 Bruno Haible <bruno@clisp.org>
774 * message.h (format_type): New enum value 'format_gfc_internal'.
775 (NFORMATS): Increment.
776 * message.c (format_language): Add format_gfc_internal entry.
777 (format_language_pretty): Likewise.
778 * format.h (formatstring_gfc_internal): New declaration.
779 * format-gfc-internal.c: New file.
780 * format.c (formatstring_parsers): Add formatstring_gfc_internal.
781 * x-c.h (SCANNERS_C): In language GCC-source, also keep track of
782 gfc-internal-format format strings.
783 * x-c.c (init_flag_table_gcc_internal): Also register flags for
785 * xgettext.c (xgettext_record_flag): Store gfc-internal-format flags in
786 flag_table_gcc_internal.
787 * Makefile.am (FORMAT_SOURCE): Add format-gfc-internal.c.
789 Reported by Göran Uddeborg <goeran@uddeborg.se>.
791 2009-01-27 Bruno Haible <bruno@clisp.org>
793 * message.h (format_type): New enum value 'format_qt_plural'.
794 (NFORMATS): Increment.
795 * message.c (format_language): Add format_qt_plural entry.
796 (format_language_pretty): Likewise.
797 * format.h (formatstring_qt_plural): New declaration.
798 * format-qt-plural.c: New file.
799 * format.c (formatstring_parsers): Add formatstring_qt_plural.
800 * xgettext.h (struct flag_context_ty): Add fields is_format3,
802 * xgettext.c (struct extractor_ty): Add field formatstring_parser3.
803 (inherited_context, flag_context_list_table_insert): Handle the new
804 flag_context_ty fields.
805 (xgettext_record_flag): Handle format_qt_plural.
806 (current_formatstring_parser3): New variable.
807 (extract_from_file): Initialize it.
808 (set_format_flags_from_context): Handle the new flag_context_ty fields.
809 (remember_a_message, remember_a_message_plural): Handle
810 current_formatstring_parser3. Avoid adding a c-format flag to a message
811 already flagged as qt-plural-format.
812 (arglist_parser_remember): Allow argnum1 and argnum2 in the call shape
814 (arglist_parser_done): Add special recognition of qt-plural-format
816 (language_to_extractor): Set the formatstring_parser3 in the result.
817 * Makefile.am (FORMAT_SOURCE): Add format-qt-plural.c.
820 2009-01-27 Bruno Haible <bruno@clisp.org>
822 * plural-table.c (plural_table): Put Turkish under nplurals=2.
823 Reported by Sertaç Ö. Yıldız <sertacyildiz@gmail.com>.
825 2009-01-26 Bruno Haible <bruno@clisp.org>
827 * msgattrib.c (main): Update year in --version output.
828 * msgcat.c (main): Likewise.
829 * msgcmp.c (main): Likewise.
830 * msgcomm.c (main): Likewise.
831 * msgconv.c (main): Likewise.
832 * msgen.c (main): Likewise.
833 * msgexec.c (main): Likewise.
834 * msgfilter.c (main): Likewise.
835 * msgfmt.c (main): Likewise.
836 * msggrep.c (main): Likewise.
837 * msginit.c (main): Likewise.
838 * msgmerge.c (main): Likewise.
839 * msgunfmt.c (main): Likewise.
840 * msguniq.c (main): Likewise.
841 * xgettext.c (main): Likewise.
842 * urlget.c (main): Likewise.
844 2009-01-25 Bruno Haible <bruno@clisp.org>
846 Fix bug introduced on 2005-10-01.
847 * msgl-charset.c (compare_po_locale_charsets): Fix recognition of
850 2009-01-25 Bruno Haible <bruno@clisp.org>
852 Fix bug introduced on 2008-10-04.
853 * read-catalog-abstract.c (po_parse_comment_special): Initialize
855 Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
857 2009-01-18 Bruno Haible <bruno@clisp.org>
859 * msgfmt.c: Include str-list.h.
860 (main): When --statistics and --verbose are both specified, output the
861 input file name in front of the statistics line.
862 Suggested by Vincent Lefevre <vincent@vinc17.org>.
864 2009-01-18 Bruno Haible <bruno@clisp.org>
866 Allow multiple levels of verbosity in 'msgfmt'.
867 * msgfmt.h (verbose): Change from 'bool' to 'int'.
868 * msgfmt.c (verbose): Likewise.
869 (main): Increment 'verbose' for each --verbose option.
870 * write-java.c (msgdomain_write_java): Update.
871 * write-csharp.c (msgdomain_write_csharp): Update.
872 * write-resources.c (msgdomain_write_csharp_resources): Update.
874 2009-01-18 Bruno Haible <bruno@clisp.org>
876 * str-list.h (string_list_join): Change the separator argument,
877 allowing an entire separator string.
878 * str-list.c (string_list_join): Likewise.
880 2009-01-18 Bruno Haible <bruno@clisp.org>
882 Fix a '(null)' in an error message. Bug present since gettext-0.16.
883 * read-catalog.h (DEFAULT_CATALOG_READER_TY): Add a file_name field.
884 * read-catalog.c (read_catalog_stream): Initialize it.
885 * x-po.c (extract): Likewise.
886 * msgfmt.c (read_catalog_file_msgfmt): Likewise.
887 (msgfmt_parse_debrief): Use the file_name field from the catalog reader
888 instead of gram_pos.file_name.
890 2009-01-17 Bruno Haible <bruno@clisp.org>
892 Update after gnulib changed.
893 * Makefile.am (RELOCATABLE_STRIP): New variable.
895 2008-12-07 Bruno Haible <bruno@clisp.org>
897 * write-po.c (message_print_comment_filepos): Use a 'const' pointer
899 * write-stringtable.c (write_message): Likewise.
901 2008-12-07 Bruno Haible <bruno@clisp.org>
903 Avoid gcc -Wredundant-decls warnings.
904 * x-awk.c: Don't include the specification header file twice.
906 * x-csharp.c: Likewise.
907 * x-elisp.c: Likewise.
908 * x-glade.c: Likewise.
909 * x-java.c: Likewise.
910 * x-librep.c: Likewise.
911 * x-lisp.c: Likewise.
912 * x-perl.c: Likewise.
915 * x-python.c: Likewise.
917 * x-scheme.c: Likewise.
919 * x-smalltalk.c: Likewise.
923 2008-11-14 Bruno Haible <bruno@clisp.org>
925 * msgfilter.c: Include xvasprintf.h, xsetenv.h.
926 (process_message): Set the environment variables MSGFILTER_MSGCTXT,
927 MSGFILTER_MSGID, MSGFILTER_LOCATION.
929 2008-10-28 Bruno Haible <bruno@clisp.org>
931 * msgmerge.c (match_domain): Remove space between '#' and 'pragma' for
933 Reported by Lamarque Eric <eric.lamarque@free.fr>.
935 2008-10-04 Bruno Haible <bruno@clisp.org>
937 * plural-distrib.h (struct plural_distribution): New field 'histogram'.
938 * format.h (check_msgid_msgstr_format_i, check_msgid_msgstr_format):
940 * format.c (check_msgid_msgstr_format_i): Add range argument. Set
941 strict_checking to false if, due to the range, the plural forms applies
942 to only one value of n.
943 (check_msgid_msgstr_format): Add range argument.
944 * msgl-check.c (plural_expression_histogram): New function.
945 (check_plural_eval, check_plural): Update.
946 (check_pair): Pass the range to check_msgid_msgstr_format.
947 (check_message_list): Update.
948 * msgmerge.c (message_merge): Pass the range to
949 check_msgid_msgstr_format_i.
950 Reported by Anatoly Techtonik <techtonik@gmail.com>
951 via <https://savannah.gnu.org/bugs/?24433>.
953 2008-10-04 Bruno Haible <bruno@clisp.org>
955 * message.h (struct argument_range): New type.
956 (has_range_p): New macro.
957 (struct message_ty): Add field 'range'.
958 * message.c (message_alloc): Initialize the 'range' field.
959 (message_copy): Copy the 'range' field.
960 * read-catalog-abstract.h (po_parse_comment_special): Add 'rangep'
962 * read-catalog-abstract.c: Include <limits.h>.
963 (po_parse_comment_special): Add 'rangep' argument. Parse the range
965 * read-catalog.h (DEFAULT_CATALOG_READER_TY): Add 'range' field.
966 * read-catalog.c (default_constructor): Initialize the 'range' field.
967 (default_copy_comment_state): Copy the 'range' field into the new
969 (default_reset_comment_state): Clear the 'range' field.
970 (default_comment_special): Update.
971 * write-po.h (make_range_description_string): New declaration.
972 * write-po.c (make_range_description_string): New function.
973 (message_print_comment_flags): Also print the range.
974 * write-stringtable.c (write_message): Likewise.
975 * msgl-cat.c: Include <limits.h>.
976 (catenate_msgdomain_list): Fill in the range of the resulting messages.
977 * msgl-equal.c (message_equal): Compare also the ranges.
978 * msgmerge.c (message_merge): Fill in the range of the resulting
979 message. Set it fuzzy if a range was introduced or extended.
980 * xgettext.c (remember_a_message): Set the range of the new message.
982 2008-10-03 Bruno Haible <bruno@clisp.org>
984 * plural-distrib.h: New file.
985 * format.h: Include plural-distrib.h.
986 (check_msgid_msgstr_format_i, check_msgid_msgstr_format): Replace
987 plural_distribution, plural_distribution_length arguments with a single
988 distribution argument.
989 * format.c (check_msgid_msgstr_format_i, check_msgid_msgstr_format):
991 * msgl-check.h: Include plural-distrib.h.
992 (check_plural_eval, check_message): Replace plural_distribution,
993 plural_distribution_length arguments with a single distribution
995 * msgl-check.c (check_plural_eval): Likewise. Free array in case of
997 (check_plural): Replace plural_distribution, plural_distribution_length
998 arguments with a single distribution argument. Don't store a
999 distribution result when there are errors.
1000 (check_pair, check_message): Replace plural_distribution,
1001 plural_distribution_length arguments with a single distribution
1003 (check_message_list): Update.
1004 * msgmerge.c (message_merge: Replace plural_distribution,
1005 plural_distribution_length arguments with a single distribution
1007 (match_domain): Update.
1008 * Makefile.am (noinst_HEADERS): Add plural-distrib.h.
1009 * FILES: Mention plural-distrib.h.
1011 2008-09-28 Bruno Haible <bruno@clisp.org>
1013 * write-catalog.c (msgdomain_list_print): Open the output stream in
1014 binary mode, for consistency with the term_styled_ostream or fd_stream
1017 2008-09-28 Bruno Haible <bruno@clisp.org>
1019 * Makefile.am (msg*_DEPENDENCIES, xgettext_DEPENDENCIES,
1020 recode_sr_latin_DEPENDENCIES): Add $(WOE32_LDADD).
1022 2008-09-28 Bruno Haible <bruno@clisp.org>
1024 * msgexec.c (process_string): Don't die from SIGPIPE if the subprocess
1025 does not want our input.
1026 Reported by Rainer Tammer <tammer@tammer.net>.
1028 2008-09-28 Bruno Haible <bruno@clisp.org>
1030 * Makefile.am (msgcmp_LDADD): Add MSGMERGE_LIBM.
1031 Reported by Rainer Tammer <tammer@tammer.net>.
1033 2008-09-27 Bruno Haible <bruno@clisp.org>
1035 * lang-table.c (language_table): Add Asturian, Crimean Tatar, Friulian,
1037 * msginit.c (catalogname_for_locale): Add Asturian, Friulian,
1040 2008-09-26 Bruno Haible <bruno@clisp.org>
1042 * write-catalog.c (cmp_by_msgid, cmp_by_filepos): Compare the msgctxt
1043 fields if the msgid fields are the same.
1044 Reported by Rainer Tammer <tammer@tammer.net>.
1046 2008-09-15 Bruno Haible <bruno@clisp.org>
1048 * Makefile.am (msg*_DEPENDENCIES, xgettext_DEPENDENCIES,
1049 recode_sr_latin_DEPENDENCIES): New variables.
1051 2008-09-15 Bruno Haible <bruno@clisp.org>
1053 * msgl-fsearch.h: Include stdbool.h.
1054 (message_fuzzy_index_search): Add 'heuristic' argument.
1055 * msgl-fsearch.c (message_fuzzy_index_search): Likewise. If !heuristic,
1056 consider all messages.
1057 * msgmerge.c (struct definitions_ty): Add fields 'curr_findex',
1058 'curr_findex_init_lock'.
1059 (definitions_init): Initialize them.
1060 (definitions_set_current_list): Clear the previous curr_findex.
1061 (definitions_init_curr_findex): New function.
1062 (definitions_search_fuzzy): Do fuzzy matching by calling
1063 message_fuzzy_index_search on a hashed index, rather than through
1064 message_list_search_fuzzy.
1065 (definitions_destroy): Update.
1066 (merge): Determine the definitions' canonical encoding.
1067 * msgcmp.c: Include xmalloca.h, po-charset.h, msgl-fsearch.h.
1068 (match_domain): Add defmlp_findex, def_canon_charset arguments. Do
1069 fuzzy matching by calling message_fuzzy_index_search on a hashed
1070 index, rather than through message_list_search_fuzzy.
1071 (compare): Determine the definitions' canonical encoding. Prepare room
1072 for a lazily allocated hashed index.
1073 * Makefile.am (msgcmp_SOURCES): Add msgl-fsearch.c.
1075 2008-09-15 Bruno Haible <bruno@clisp.org>
1077 * msgcmp.c (use_fuzzy_matching): New variable.
1078 (long_options): Add option -N/--no-fuzzy-matching.
1079 (main, match_domain): Implement it.
1080 (usage): Document it.
1082 2008-09-14 Bruno Haible <bruno@clisp.org>
1084 * msgl-fsearch.h (message_fuzzy_index_search): Add 'lower_bound'
1086 * msgl-fsearch.c (message_fuzzy_index_search): Likewise.
1087 * msgmerge.c (definitions_search_fuzzy): Use the result of the fuzzy
1088 search in the current list as a lower bound for the fuzzy search in the
1091 2008-09-14 Bruno Haible <bruno@clisp.org>
1093 * message.h (message_list_search_fuzzy, FUZZY_THRESHOLD): Clarify
1096 * msgmerge.c (struct definitions_ty): Rename field 'findex' to
1097 'comp_findex', and 'findex_init_lock' to 'comp_findex_init_lock'.
1098 (definitions_init): Update.
1099 (definitions_init_comp_findex): Renamed from definitions_init_findex.
1101 (definitions_search_fuzzy, definitions_destroy): Update.
1103 * msgmerge.c (definitions_current_list, definitions_set_current_list):
1106 2008-09-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1107 Bruno Haible <bruno@clisp.org>
1109 * message.h (fuzzy_search_goal_function): Add 'lower_bound' argument.
1110 * message.c (fuzzy_search_goal_function): Likewise. Use fstrcmp_bounded
1112 (message_list_search_fuzzy_inner): Pass fuzzy_search_goal_function the
1113 best weight known so far, to shortcut computations.
1114 * msgl-fsearch.c (message_fuzzy_index_search): Likewise.
1115 * msgmerge.c (definitions_search_fuzzy): Update
1116 fuzzy_search_goal_function calls.
1118 2008-09-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1119 Bruno Haible <bruno@clisp.org>
1121 * xgettext.c: Include concat-filename.h.
1122 (main, xgettext_open): Use xconcatenated_filename instead of
1123 concatenated_filename.
1125 2008-09-01 Bruno Haible <bruno@clisp.org>
1127 * color.c: Include concat-filename.h.
1128 (style_file_lookup, style_file_prepare): Use xconcatenated_filename
1129 instead of concatenated_filename.
1130 * msginit.c: Include concat-filename.h instead of filename.h.
1131 (project_id, project_id_version): Use xconcatenated_filename instead of
1132 concatenated_filename.
1133 * open-catalog.c: Include concat-filename.h.
1134 (try_open_catalog_file): Use xconcatenated_filename instead of
1135 concatenated_filename.
1136 * read-csharp.c: Include concat-filename.h instead of filename.h.
1137 (msgdomain_read_csharp): Use xconcatenated_filename instead of
1138 concatenated_filename.
1139 * read-resources.c: Include concat-filename.h instead of filename.h.
1140 (read_resources_file): Use xconcatenated_filename instead of
1141 concatenated_filename.
1142 * read-tcl.c: Include concat-filename.h instead of filename.h.
1143 (msgdomain_read_tcl): Use xconcatenated_filename instead of
1144 concatenated_filename.
1145 * write-resources.c: Include concat-filename.h instead of filename.h.
1146 (msgdomain_write_csharp_resources): Use xconcatenated_filename instead of
1147 concatenated_filename.
1148 * write-csharp.c: Include concat-filename.h instead of filename.h.
1149 (msgdomain_write_csharp): Use xconcatenated_filename instead of
1150 concatenated_filename.
1151 * write-java.c: Include concat-filename.h instead of filename.h.
1152 (msgdomain_write_java): Use xconcatenated_filename instead of
1153 concatenated_filename.
1154 * write-tcl.c: Include concat-filename.h instead of filename.h.
1155 (msgdomain_write_tcl: Use xconcatenated_filename instead of
1156 concatenated_filename.
1158 2008-08-31 Bruno Haible <bruno@clisp.org>
1160 * msgexec.c: Include <signal.h>.
1161 (main): Block SIGPIPE for the duration of the processing.
1163 2008-08-23 Bruno Haible <bruno@clisp.org>
1165 Fix behaviour of "msgmerge --update" when sorting is requested and
1166 obsolete messages are present.
1167 * write-catalog.h (struct catalog_output_format): New field
1168 'sorts_obsoletes_to_end'.
1169 * write-po.c (output_format_po): Initialize it to true.
1170 * write-properties.c (output_format_properties): Initialize it to false.
1171 * write-stringtable.c (output_format_stringtable): Likewise.
1172 * msgmerge.c (msgdomain_list_stablesort_by_obsolete): New function.
1173 (main): Before testing whether the result is the same as the old
1174 contents, sort the result using msgdomain_list_stablesort_by_obsolete.
1175 Reported by Vincent Danjean <vdanjean.abo@free.fr>
1176 via <http://savannah.gnu.org/bugs/?24123>.
1178 2008-08-16 Bruno Haible <bruno@clisp.org>
1180 * x-python.c (enum token_type_ty): New values token_type_lbracket,
1181 token_type_rbracket.
1182 (phase5_get): Recognize also token_type_lbracket, token_type_rbracket.
1183 (extract_balanced): Renamed from extract_parenthesized. Add 'delim'
1184 argument. Handle token_type_lbracket and token_type_rbracket.
1185 (extract_python): Update.
1186 Reported by Claude Paroz <claude@2xlibre.net>
1187 via <http://savannah.gnu.org/bugs/?23824>.
1189 2008-08-16 Bruno Haible <bruno@clisp.org>
1191 * x-php.c (extract_balanced): Fix small bug in 2007-03-17 commit.
1193 2008-08-15 Bruno Haible <bruno@clisp.org>
1195 * format-python.c (format_parse): For %.0s and %.0r, set the type to
1197 (format_check): When strict equality is not desired, compare FORMAT_ANY
1198 as matching any type.
1199 Reported by Alexander Dupuy <alex.dupuy@mac.com> in
1200 <http://savannah.gnu.org/bugs/?24025>.
1202 2008-08-14 Bruno Haible <bruno@clisp.org>
1204 * format-python.c (format_parse): For '%', set the type to FAT_NONE.
1206 2008-08-14 Bruno Haible <bruno@clisp.org>
1208 * format-python.c (format_check): Require the same number of unnamed
1209 arguments also when !equality.
1210 Reported by Alexander Dupuy <alex.dupuy@mac.com> in
1211 <http://savannah.gnu.org/bugs/?24025>.
1213 2008-08-14 Bruno Haible <bruno@clisp.org>
1215 * msgmerge.c: Include "glthread/lock.h" instead of "lock.h".
1217 2008-08-03 Bruno Haible <bruno@clisp.org>
1219 * x-python.c (mixed_string_buffer_append): Replace a lone high
1220 surrogate with U+FFFD.
1221 Reported by Yann <asterix@lagaule.org>
1222 via Santiago Vila <sanvila@unex.es>.
1224 2008-07-19 Bruno Haible <bruno@clisp.org>
1226 * gnu/gettext/GetURL.java: Don't output anything to standard error.
1227 Instead, set exit code to indicate failure reason.
1228 * urlget.c (verbose): New variable.
1229 (long_options): Add --quiet, --silent option.
1230 (main): Implement --quiet, --silent option.
1231 (usage): Document --quiet, --silent option.
1232 (java_exitcode): New variable.
1233 (execute_it): Set it. Return false also when the exit code is 2.
1234 (fetch): Implement verbosity to standard error here.
1235 Reported by 宋浩 <baritono.tux@gmail.com>.
1237 2008-06-10 Bruno Haible <bruno@clisp.org>
1239 * msgexec.c (process_string): Update for changed signature of
1241 * msgfilter.c (generic_filter): Likewise.
1242 * msginit.c (project_id, project_id_version, get_user_email,
1243 language_team_address): Likewise.
1244 * read-csharp.c (execute_and_read_po_output): Likewise.
1245 * read-java.c (execute_and_read_po_output): Likewise.
1246 * read-resources.c (execute_and_read_po_output): Likewise.
1247 * read-tcl.c (msgdomain_read_tcl): Likewise.
1248 * write-resources.c (execute_writing_input): Likewise.
1249 * urlget.c (execute_it, fetch): Update for changed signature of
1252 2008-05-26 Bruno Haible <bruno@clisp.org>
1254 * msginit.c (get_field, put_field): Recognize a field also if there is
1255 no space after the ':'.
1256 Reported by Nacho <nacho.resa@gmail.com>.
1258 2008-05-16 Bruno Haible <bruno@clisp.org>
1260 * msgl-iconv.c (iconvable_prev_msgid): Fix typo.
1261 Reported by Karl Eichwalder <ke@novell.com>
1262 via Philipp Thomas <pth@novell.com>
1263 at <https://bugzilla.novell.com/show_bug.cgi?id=391372>.
1265 2008-05-10 Bruno Haible <bruno@clisp.org>
1267 * write-po.c: Include unilbrk.h instead of linebreak.h.
1269 * po-lex.c: Don't include linebreak.h.
1271 2008-04-25 Bruno Haible <bruno@clisp.org>
1273 * lang-table.c (language_table): Add Beja. Remove Adangme, Banda,
1274 Batak. Update Scottish Gaelic, Central Khmer, Romansh.
1275 * msginit.c (catalogname_for_locale: Add Beja. Remove Banda, Batak.
1276 Update Scottish Gaelic, Central Khmer, Romansh.
1278 2008-04-20 Bruno Haible <bruno@clisp.org>
1280 Improve error message.
1281 * xgettext.h (lexical_context_ty): New type.
1282 (non_ascii_error_message): New declaration.
1283 (from_current_source_encoding): Add lcontext argument.
1284 * xgettext.c (non_ascii_error_message): New function.
1285 (from_current_source_encoding): Add lcontext argument. Use
1286 non_ascii_error_message.
1287 (CONVERT_STRING): Add lcontext argument.
1288 (remember_a_message, remember_a_message_plural): Update.
1289 * x-csharp.c (lexical_context): New variable.
1290 (phase2_getc): Use non_ascii_error_message.
1291 (comment_start, comment_line_end, phase6_get): Set lexical_context.
1292 (extract_csharp): Initialize lexical_context.
1293 * x-java.c (struct string_buffer): Add lcontext field.
1294 (init_string_buffer): Add lcontext argument.
1295 (string_buffer_flush_curr_buffer): Update from_current_source_encoding
1297 (comment_start): Set lcontext.
1298 (phase5_get): Pass lcontext argument.
1299 * x-perl.c (get_here_document, phase2_getc,
1300 extract_quotelike_pass1_utf8): Pass lcontext argument.
1301 * x-python.c (lexical_context): New variable.
1302 (phase2_getc): Use non_ascii_error_message.
1303 (comment_start, comment_line_end, phase6_get): Set lexical_context.
1304 (struct mixed_string_buffer): Add lcontext field.
1305 (init_mixed_string_buffer): Add lcontext argument.
1306 (mixed_string_buffer_flush_curr_buffer): Update
1307 from_current_source_encoding call.
1308 (phase5_get): Set lexical_context. Pass lcontext argument.
1309 (extract_python): Initialize lexical_context.
1310 Reported by Mark Weyer.
1312 2008-04-20 Bruno Haible <bruno@clisp.org>
1314 * xgettext.c (usage): Clarify single-letter options that take an
1315 optional argument: -c, -k, -m, -M.
1317 2008-04-16 Bruno Haible <bruno@clisp.org>
1319 * msginit.c (catalogname_for_locale): Add entries for Maori, Uighur.
1321 2008-02-20 Jakub Jelinek <jakub@redhat.com>
1322 Bruno Haible <bruno@clisp.org>
1324 * format-gcc-internal.c: Update for GCC 4.3.
1325 (FAT_TREE_STATEMENT): New enum item.
1326 (format_parse): Recognize %K.
1327 (format_print): Update.
1329 2008-02-04 Bruno Haible <bruno@clisp.org>
1331 * msgmerge.c (match_domain): Remove the prev_msgid fields also from
1332 the untranslated messages.
1333 Reported by Yukiko Bando <ybando@k6.dion.ne.jp> via
1334 Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>.
1336 2008-02-04 Bruno Haible <bruno@clisp.org>
1338 * msgmerge.c (message_merge): Store the prev_msgid field also if the
1339 resulting message is not fuzzy: it might be marked as fuzzy later.
1340 (match_domain): Remove the prev_msgid fields from the non-fuzzy
1343 2008-01-29 Bruno Haible <bruno@clisp.org>
1345 * write-po.c (wrap): Change the severity of the "should not contain
1346 escape sequence" message from PO_SEVERITY_ERROR to PO_SEVERITY_WARNING.
1347 Reported by Kerb <ykerb2@free.fr>.
1349 2008-01-13 Bruno Haible <bruno@clisp.org>
1351 * Makefile.am (noinst_headers): Add msgl-header.h.
1353 2007-12-24 Bruno Haible <bruno@clisp.org>
1355 Introduce 'Language' header field.
1356 * xgettext.c (construct_header): Add an empty 'Language' field.
1357 * msginit.c (language_value): New function.
1358 (fields): Add 'Language'.
1359 * msgmerge.c: Include lang-table.h.
1360 (catalogname): New variable.
1361 (long_options): Add --lang option.
1362 (main): Handle --lang option.
1363 (usage): Document --lang option.
1364 (message_merge): Set the 'Language' field if --lang was specified or
1365 if it is missing and can be inferred from the 'Language-Team' field.
1366 * msgl-header.h: New file.
1367 * msgl-header.c: New file.
1368 * msgcat.c: Include msgl-header.h.
1369 (long_options): Add --lang option.
1370 (main): Handle --lang option.
1371 (usage): Document --lang option.
1372 * msgen.c: Include msgl-header.h.
1373 (long_options): Add --lang option.
1374 (main): Handle --lang option.
1375 (usage): Document --lang option.
1376 * msgl-check.c (plural_help): Look at the 'Language' field before
1377 looking at the 'Language-Team' field.
1378 (check_header_entry): Fix comparison with default value. When the
1379 'Language' field is missing, signal a warning.
1380 * Makefile.am (libgettextsrc_la_SOURCES): Add msgl-header.c.
1381 (msgmerge_SOURCES): Add lang-table.c.
1384 2007-12-22 Bruno Haible <bruno@clisp.org>
1386 * write-po.c (wrap): Avoid breaking line in the middle of a format
1388 Reported by Dwayne Bailey <dwayne@translate.org.za>.
1390 2007-11-07 Jim Meyering <meyering@redhat.com>
1391 Bruno Haible <bruno@clisp.org>
1393 * write-catalog.c (msgdomain_list_print): Fix open() call.
1395 2007-11-07 Bruno Haible <bruno@clisp.org>
1397 * gettext-0.17 released.
1399 2007-10-28 Bruno Haible <bruno@clisp.org>
1401 * color.c (style_file_lookup): New function.
1402 (style_file_prepare): Use it.
1404 2007-10-21 Bruno Haible <bruno@clisp.org>
1406 Normalize the leading space of every comment line during input, not
1408 * read-catalog-abstract.c (po_callback_comment_dispatcher): Before
1409 calling po_callback_comment or po_callback_comment_dot, drop the
1411 * write-po.c (message_print_comment, message_print_comment_dot): Don't
1412 remove the leading space of every comment line.
1413 * write-stringtable.c (write_message): Likewise.
1414 Suggested by Dwayne Bailey <dwayne@translate.org.za>.
1416 2007-10-20 Bruno Haible <bruno@clisp.org>
1418 * msgmerge.c (message_merge): Set the fuzzy flag if the msgid_plural
1420 Suggested by Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>.
1422 2007-10-20 Bruno Haible <bruno@clisp.org>
1424 Make msgmerge's introduction of fuzzy markers more consistent with
1425 msgfmt's --check-format.
1426 * format.h (check_msgid_msgstr_format_i): New declaration.
1427 * format.c (check_msgid_msgstr_format_i): New function, extracted from
1428 check_msgid_msgstr_format.
1429 (check_msgid_msgstr_format): Use it.
1430 * msgl-check.h: Include plural-eval.h.
1431 (check_plural_eval): New declaration.
1432 * msgl-check.c (check_plural_eval): Add const to first parameter. Make
1434 (check_plural): Update.
1435 * msgmerge.c: Include plural-exp.h, msgl-check.h, po-xerror.h.
1436 (msgfmt_check_pair_fails): Remove function.
1437 (silent_error_logger, silent_xerror): New functions.
1438 (message_merge): Add plural_distribution, plural_distribution_length
1439 arguments. Call check_msgid_msgstr_format_i instead of
1440 msgfmt_check_pair_fails.
1441 (match_domain): Extract not only the plural count, but also the
1442 plural expression from the header entry. Determine the plural
1443 distribution from it. Pass it to message_merge.
1444 Reported by Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>.
1446 2007-10-20 Bruno Haible <bruno@clisp.org>
1448 * msgl-check.c (check_plural): If there is no header entry, or if the
1449 header entry does not contain plural= and nplurals=, return a plural
1450 distribution corresponding to the Germanic plural.
1452 2007-10-20 Bruno Haible <bruno@clisp.org>
1454 * format.h (check_msgid_msgstr_format): Add plural_distribution_length
1456 * format.c (check_msgid_msgstr_format): Likewise.
1457 * msgl-check.h (check_message): Likewise.
1458 * msgl-check.c (check_plural_eval, check_plural, check_pair,
1459 check_message): Likewise.
1460 (check_message_list): Update.
1462 2007-10-18 Bruno Haible <bruno@clisp.org>
1464 * plural-count.c (get_plural_count): Adapt to changed prototype of
1465 extract_plural_expression.
1466 * write-csharp.c (write_csharp_expression): Add const to parameter.
1467 (write_csharp_code): Adapt to changed prototype of
1468 extract_plural_expression.
1469 * write-java.c (write_java_expression): Add const to parameter.
1470 (write_java_code): Adapt to changed prototype of
1471 extract_plural_expression.
1473 2007-10-07 Bruno Haible <bruno@clisp.org>
1475 * hostname.c (main): In the --version output, say GPLv3+.
1476 * msgattrib.c (main): Likewise.
1477 * msgcat.c (main): Likewise.
1478 * msgcmp.c (main): Likewise.
1479 * msgcomm.c (main): Likewise.
1480 * msgconv.c (main): Likewise.
1481 * msgen.c (main): Likewise.
1482 * msgexec.c (main): Likewise.
1483 * msgfilter.c (main): Likewise.
1484 * msgfmt.c (main): Likewise.
1485 * msggrep.c (main): Likewise.
1486 * msginit.c (main): Likewise.
1487 * msgmerge.c (main): Likewise.
1488 * msgunfmt.c (main): Likewise.
1489 * msguniq.c (main): Likewise.
1490 * recode-sr-latin.c (main): Likewise.
1491 * urlget.c (main): Likewise.
1492 * xgettext.c (main): Likewise.
1494 2007-09-30 Bruno Haible <bruno@clisp.org>
1496 * xgettext.c (package_name, package_version): New variables.
1497 (long_options): Add --package-name, --package-version.
1498 (main): Handle options --package-name, --package-version.
1499 (usage): Document them.
1500 (construct_header): Use package_name if present.
1501 * msginit.c (project_id_version): Take a header argument. Return the
1502 old value if already present.
1505 2007-09-30 Bruno Haible <bruno@clisp.org>
1507 * message.h (format_type): New enum value 'format_kde'.
1508 (NFORMATS): Increment.
1509 * message.c (format_language): Add format_kde entry.
1510 (format_language_pretty): Likewise.
1511 * format.h (formatstring_kde): New declaration.
1512 * format-kde.c: New file.
1513 * format.c (formatstring_parsers): Add formatstring_kde.
1514 * x-c.c (init_flag_table_c): Also register flags for qt-format and
1516 * xgettext.c (flag_table_cxx_kde): New variable.
1517 (recognize_format_kde): New variable.
1518 (main): Handle --kde option.
1519 (usage): Document --kde option.
1520 (xgettext_record_flag): Also fill flag_table_cxx_kde.
1521 (remember_a_message, remember_a_message_plural): In the heuristics,
1522 don't mark a string as c-format that is already known to be a
1524 (language_to_extractor): Use a flag_table_cxx_kde that is different
1526 * Makefile.am (FORMAT_SOURCE): Add format-kde.c.
1529 2007-09-09 Bruno Haible <bruno@clisp.org>
1531 Add support for Qt 4 format strings.
1532 * format-qt.c (struct spec): Increase args_used field size to 100.
1534 (format_parse): Update for Qt 4 syntax. Remove error message when the
1535 same format argument is used more than once.
1536 (format_check): Add check: If the msgid is simple, the msgstr must be
1538 Reported by Chusslove Illich <caslav.ilic@gmx.net>.
1540 2007-09-02 Bruno Haible <bruno@clisp.org>
1542 Correct handling of different libexpat ABIs.
1543 * x-glade.c: Include <stdint.h>.
1544 (p_XML_GetCurrentLineNumber, p_XML_GetCurrentColumnNumber): New
1546 (is_XML_LARGE_SIZE_ABI, GetCurrentLineNumber, GetCurrentColumnNumber):
1548 (XML_GetCurrentLineNumber, XML_GetCurrentColumnNumber): Redefine.
1549 (XML_Expat_Version, XML_FeatureEnum, XML_Feature): New types.
1550 (p_XML_ExpatVersionInfo, p_XML_GetFeatureList): New variables.
1551 (p_XML_GetCurrentLineNumber, p_XML_GetCurrentColumnNumber): Change
1553 (XML_ExpatVersionInfo, XML_GetFeatureList): New macros.
1554 (XML_Size_ABI): New type.
1555 (get_XML_Size_ABI): New function.
1556 (XML_GetCurrentLineNumber, XML_GetCurrentColumnNumber): New functions.
1557 (load_libexpat): Try both version 2 and version 1. Initialize
1558 p_XML_ExpatVersionInfo, p_XML_GetFeatureList.
1560 2007-09-02 Bruno Haible <bruno@clisp.org>
1562 Implement msgctxt for C# ResourceManagers.
1563 * x-csharp.c (init_keywords): Also register GetParticularString and
1564 GetParticularPluralString.
1565 (init_flag_table_csharp): Update accordingly.
1566 * write-csharp.c: Include xmalloca.h.
1567 (write_csharp_msgid): New function.
1568 (write_csharp_code): Use it instead of write_csharp_string.
1569 (msgdomain_write_csharp): Remove error message if mlp has entries with
1571 * msgunfmt.cs (DumpResource.DumpMessage): Emit an msgctxt line
1572 if the message contain the context separator.
1574 2007-09-01 Bruno Haible <bruno@clisp.org>
1576 Implement msgctxt for Java ResourceBundles.
1577 * x-java.c (init_keywords): Also register pgettext and npgettext.
1578 (init_flag_table_java): Update accordingly.
1579 * write-java.c (msgid_hashcode): New function.
1580 (compute_hashsize, compute_table_items): Use it instead of
1582 (write_java_msgid): New function.
1583 (write_java_code): Use it instead of write_java_string.
1584 (msgdomain_write_java): Remove error message if mlp has entries with
1586 * gnu/gettext/DumpResource.java (dumpMessage): Emit an msgctxt line
1587 if the message contain the context separator.
1588 Suggested by Felix Berger.
1590 2007-09-01 Bruno Haible <bruno@clisp.org>
1592 * po-lex.c: Include uniwidth.h.
1594 2007-06-19 Bruno Haible <bruno@clisp.org>
1596 * x-c.c (phase8_get): Call free_token, so that the reference to
1597 tmp.comment gets dropped.
1599 2007-08-27 Bruno Haible <bruno@clisp.org>
1601 * x-python.c (phase7_getuc): Interpret octal and hexadecimal escapes
1602 as Unicode code points inside Unicode strings.
1603 Reported and patch by Jakub Wilk <ubanus@users.sf.net>.
1605 2007-08-23 Bruno Haible <bruno@clisp.org>
1607 * file-list.c: Don't include getline.h.
1608 * format-awk.c: Likewise.
1609 * format-boost.c: Likewise.
1610 * format-c.c: Likewise.
1611 * format-csharp.c: Likewise.
1612 * format-elisp.c: Likewise.
1613 * format-gcc-internal.c: Likewise.
1614 * format-java.c: Likewise.
1615 * format-librep.c: Likewise.
1616 * format-lisp.c: Likewise.
1617 * format-pascal.c: Likewise.
1618 * format-perl-brace.c: Likewise.
1619 * format-perl.c: Likewise.
1620 * format-php.c: Likewise.
1621 * format-python.c: Likewise.
1622 * format-qt.c: Likewise.
1623 * format-scheme.c: Likewise.
1624 * format-sh.c: Likewise.
1625 * format-tcl.c: Likewise.
1626 * format-ycp.c: Likewise.
1627 * msginit.c: Likewise.
1628 * x-perl.c: Likewise.
1630 2007-08-18 Bruno Haible <bruno@clisp.org>
1632 * write-csharp.c (msgdomain_write_csharp): Don't recommend to use
1633 --verbose if it is already in use.
1634 * write-java.c (msgdomain_write_java): Likewise.
1635 Reported by Karsten Kousgaard <karsten@f-kousgaard.dk>.
1637 2007-07-07 Bruno Haible <bruno@clisp.org>
1639 * Makefile.am (AM_CPPFLAGS): Remove reference to libuniname directory.
1640 (LIBUNINAME): Remove variable.
1641 (xgettext_LDADD): Update.
1643 2007-07-04 Bruno Haible <bruno@clisp.org>
1645 Recognize the PHP string concatenation operator.
1646 * x-php.c (enum token_type_ty): New elements token_type_dot,
1647 token_type_operator1, token_type_operator2.
1648 (struct token_ty): Add comment field.
1649 (free_token): Drop reference to comment field.
1650 (phase4_pushback, phase4_pushback_length): New variables.
1651 (phase4_get): Renamed from x_php_lex. Return last pushed-back token if
1652 available. Recognize tokens '.', '+', '-', '*', '/', '%', '++', '--',
1653 '!', '~', '@'. Fill in tp->comment.
1654 (phase4_unget): New function.
1655 (phase5_last): New variable.
1656 (x_php_lex): New function.
1657 (extract_balanced): Handle the new token types. Pass token's comment
1658 to remember_a_message.
1659 (extract_php): Initialize phase5_last.
1660 Reported by Jan Engelhardt <jengelh@computergmbh.de>.
1662 2007-06-30 Bruno Haible <bruno@clisp.org>
1664 * hostname.c (main): Use the standard --version output, see
1665 <http://lists.gnu.org/archive/html/bug-gnulib/2007-03/msg00302.html>.
1666 * msgattrib.c (main): Likewise.
1667 * msgcat.c (main): Likewise.
1668 * msgcmp.c (main): Likewise.
1669 * msgcomm.c (main): Likewise.
1670 * msgconv.c (main): Likewise.
1671 * msgen.c (main): Likewise.
1672 * msgexec.c (main): Likewise.
1673 * msgfilter.c (main): Likewise.
1674 * msgfmt.c (main): Likewise.
1675 * msggrep.c (main): Likewise.
1676 * msginit.c (main): Likewise.
1677 * msgmerge.c (main): Likewise.
1678 * msgunfmt.c (main): Likewise.
1679 * msguniq.c (main): Likewise.
1680 * recode-sr-latin.c (main): Likewise.
1681 * urlget.c (main): Likewise.
1682 * xgettext.c (main): Likewise.
1684 2007-06-30 Bruno Haible <bruno@clisp.org>
1686 * lang-table.c (language_table): Fix entry for Javanese.
1688 2007-06-28 Bruno Haible <bruno@clisp.org>
1690 * format-gcc-internal.c (format_parse): Tweak an error message.
1691 Reported by Karl Eichwalder.
1693 2007-06-28 Bruno Haible <bruno@clisp.org>
1695 * lang-table.h (language_variant_table, language_variant_table_size):
1697 * lang-table.c (language_variant_table, language_variant_table_size):
1699 * msginit.c (language_team_englishname): New function.
1700 (language_team): Use it instead of englishname_of_language.
1701 Reported by Li Daobing <lidaobing@gmail.com>.
1703 2007-06-25 Bruno Haible <bruno@clisp.org>
1705 Change boundary of extracted comments.
1706 * x-perl.c (struct token_ty): Add comment field.
1707 (free_token): Release tp->comment.
1708 (extract_quotelike): Fill in tp->comment.
1709 (x_perl_prelex): Set or release tp->comment when constructing tokens.
1710 (x_perl_lex): Likewise.
1711 (extract_balanced): Pass token's comment to remember_a_message.
1713 2007-06-18 Bruno Haible <bruno@clisp.org>
1715 Change boundary of extracted comments.
1716 * x-ycp.c (struct token_ty): Add comment field.
1717 (free_token): New function.
1718 (phase5_get): Fill in tp->comment.
1719 (phase8_get): Use free_token.
1720 (extract_parenthesized): Pass token's comment to remember_a_message.
1722 Reported by Karl Eichwalder <ke@suse.de>.
1724 2007-06-09 Bruno Haible <bruno@clisp.org>
1726 * format-java.c: Include xmalloca.h instead of xallocsa.h.
1727 (message_format_parse): Use xmalloca/freea instead of xallocsa/freesa.
1728 * message.c: Include xmalloca.h instead of xallocsa.h.
1729 (message_list_hash_insert_entry, message_list_search): Use
1730 xmalloca/freea instead of xallocsa/freesa.
1731 * msggrep.c: Include xmalloca.h instead of xallocsa.h.
1732 (is_message_selected_no_invert): Use xmalloca/freea instead of
1734 * msginit.c: Include xmalloca.h instead of xallocsa.h.
1735 (subst_string): Use xmalloca/freea instead of xallocsa/freesa.
1736 * msgl-cat.c: Include xmalloca.h instead of xallocsa.h.
1737 (catenate_msgdomain_list): Use xmalloca/freea instead of
1739 * msgl-charset.c: Include xmalloca.h instead of xallocsa.h.
1740 (compare_po_locale_charsets): Use xmalloca/freea instead of
1742 * msgl-iconv.c: Include xmalloca.h instead of xallocsa.h.
1743 (iconv_message_list_internal, is_message_list_iconvable): Use
1744 xmalloca/freea instead of xallocsa/freesa.
1745 * msgmerge.c: Include xmalloca.h instead of xallocsa.h.
1746 (merge): Use xmalloca/freea instead of xallocsa/freesa.
1747 * po-charset.c: Include xmalloca.h instead of xallocsa.h.
1748 (po_lex_charset_set): Use xmalloca/freea instead of xallocsa/freesa.
1749 * read-tcl.c: Include xmalloca.h instead of xallocsa.h.
1750 (msgdomain_read_tcl): Use xmalloca/freea instead of xallocsa/freesa.
1751 * write-java.c: Include xmalloca.h instead of xallocsa.h.
1752 (compute_hashsize, msgdomain_write_java): Use xmalloca/freea instead of
1754 * write-mo.c: Include xmalloca.h instead of xallocsa.h.
1755 (write_table): Use xmalloca/freea instead of xallocsa/freesa.
1756 * write-po.c: Include xmalloca.h instead of xallocsa.h.
1757 (msgdomain_list_print_po): Use xmalloca/freea instead of
1759 * write-tcl.c: Include xmalloca.h instead of xallocsa.h.
1760 (msgdomain_write_tcl): Use xmalloca/freea instead of xallocsa/freesa.
1761 * xgettext.c: Include xmalloca.h instead of xallocsa.h.
1762 (flag_context_list_table_insert): Use xmalloca/freea instead of
1765 2007-06-08 Bruno Haible <bruno@clisp.org>
1767 * msgattrib.c (main): Update year in --version output.
1768 * msgcat.c (main): Likewise.
1769 * msgcmp.c (main): Likewise.
1770 * msgcomm.c (main): Likewise.
1771 * msgconv.c (main): Likewise.
1772 * msgen.c (main): Likewise.
1773 * msgexec.c (main): Likewise.
1774 * msgfilter.c (main): Likewise.
1775 * msgfmt.c (main): Likewise.
1776 * msggrep.c (main): Likewise.
1777 * msginit.c (main): Likewise.
1778 * msgmerge.c (main): Likewise.
1779 * msgunfmt.c (main): Likewise.
1780 * msguniq.c (main): Likewise.
1781 * xgettext.c (main): Likewise.
1782 * recode-sr-latin.c (main): Likewise.
1783 * hostname.c (main): Likewise.
1784 * urlget.c (main): Likewise.
1786 2007-06-08 Bruno Haible <bruno@clisp.org>
1788 * msginit.c: Include localename.h.
1789 (_nl_locale_name): Remove declaration.
1790 (main): Use gl_locale_name instead of _nl_locale_name.
1791 * Makefile.am (msginit_LDADD): Remove localename object file.
1793 2007-05-28 Bruno Haible <bruno@clisp.org>
1795 * Makefile.am (WOE32_LDADD): New variable.
1796 (LDADD, msgcmp_LDADD, msgfmt_LDADD, msgmerge_LDADD, msgunfmt_LDADD,
1797 xgettext_LDADD, msgattrib_LDADD, msgcat_LDADD, msgcomm_LDADD,
1798 msgconv_LDADD, msgen_LDADD, msgexec_LDADD, msgfilter_LDADD,
1799 msggrep_LDADD, msginit_LDADD, msguniq_LDADD, recode_sr_latin_LDADD):
1801 (gettext.res): New rule.
1802 (MOSTLYCLEANFILES): Add gettext.res.
1804 2007-05-27 Bruno Haible <bruno@clisp.org>
1806 Avoid link error; u16_mbtouc_aux is no longer a public API.
1807 * x-java.c (string_buffer_append): Use u16_mbtouc instead of
1809 * x-python.c (mixed_string_buffer_append): Likewise.
1811 2007-05-13 Bruno Haible <bruno@clisp.org>
1813 * write-java.c (mkdir): Remove definition. Now done by gnulib.
1814 * write-csharp.c (mkdir): Remove definition. Now done by gnulib.
1816 2007-05-13 Bruno Haible <bruno@clisp.org>
1818 * msgl-check.c: Include stdio.h instead of vasprintf.h.
1819 * po-lex.c: Don't include vasprintf.h.
1821 2007-03-27 Bruno Haible <bruno@clisp.org>
1823 * hostname.c (usage): Ask translators to specify a translation bug
1825 * msgattrib.c (usage): Likewise.
1826 * msgcat.c (usage): Likewise.
1827 * msgcmp.c (usage): Likewise.
1828 * msgcomm.c (usage): Likewise.
1829 * msgconv.c (usage): Likewise.
1830 * msgen.c (usage): Likewise.
1831 * msgexec.c (usage): Likewise.
1832 * msgfilter.c (usage): Likewise.
1833 * msgfmt.c (usage): Likewise.
1834 * msggrep.c (usage): Likewise.
1835 * msginit.c (usage): Likewise.
1836 * msgmerge.c (usage): Likewise.
1837 * msgunfmt.c (usage): Likewise.
1838 * msguniq.c (usage): Likewise.
1839 * recode-sr-latin.c (usage): Likewise.
1840 * urlget.c (usage): Likewise.
1841 * xgettext.c (usage): Likewise.
1843 2007-03-24 Bruno Haible <bruno@clisp.org>
1845 * po-lex.c: Include unistr.h instead of utf8-ucs4.h.
1846 * read-properties.c: Include unistr.h instead of utf16-ucs4.h,
1848 * x-java.c: Likewise.
1849 * read-stringtable.c: Include unistr.h instead of utf8-ucs4.h,
1851 * x-csharp.c: Likewise.
1852 * write-csharp.c: Include unistr.h instead of utf8-ucs4.h.
1853 * write-java.c: Likewise.
1854 * write-properties.c: Likewise.
1855 * write-qt.c: Likewise.
1856 * write-tcl.c: Likewise.
1857 * x-perl.c: Likewise.
1858 * x-python.c: Include unistr.h instead of utf8-ucs4.h, utf16-ucs4.h,
1860 * x-tcl.c: Include unistr.h instead of ucs4-utf8.h.
1862 2007-03-17 Bruno Haible <bruno@clisp.org>
1864 * x-php.c (enum token_type_ty): New values token_type_lbracket,
1865 token_type_rbracket.
1866 (x_php_lex): Recognize also token_type_lbracket, token_type_rbracket.
1867 (extract_balanced): Renamed from extract_parenthesized. Add 'delim'
1868 argument. Handle token_type_lbracket and token_type_rbracket.
1869 (extract_php): Update.
1870 Reported by Robert Vock <RobertVock@gmx.de>.
1872 2007-03-10 Bruno Haible <bruno@clisp.org>
1874 * msginit.c (get_user_fullname): Reduce scope of local variables.
1876 2007-03-04 Bruno Haible <bruno@clisp.org>
1878 Moved --enable-relocatable infrastructure to gnulib.
1879 * Makefile.am: Remove SET_RELOCATABLE invocation.
1881 2007-02-25 Bruno Haible <bruno@clisp.org>
1883 * color.c: Include filename.h instead of pathname.h.
1884 (style_file_prepare): Update.
1885 * msginit.c: Include filename.h instead of pathname.h.
1886 (project_id, project_id_version): Update.
1887 * open-catalog.c: Include filename.h instead of pathname.h.
1888 (try_open_catalog_file): Update.
1889 * read-csharp.c: Include filename.h instead of pathname.h.
1890 (msgdomain_read_csharp): Update.
1891 * read-resources.c: Include filename.h instead of pathname.h.
1892 (read_resources_file): Update.
1893 * read-tcl.c: Include filename.h instead of pathname.h.
1894 (msgdomain_read_tcl): Update.
1895 * write-csharp.c: Include filename.h instead of pathname.h.
1896 (msgdomain_write_csharp): Update.
1897 * write-java.c Include filename.h instead of pathname.h.
1898 (msgdomain_write_java): Update.
1899 * write-resources.c: Include filename.h instead of pathname.h.
1900 (msgdomain_write_csharp_resources): Update.
1901 * write-tcl.c: Include filename.h instead of pathname.h.
1902 (msgdomain_write_tcl): Update.
1903 * xgettext.c: Include filename.h instead of pathname.h.
1904 (main, xgettext_open): Update.
1906 2007-02-19 Bruno Haible <bruno@clisp.org>
1908 * file-list.c: Don't include exit.h.
1909 * hostname.c: Likewise.
1910 * msgattrib.c: Likewise.
1911 * msgcat.c: Likewise.
1912 * msgcmp.c: Likewise.
1913 * msgcomm.c: Likewise.
1914 * msgconv.c: Likewise.
1915 * msgen.c: Likewise.
1916 * msgexec.c: Likewise.
1917 * msgfilter.c: Likewise.
1918 * msgfmt.c: Likewise.
1919 * msggrep.c: Likewise.
1920 * msginit.c: Likewise.
1921 * msgl-cat.c: Include <stdlib.h> instead of exit.h.
1922 * msgl-charset.c: Likewise.
1923 * msgl-check.c: Don't include exit.h.
1924 * msgmerge.c: Likewise.
1925 * msgunfmt.c: Likewise.
1926 * msguniq.c: Likewise.
1927 * po-lex.c: Likewise.
1928 * po-xerror.c: Likewise.
1929 * read-csharp.c: Likewise.
1930 * read-java.c: Likewise.
1931 * read-mo.c: Likewise.
1932 * read-resources.c: Likewise.
1933 * read-tcl.c: Likewise.
1934 * recode-sr-latin.c: Likewise.
1935 * urlget.c: Likewise.
1936 * write-mo.c: Likewise.
1937 * write-qt.c: Likewise.
1938 * write-resources.c: Likewise.
1939 * write-tcl.c: Include <stdlib.h> instead of exit.h.
1940 * x-awk.c: Don't include exit.h.
1942 * x-csharp.c: Likewise.
1943 * x-elisp.c: Likewise.
1944 * x-glade.c: Likewise.
1945 * x-java.c: Likewise.
1946 * x-librep.c: Likewise.
1947 * x-lisp.c: Likewise.
1948 * x-perl.c: Likewise.
1949 * x-php.c: Likewise.
1950 * x-python.c: Likewise.
1951 * x-rst.c: Include <stdlib.h> instead of exit.h.
1952 * x-scheme.c: Don't include exit.h.
1954 * x-smalltalk.c: Likewise.
1955 * x-tcl.c: Likewise.
1956 * x-ycp.c: Likewise.
1957 * xgettext.c: Likewise.
1959 2007-01-28 Bruno Haible <bruno@clisp.org>
1961 * x-java.c (string_buffer_append_lone_surrogate): New function.
1962 (string_buffer_flush_utf16_surr, string_buffer_append): Use it.
1964 2007-01-28 Bruno Haible <bruno@clisp.org>
1966 * x-java.c (string_buffer_flush_utf16_surr): Give a warning when
1967 converting a surrogate code point to U+FFFD.
1968 (string_buffer_append): Convert a lone high surrogate code point to
1969 U+FFFD, and give a warning.
1971 2007-01-26 Bruno Haible <bruno@clisp.org>
1973 * msgfilter.c: Include <sys/time.h> unconditionally.
1975 2007-01-26 Bruno Haible <bruno@clisp.org>
1977 * msginit.c: Don't include strpbrk.h, use <string.h> instead.
1979 2007-01-26 Bruno Haible <bruno@clisp.org>
1981 * msgmerge.c: Don't include stpncpy.h, use <string.h> instead.
1983 2007-01-26 Bruno Haible <bruno@clisp.org>
1985 * msgfmt.c: Don't include stpcpy.h, use <string.h> instead.
1986 * msgmerge.c: Likewise.
1988 2007-01-21 Bruno Haible <bruno@clisp.org>
1990 * msgl-iconv.c (convert_string, convert_msgstr, iconvable_string,
1991 iconvable_msgstr): Update for changed calling convention of
1993 * recode-sr-latin.c (process): Likewise.
1995 2007-01-07 Bruno Haible <bruno@clisp.org>
1997 * msgmerge.c (message_merge): Copy the obsolete bit from the ref
1999 Reported by Leonardo Fontenelle <leo.fontenelle@gmail.com>.
2001 2006-12-24 Bruno Haible <bruno@clisp.org>
2003 * Makefile.am (AM_CXXFLAGS): New variable.
2005 2006-12-23 Bruno Haible <bruno@clisp.org>
2007 * color.c (print_color_test): Print labels before the hue/saturation
2008 rectangle. Show also a few lines that mix colors and attributes.
2010 2006-12-03 Bruno Haible <bruno@clisp.org>
2012 * msgcat.c: Include color.h.
2013 (long_options): Add --color, --style options.
2014 (main): Handle them. Invoke print_color_test when --color=test was
2016 (usage): Document --color, --style options.
2018 2006-12-01 Bruno Haible <bruno@clisp.org>
2020 Add styling support to the PO output routines.
2021 * color.h: New file.
2022 * color.c: New file.
2023 * write-catalog.h (struct catalog_output_format): Add field
2025 * write-catalog.c: Include fcntl.h, unistd.h, styled-ostream.h,
2026 term-styled-ostream.h, html-styled-ostream.h, fd-ostream.h, color.h,
2027 po-charset.h, msgl-iconv.h.
2028 (STDOUT_FILENO): New macro.
2029 (ENABLE_COLOR): New macro.
2030 (msgdomain_list_print): Use a styled_ostream_t that uses the
2032 * write-po.c: Include format.h, styled-ostream.h.
2033 (is_stylable, begin_css_class, end_css_class): New functions or macros.
2034 (class_header, class_translated, class_untranslated, class_fuzzy,
2035 class_obsolete, class_comment, class_translator_comment,
2036 class_extracted_comment, class_reference_comment, class_reference,
2037 class_flag_comment, class_flag, class_fuzzy_flag,
2038 class_previous_comment, class_previous, class_msgid, class_msgstr,
2039 class_keyword, class_string, class_text, class_escape_sequence,
2040 class_format_directive, class_invalid_format_directive): New variables.
2041 (ATTR_ESCAPE_SEQUENCE, ATTR_FORMAT_DIRECTIVE,
2042 ATTR_INVALID_FORMAT_DIRECTIVE): New enum items.
2043 (message_print_comment, message_print_comment_dot,
2044 message_print_comment_filepos, message_print_comment_flags): Call
2045 begin/end_css_class.
2046 (memset_small): New function.
2047 (wrap): Add css_class argument. Determine the extent of format
2048 string directives. Call begin/end_css_class.
2049 (print_blank_line): Call begin/end_css_class.
2050 (message_print, message_print_obsolete): Likewise. Pass a css_class
2052 (msgdomain_list_print_po): Call begin/end_css_class.
2053 (output_format_po): Update.
2054 * write-properties.c (output_format_properties): Update.
2055 * write-stringtable.c (output_format_stringtable): Update.
2056 * Makefile.am (noinst_HEADERS): Add color.h.
2057 (libgettextsrc_la_SOURCES): Add color.c.
2059 2006-11-26 Bruno Haible <bruno@clisp.org>
2061 * write-po.c (make_format_description_string,
2062 make_c_width_description_string): Strip off the leading space.
2063 (message_print_comment_flags): Print the space here.
2064 * write-stringtable.c (write_message): Print the space here.
2066 2006-11-26 Bruno Haible <bruno@clisp.org>
2068 * write-po.c: Include write-catalog.h instead of write-properties.h,
2069 write-stringtable.h.
2071 2006-11-26 Bruno Haible <bruno@clisp.org>
2073 * format.h (FMTDIR_START, FMTDIR_END, FMTDIR_ERROR): New enum values.
2074 (FDI_SET): New macro.
2075 (struct formatstring_parser): Add fdi argument to 'parse' method.
2076 * format.c (check_msgid_msgstr_format): Update.
2077 * format-awk.c (format_parse): Add fdi argument. Invoke FDI_SET.
2078 * format-boost.c (format_parse): Likewise.
2079 * format-c.c (format_parse): Add fdi argument. Invoke FDI_SET.
2080 (format_c_parse, format_objc_parse): Add fdi argument.
2081 (get_sysdep_c_format_directives): Update.
2082 * format-csharp.c (format_parse): Add fdi argument. Invoke FDI_SET.
2083 * format-elisp.c (format_parse): Likewise.
2084 * format-gcc-internal.c (format_parse): Likewise.
2085 * format-java.c (message_format_parse): Add fdi argument. Invoke
2087 (choice_format_parse): Update.
2088 (format_parse): Add fdi argument.
2089 * format-librep.c (format_parse): Add fdi argument. Invoke FDI_SET.
2090 * format-lisp.c (parse_upto): Add fdi argument. Invoke FDI_SET.
2091 (format_parse): Add fdi argument.
2092 * format-pascal.c (format_parse): Add fdi argument. Invoke FDI_SET.
2093 * format-perl.c (format_parse): Likewise.
2094 * format-perl-brace.c (format_parse): Likewise.
2095 * format-php.c (format_parse): Likewise.
2096 * format-python.c (format_parse): Add fdi argument. Invoke FDI_SET.
2097 (get_python_format_unnamed_arg_count): Update.
2098 * format-qt.c (format_parse): Add fdi argument. Invoke FDI_SET.
2099 * format-scheme.c (parse_upto): Add fdi argument. Invoke FDI_SET.
2100 (format_parse): Add fdi argument.
2101 * format-sh.c (format_parse): Add fdi argument. Invoke FDI_SET.
2102 * format-tcl.c (format_parse): Likewise.
2103 * format-ycp.c (format_parse): Likewise.
2104 * msgmerge.c (msgfmt_check_pair_fails): Update.
2105 * read-mo.c (read_mo_file): Update.
2106 * xgettext.c (set_format_flags_from_context, remember_a_message,
2107 remember_a_message_plural): Update.
2109 2006-11-25 Bruno Haible <bruno@clisp.org>
2111 * message.h (message_list_copy, msgdomain_list_copy): New declarations.
2112 * message.c (message_list_copy, msgdomain_list_copy): New functions.
2114 2006-11-25 Bruno Haible <bruno@clisp.org>
2116 * msgl-iconv.h (iconv_msgdomain_list): Add update_header argument.
2117 * msgl-iconv.c (iconv_message_list_internal): Renamed from
2118 iconv_msgdomain_list. Add update_header argument.
2119 (iconv_message_list): New function.
2120 (iconv_msgdomain_list): Add update_header argument.
2121 * msgcmp.c (compare): Update iconv_msgdomain_list call.
2122 * msgconv.c (main): Likewise.
2123 * msgfilter.c (main): Likewise.
2124 * msgmerge.c (merge): Likewise.
2125 * xgettext.c (main): Likewise.
2127 2006-11-23 Bruno Haible <bruno@clisp.org>
2129 * write-catalog.h: Include ostream.h. Don't include <stdio.h>.
2130 (struct catalog_output_format): Use ostream_t instead of 'FILE *'.
2131 * write-catalog.c: Include ostream.h, file-ostream.h.
2132 (msgdomain_list_print): Open a temporary file_ostream_t.
2133 * write-po.h: Include ostream.h. Don't include <stdio.h>.
2134 (message_print_comment, message_print_comment_dot,
2135 message_print_comment_filepos, message_print_comment_flags): Replace
2136 'FILE *' argument with an 'ostream_t' argument.
2137 * write-po.c: Include ostream.h.
2138 (message_print_comment, message_print_comment_dot,
2139 message_print_comment_filepos, message_print_comment_flags, wrap,
2140 print_blank_line, message_print, message_print_obsolete,
2141 msgdomain_list_print_po): Replace 'FILE *' argument with an 'ostream_t'
2143 * write-properties.c: Include ostream.h.
2144 (write_escaped_string, write_message, write_properties,
2145 msgdomain_list_print_properties): Replace 'FILE *' argument with an
2146 'ostream_t' argument.
2147 * write-stringtable.c: Include ostream.h, xvasprintf.h. Don't include
2149 (write_escaped_string, write_message, write_stringtable,
2150 msgdomain_list_print_stringtable): Replace 'FILE *' argument with an
2151 'ostream_t' argument.
2153 2006-11-12 Bruno Haible <bruno@clisp.org>
2155 * write-po.c (wrap): Indent by use of spaces, not tabs.
2157 2006-11-03 Bruno Haible <bruno@clisp.org>
2159 Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2160 * filter-sr-latin.c (serbian_to_latin): Use XNMALLOC instead of xmalloc.
2161 * format-awk.c (format_parse): Use XMALLOC instead of xmalloc.
2162 * format-boost.c (format_parse): Likewise.
2163 * format-c.c (format_parse): Use XMALLOC, XNMALLOC instead of xmalloc.
2164 (get_sysdep_c_format_directives): Use XNMALLOC instead of xmalloc.
2165 * format-csharp.c (format_parse): Use XMALLOC instead of xmalloc.
2166 * format-elisp.c (format_parse): Likewise.
2167 * format-gcc-internal.c (format_parse): Likewise.
2168 * format-java.c (format_parse): Likewise.
2169 * format-librep.c (format_parse): Likewise.
2170 * format-lisp.c (copy_list): Use XMALLOC, XNMALLOC instead of xmalloc.
2171 (make_unconstrained_list): Likewise.
2172 (make_empty_list): Use XMALLOC instead of xmalloc.
2173 (rotate_loop): Use XNMALLOC instead of xmalloc.
2174 (make_intersected_list): Use XMALLOC instead of xmalloc.
2175 (make_union_list): Use XMALLOC, XNMALLOC instead of xmalloc.
2176 (make_repeated_list_of_lists): Likewise.
2177 (make_repeated_list): Likewise.
2178 (format_parse): Use XMALLOC instead of xmalloc.
2179 * format-pascal.c (format_parse): Likewise.
2180 * format-perl.c (format_parse): Likewise.
2181 * format-perl-brace.c (format_parse): Use XMALLOC, XNMALLOC instead of
2183 * format-php.c (format_parse): Use XMALLOC instead of xmalloc.
2184 * format-python.c (format_parse): Use XMALLOC, XNMALLOC instead of
2186 * format-qt.c (format_parse): Use XMALLOC instead of xmalloc.
2187 * format-scheme.c (copy_list): Use XMALLOC, XNMALLOC instead of xmalloc.
2188 (make_unconstrained_list): Likewise.
2189 (make_empty_list): Use XMALLOC instead of xmalloc.
2190 (rotate_loop): Use XNMALLOC instead of xmalloc.
2191 (make_intersected_list): Use XMALLOC instead of xmalloc.
2192 (make_union_list): Use XMALLOC, XNMALLOC instead of xmalloc.
2193 (make_repeated_list_of_lists): Likewise.
2194 (make_repeated_list): Likewise.
2195 (format_parse): Use XMALLOC instead of xmalloc.
2196 * format-sh.c (format_parse): Use XMALLOC, XNMALLOC instead of xmalloc.
2197 * format-tcl.c (format_parse): Use XMALLOC instead of xmalloc.
2198 * format-ycp.c (format_parse): Likewise.
2199 * message.c (message_alloc, message_list_list_alloc, msgdomain_alloc):
2200 Use XMALLOC instead of xmalloc.
2201 (msgdomain_list_alloc): Use XMALLOC, XNMALLOC instead of xmalloc.
2202 * msgexec.c (main): Use XNMALLOC instead of xmalloc.
2203 * msgfilter.c (main, generic_filter, process_message): Likewise.
2204 * msgfmt.c (add_mo_suffix): Likewise.
2205 (new_domain): Use XMALLOC instead of xmalloc.
2206 * msginit.c (catalogname_for_locale, language_of_locale,
2207 get_user_fullname, get_field, put_field, subst_string,
2208 update_msgstr_plurals): Use XNMALLOC instead of xmalloc.
2209 * msgl-cat.c (catenate_msgdomain_list): Likewise.
2210 * msgl-check.c (check_plural_eval): Use XCALLOC instead of xcalloc.
2211 * msgl-english.c (msgdomain_list_english): Use XNMALLOC instead of
2213 * msgl-fsearch.c (new_index): Likewise.
2214 (message_fuzzy_index_alloc): Use XMALLOC instead of xmalloc.
2215 (mult_index_list_accumulate): Use XNMALLOC instead of xmalloc.
2216 * msgl-iconv.c (iconv_message_list): Likewise.
2217 * msgmerge.c (message_merge, match_domain): Likewise.
2218 * po-gram-gen.y (plural_form_list): Likewise.
2219 * read-catalog-abstract.c (po_parse_comment_filepos,
2220 po_parse_comment_solaris_filepos): Likewise.
2221 * read-mo.c (get_sysdep_string): Likewise.
2222 * read-properties.c (conv_from_iso_8859_1, read_escaped_string):
2224 * read-stringtable.c (conv_from_ucs4): Likewise.
2225 * str-list.c (string_list_alloc): Use XMALLOC instead of xmalloc.
2226 (string_list_concat, string_list_join): Use XNMALLOC instead of xmalloc.
2227 * write-csharp.c (construct_class_name, msgdomain_write_csharp):
2229 * write-java.c (compute_hashsize, compute_table_items): Likewise.
2230 * write-mo.c: Include xsize.h.
2231 (write_table): Use XNMALLOC instead of xmalloc. Use xsum, xtimes in
2233 * write-po.c (wrap): Use XNMALLOC instead of xmalloc.
2234 * write-properties.c (conv_to_java): Likewise.
2235 * write-qt.c (conv_to_iso_8859_1, conv_to_utf16): Likewise.
2236 * x-elisp.c (init_token, string_of_object): Likewise.
2237 (read_object): Use XMALLOC instead of xmalloc.
2238 * x-librep.c (init_token, string_of_object): Use XNMALLOC instead of
2240 (read_object): Use XMALLOC instead of xmalloc.
2241 * x-lisp.c (x_lisp_keyword, init_token, string_of_object): Use XNMALLOC
2243 (read_object): Use XMALLOC instead of xmalloc.
2244 * x-perl.c (get_here_document, extract_quotelike_pass1,
2245 extract_quotelike_pass3): Use XNMALLOC instead of xmalloc.
2246 (x_perl_lex): Use XMALLOC instead of xmalloc.
2247 * x-po.c (strextract_add_message, extract): Use XNMALLOC instead of
2249 * x-python.c (try_to_extract_coding): Use XNMALLOC instead of xmalloc.
2250 * x-scheme.c (init_token, string_of_object): Use XNMALLOC
2252 (read_object): Use XMALLOC instead of xmalloc.
2253 * x-sh.c (init_token, string_of_token, string_of_word): Use XNMALLOC
2255 (read_word): Use XMALLOC instead of xmalloc.
2256 * x-smalltalk.c (phase2_get): Use XNMALLOC instead of xmalloc.
2257 * x-tcl.c (init_token, string_of_word): Use XNMALLOC instead of xmalloc.
2258 (read_word): Use XMALLOC instead of xmalloc.
2259 * xgettext.c: Include xsize.h.
2260 (split_keywordspec): Use XNMALLOC instead of xmalloc.
2261 (insert_keyword_callshape): Use XMALLOC instead of xmalloc. Use xsum,
2262 xtimes to avoid overflow.
2263 (flag_context_list_table_insert): Use XMALLOC instead of xmalloc.
2264 (savable_comment_add): Likewise.
2265 (remember_a_message_plural): Use XNMALLOC instead of xmalloc.
2266 (arglist_parser_alloc, arglist_parser_clone): Use xsum, xtimes.
2267 (arglist_parser_done): Use XNMALLOC instead of xmalloc.
2268 (finalize_header): Likewise.
2270 2006-10-30 Bruno Haible <bruno@clisp.org>
2272 * plural-eval.h [C++]: Define functions without name mangling.
2274 2006-10-29 Bruno Haible <bruno@clisp.org>
2276 Clean up libgettextpo exports in C++ mode.
2277 * po-gram.h: Wrap declarations in extern "C".
2279 2006-10-29 Bruno Haible <bruno@clisp.org>
2281 Make it compile in C++ mode.
2282 * dir-list.c (dir_list_restore): Add cast.
2283 * format-c.c (format_arg_type_t): New type. Use it instead of
2284 'enum format_arg_type'.
2285 * format-gcc-internal.c (format_arg_type_t): New type. Use it instead of
2286 'enum format_arg_type'.
2287 * format-perl.c (format_arg_type_t): New type. Use it instead of
2288 'enum format_arg_type'.
2289 * format-lisp.c (struct segment): Move out of the scope of struct
2291 * format-scheme.c (struct segment): Likewise.
2292 * message.h (struct altstr): Move out of the scope of struct message_ty.
2293 * msgl-equal.c (msgstr_equal_ignoring_potcdate): Cast memchr results.
2294 * po-lex.c (mb_copy): Rename arguments to new_mbc, old_mbc.
2295 * read-mo.c (enum mo_endianness): Move out of the scope of struct
2297 * read-po.c (this): New macro.
2298 * read-properties.c (this): New macro.
2299 * write-mo.c (write_table): Cast alloca result.
2300 * x-glade.c (load_libexpat): Cast dlsym results.
2301 * x-perl.c (get_here_document): Use xmalloc instead of
2302 xrealloc (NULL...). Cast its result.
2303 * x-po.c (extract_add_message): Limit the scope of variable
2305 * x-smalltalk.c (phase2_get): Cast xmalloc results.
2307 2006-10-29 Bruno Haible <bruno@clisp.org>
2309 * x-awk.h: Make includable without prerequisites.
2311 * x-csharp.h: Likewise.
2312 * x-elisp.h: Likewise.
2313 * x-glade.h: Likewise.
2314 * x-java.h: Likewise.
2315 * x-librep.h: Likewise.
2316 * x-lisp.h: Likewise.
2317 * x-perl.h: Likewise.
2318 * x-php.h: Likewise.
2320 * x-properties.h: Likewise.
2321 * x-python.h: Likewise.
2322 * x-rst.h: Likewise.
2323 * x-scheme.h: Likewise.
2325 * x-smalltalk.h: Likewise.
2326 * x-stringtable.h: Likewise.
2327 * x-tcl.h: Likewise.
2328 * x-ycp.h: Likewise.
2329 * x-awk.c: Include x-awk.h.
2330 * x-c.c: Include x-c.h.
2331 * x-csharp.c: Include x-csharp.h.
2332 * x-elisp.c: Include x-elisp.h.
2333 * x-glade.c: Include x-glade.h.
2334 * x-java.c: Include x-java.h.
2335 * x-librep.c: Include x-librep.h.
2336 * x-lisp.c: Include x-lisp.h.
2337 * x-perl.c: Include x-perl.h.
2338 * x-php.c: Include x-php.h.
2339 * x-po.c: Include x-po.h, x-properties.h, x-stringtable.h.
2340 * x-python.c: Include x-python.h.
2341 * x-rst.c: Include x-rst.h.
2342 * x-scheme.c: Include x-scheme.h.
2343 * x-sh.c: Include x-sh.h.
2344 * x-smalltalk.c: Include x-smalltalk.h.
2345 * x-tcl.c: Include x-tcl.h.
2346 * x-ycp.c: Include x-ycp.h.
2347 * xgettext.c: Remove extern "C" around x-*.h includes.
2349 2006-10-29 Bruno Haible <bruno@clisp.org>
2351 * format-awk.c (format_parse): Fix bug with unnumbered argument in
2354 2006-11-27 Bruno Haible <bruno@clisp.org>
2356 * gettext-0.16.1 released.
2358 2006-10-26 Bruno Haible <bruno@clisp.org>
2360 * gettext-0.16 released.
2362 2006-10-24 Bruno Haible <bruno@clisp.org>
2364 * Makefile.am (AM_CPPFLAGS): Add also $(top_srcdir). Needed so that
2365 woe32dll/export.h is found while compiling gettextsrc-exports.c in a
2367 Reported by Charles Wilson <cygwin@cwilson.fastmail.fm>.
2369 2006-10-24 Bruno Haible <bruno@clisp.org>
2371 * msgmerge.c (struct definitions_ty): Remove semicolon after
2372 gl_lock_define invocation.
2374 2006-10-21 Bruno Haible <bruno@clisp.org>
2376 * po-error.h (po_error, po_error_at_line): Use format attribute only
2379 2006-10-21 Bruno Haible <bruno@clisp.org>
2381 * msgmerge.c (struct definitions_ty): Use gl_lock_define to declare
2382 the findex_init_lock field.
2383 (definitions_init): Use gl_lock_init to initialize it, instead of
2386 2006-10-16 Bruno Haible <bruno@clisp.org>
2388 Work around automake-1.10 problem described in
2389 http://lists.gnu.org/archive/html/bug-automake/2006-08/msg00025.html.
2390 * Makefile.am (CXXLINK): Remove variable.
2391 (msgmerge_CXXFLAGS): New variable.
2392 (libgettextsrc_la_LINK, msgattrib_LINK, msgcat_LINK, msgcomm_LINK,
2393 msgconv_LINK, msgen_LINK, msgfilter_LINK, msggrep_LINK, msgmerge_LINK,
2394 msguniq_LINK, xgettext_LINK): New variables.
2396 2006-10-18 Bruno Haible <bruno@clisp.org>
2398 * read-po.h (input_format_po): Mark as DLL_VARIABLE.
2399 * read-properties.h (input_format_properties): Likewise.
2400 * read-stringtable.h (input_format_stringtable): Likewise.
2401 * write-po.h (output_format_po): Likewise.
2402 * write-properties.h (output_format_properties): Likewise.
2403 * write-stringtable.h (output_format_stringtable): Likewise.
2405 2006-10-16 Bruno Haible <bruno@clisp.org>
2407 * gettext-po.h.in: Move to ../libgettextpo/.
2408 * gettext-po.c: Move to ../libgettextpo/.
2409 * Makefile.am (lib_LTLIBRARIES): Remove libgettextpo.la.
2410 (nodist_include_HEADERS): Remove variable.
2411 (libgettextpo_la_SOURCES, LTV_CURRENT, LTV_REVISION, LTV_AGE,
2412 libgettextpo_la_LDFLAGS, libgettextpo_la_DEPENDENCIES,
2413 libgettextpo_la_LDFLAGS): Remove variables.
2414 (EXTRA_DIST, BUILT_SOURCES, CLEANFILES): Remove gettext-po.h support.
2415 (gettext-po.h): Remove rule.
2417 2006-10-18 Bruno Haible <bruno@clisp.org>
2419 * po-error.h (__attribute__, __format__, __printf__): New macros.
2420 (po_error, po_error_at_line): Declare format string argument.
2421 * po-lex.h (__attribute__, __format__, __printf__): New macros.
2422 (po_gram_error, po_gram_error_at_line): Declare format string argument.
2424 * msgl-cat.c (catenate_msgdomain_list): Avoid "gcc -Wshadow" warning.
2425 * msgl-check.c (formatstring_error_logger): Avoid "gcc
2426 -Wmissing-format-attribute" warning.
2427 (check_pair): Avoid "gcc -Wshadow" warning.
2429 * read-stringtable.c (stringtable_parse): Pass a mutable string as
2430 msgstr to po_callback_message.
2431 * write-po.c (msgdomain_list_print_po): Avoid "gcc -Wwrite-strings"
2433 * xgettext.c (remember_a_message_plural): Free a temporary string
2436 2006-10-17 Bruno Haible <bruno@clisp.org>
2438 * lang-table.c (language_table): Add the most important languages that
2439 have an ISO 639-2 code.
2440 * msginit.c (catalogname_for_locale): Likewise.
2442 2006-10-15 Bruno Haible <bruno@clisp.org>
2444 * read-catalog-abstract.h (input_syntax_ty): Remove type.
2445 (catalog_input_format): New structure type.
2446 (catalog_input_format_ty): New type.
2447 (catalog_reader_parse): Change type of input_syntax argument.
2448 * read-catalog.h (input_syntax): Remove variable.
2449 (read_catalog_stream, read_catalog_file): Add input_syntax argument.
2450 * msgl-cat.h: Include read-catalog-abstract.h.
2451 (catenate_msgdomain_list): Add input_syntax argument.
2452 * read-po.h: New file.
2453 * read-po.c: New file, extracted from read-catalog-abstract.c.
2454 * msgattrib.c: Include read-po.h, read-properties.h, read-stringtable.h.
2455 (main): Change handling of --properties-input, --stringtable-input
2456 options. Update read_catalog_file calls.
2457 * msgcat.c: Include read-po.h, read-properties.h, read-stringtable.h.
2458 (main): Change handling of --properties-input, --stringtable-input
2459 options. Update catenate_msgdomain_list call.
2460 * msgcmp.c: Include read-po.h, read-properties.h, read-stringtable.h.
2461 (main): Change handling of --properties-input, --stringtable-input
2462 options. Update compare call.
2463 (compare): Add input_syntax argument.
2464 * msgcomm.c: Include read-po.h, read-properties.h, read-stringtable.h.
2465 (main): Change handling of --properties-input, --stringtable-input
2466 options. Update catenate_msgdomain_list call.
2467 * msgconv.c: Include read-po.h, read-properties.h, read-stringtable.h.
2468 (main): Change handling of --properties-input, --stringtable-input
2469 options. Update read_catalog_file call.
2470 * msgen.c: Include read-po.h, read-properties.h, read-stringtable.h.
2471 (main): Change handling of --properties-input, --stringtable-input
2472 options. Update read_catalog_file call.
2473 * msgexec.c: Include read-po.h, read-properties.h, read-stringtable.h.
2474 (main): Change handling of --properties-input, --stringtable-input
2475 options. Update read_catalog_file call.
2476 * msgfilter.c: Include read-po.h, read-properties.h, read-stringtable.h.
2477 (main): Change handling of --properties-input, --stringtable-input
2478 options. Update read_catalog_file call.
2479 * msgfmt.c: Include read-po.h, read-properties.h, read-stringtable.h.
2480 (main): Change handling of --properties-input, --stringtable-input
2481 options. Update read_catalog_file_msgfmt call.
2482 (read_catalog_file_msgfmt): Add input_syntax argument.
2483 * msggrep.c: Include read-po.h, read-properties.h, read-stringtable.h.
2484 (main): Change handling of --properties-input, --stringtable-input
2485 options. Update read_catalog_file call.
2486 * msginit.c: Include read-po.h, read-properties.h, read-stringtable.h.
2487 (main): Change handling of --properties-input, --stringtable-input
2488 options. Update read_catalog_file call.
2489 * msgl-cat.c (catenate_msgdomain_list): Add input_syntax argument.
2490 * msgmerge.c: Include read-po.h, read-properties.h, read-stringtable.h.
2491 (main): Change handling of --properties-input, --stringtable-input
2492 options. Update merge call.
2493 (compendium): Read it in PO syntax.
2494 (merge): Add input_syntax argument.
2495 * msguniq.c: Include read-po.h, read-properties.h, read-stringtable.h.
2496 (main): Change handling of --properties-input, --stringtable-input
2497 options. Update catenate_msgdomain_list call.
2498 * read-catalog-abstract.c: Don't include po-gram.h, read-properties.h,
2500 (catalog_reader_parse): Change type of input_syntax argument. Invoke
2501 the parser indirectly.
2502 * read-catalog.c (input_syntax): Remove variable.
2503 (read_catalog_stream, read_catalog_file): Add input_syntax argument.
2504 * read-csharp.c: Include read-po.h.
2505 (execute_and_read_po_output): Update read_catalog_stream call.
2506 * read-java.c: Include read-po.h.
2507 (execute_and_read_po_output): Update read_catalog_stream call.
2508 * read-properties.c (properties_parse): Make static.
2509 (input_format_properties): New variable.
2510 * read-properties.h (properties_parse): Remove declaration.
2511 (input_format_properties): New declaration.
2512 * read-resources.c: Include read-po.h.
2513 (execute_and_read_po_output): Update read_catalog_stream call.
2514 * read-stringtable.c (stringtable_parse): Make static.
2515 (input_format_stringtable): New variable.
2516 * read-stringtable.h (stringtable_parse): Remove declaration.
2517 (input_format_stringtable): New declaration.
2518 * read-tcl.c: Include read-po.h.
2519 (msgdomain_read_tcl): Update read_catalog_stream call.
2520 * x-po.c: Include read-po.h, read-properties.h, read-stringtable.h.
2521 (extract): Change type of input_syntax argument.
2522 (extract_po, extract_properties, extract_stringtable): Update.
2523 * xgettext.c: Include read-po.h.
2524 (read_exclusion_file): Read it in PO syntax.
2525 * gettext-po.c: Include read-po.h.
2526 (po_file_read_v3, po_file_read_v2, po_file_read): Update
2527 read_catalog_stream call.
2528 * Makefile.am (noinst_HEADERS): Add read-po.h.
2529 (COMMON_SOURCE): Add read-po.c.
2531 2006-10-15 Bruno Haible <bruno@clisp.org>
2533 * read-catalog-abstract.h (abstract_catalog_reader_ty): Renamed from
2534 abstract_po_reader_ty.
2535 (abstract_catalog_reader_class_ty): Renamed from
2536 abstract_po_reader_class_ty. Update.
2537 (ABSTRACT_CATALOG_READER_TY): Renamed from ABSTRACT_PO_READER_TY.
2539 (abstract_catalog_reader_ty): Renamed from abstract_po_reader_ty.
2541 (catalog_reader_alloc): Renamed from po_reader_alloc.
2542 (catalog_reader_parse): Renamed from po_scan.
2543 (catalog_reader_free): Renamed from po_reader_free.
2544 * read-catalog.h: Update.
2545 (default_catalog_reader_class_ty): Renamed from
2546 default_po_reader_class_ty.
2547 (DEFAULT_CATALOG_READER_TY): Renamed from DEFAULT_PO_READER_TY. Update.
2548 (default_catalog_reader_ty): Renamed from default_po_reader_ty. Update.
2549 (default_constructor, default_destructor, default_parse_brief,
2550 default_parse_debrief, default_directive_domain,
2551 default_directive_message, default_comment, default_comment_dot,
2552 default_comment_filepos, default_comment_special, default_set_domain,
2553 default_add_message): Update.
2554 (default_catalog_reader_alloc): Renamed from default_po_reader_alloc.
2556 (read_catalog_stream): Renamed from read_po.
2557 (read_catalog_file): Renamed from read_po_file.
2558 * open-catalog.h (open_catalog_file): Renamed from open_po_file.
2559 * msgattrib.c: Update.
2564 * msgcomm.c: Update.
2565 * msgconv.c: Update.
2569 * msgexec.c: Update.
2571 * msgfilter.c: Update.
2574 (read_catalog_file_msgfmt): Renamed from read_po_file_msgfmt. Update.
2576 (msgfmt_catalog_reader_ty): Renamed from msgfmt_po_reader_ty. Update.
2577 (msgfmt_constructor, msgfmt_parse_debrief, msgfmt_set_domain,
2578 msgfmt_add_message, msgfmt_frob_new_message, msgfmt_comment_special,
2579 msgfmt_methods): Update.
2580 (read_catalog_file_msgfmt): Renamed from read_po_file_msgfmt. Update.
2581 * msggrep.c: Update.
2583 * msginit.c: Update.
2585 * msgl-cat.c: Update.
2586 (catenate_msgdomain_list): Update.
2587 * msgmerge.c: Update.
2588 (compendium, merge): Update.
2589 * msguniq.c: Update.
2590 * open-catalog.c: Update.
2591 (try_open_catalog_file): Renamed from try_open_po_file.
2592 (open_catalog_file): Renamed from open_po_file. Update.
2593 * po-gram-gen.y: Update.
2594 * read-catalog-abstract.c: Update.
2595 (callback_arg): Update.
2596 (catalog_reader_alloc): Renamed from po_reader_alloc.
2597 (catalog_reader_free): Renamed from po_reader_free.
2598 (call_parse_brief, call_parse_debrief, call_directive_domain,
2599 call_directive_message, call_comment, call_comment_dot,
2600 call_comment_filepos, call_comment_special): Update.
2601 (parse_start): Renamed from po_scan_start.
2602 (parse_end): Renamed from po_scan_end.
2603 (catalog_reader_parse): Renamed from po_scan.
2604 * read-catalog.c: Update.
2605 (call_set_domain, call_add_message, call_frob_new_message): Update.
2606 (default_constructor, default_destructor, default_parse_brief,
2607 default_parse_debrief, default_copy_comment_state,
2608 default_reset_comment_state, default_directive_domain,
2609 default_directive_message, default_comment, default_comment_dot,
2610 default_comment_filepos, default_comment_special, default_set_domain,
2611 default_add_message, default_methods): Update.
2612 (default_catalog_reader_alloc): Renamed from default_po_reader_alloc.
2613 (read_catalog_stream): Renamed from read_po. Update.
2614 (read_catalog_file): Renamed from read_po_file. Update.
2615 * read-csharp.c: Update.
2616 (execute_and_read_po_output): Update.
2617 * read-java.c: Update.
2618 (execute_and_read_po_output): Update.
2619 * read-properties.c: Update.
2620 (properties_parse): Update.
2621 * read-properties.h: Update.
2622 (properties_parse): Update.
2623 * read-resources.c: Update.
2624 (execute_and_read_po_output): Update.
2625 * read-stringtable.c: Update.
2626 (stringtable_parse): Update.
2627 * read-stringtable.h: Update.
2628 (stringtable_parse): Update.
2629 * read-tcl.c: Update.
2630 (msgdomain_read_tcl): Update.
2632 (extract_add_message, extract_methods, extract): Update.
2633 * xgettext.c: Update.
2634 (exclude_directive_domain, exclude_directive_message, exclude_methods,
2635 read_exclusion_file): Update.
2636 * xgettext.h: Update.
2637 * gettext-po.c: Update.
2638 (po_file_read_v3, po_file_read_v2, po_file_read): Update.
2640 * read-catalog-abstract.h: Renamed from read-po-abstract.h.
2641 * read-catalog-abstract.c: Renamed from read-po-abstract.c.
2642 * read-catalog.h: Renamed from read-po.h.
2643 * read-catalog.c: Renamed from read-po.c.
2644 * open-catalog.h: Renamed from open-po.h.
2645 * open-catalog.c: Renamed from open-po.c.
2646 * Makefile.am (noinst_HEADERS, COMMON_SOURCE, libgettextsrc_la_SOURCES):
2649 2006-10-15 Bruno Haible <bruno@clisp.org>
2651 * write-catalog.h: New file.
2652 * write-catalog.c: New file, mostly extracted from write-po.c.
2653 * write-po.h (message_page_width_set): Move declaration to
2655 (message_print_syntax_properties, message_print_syntax_stringtable):
2656 Remove declarations.
2657 (msgdomain_list_print): Move out to write-catalog.h, adding a
2658 catalog_output_format_ty argument.
2659 (msgdomain_list_sort_by_msgid, msgdomain_list_sort_by_filepos): Move
2660 out to write-catalog.h.
2661 (output_format_po): New declaration.
2662 * write-po.c: Don't include fwriteerror.h, error-progname.h.
2663 (page_width, message_page_width_set): Move out to write-catalog.c.
2664 (use_syntax_properties): Remove variable.
2665 (message_print_syntax_properties): Remove function.
2666 (use_syntax_stringtable): Remove variable.
2667 (message_print_syntax_stringtable): Remove function.
2668 (wrap, message_print, message_print_obsolete, msgdomain_list_print_po):
2669 Add page_width argument.
2670 (msgdomain_list_print): Move out to write-catalog.c, adding a
2671 catalog_output_format_ty argument.
2672 (cmp_by_msgid, msgdomain_list_sort_by_msgid,
2673 cmp_filepos, msgdomain_list_sort_filepos,
2674 cmp_by_filepos, msgdomain_list_sort_by_filepos): Move out to
2676 (output_format_po): New variable.
2677 * write-properties.h (msgdomain_list_print_properties): Remove
2679 (output_format_properties): New declaration.
2680 * write-properties.c (msgdomain_list_print_properties): Make static.
2681 (output_format_properties): New variable.
2682 * write-stringtable.h (msgdomain_list_print_stringtable): Remove
2684 (output_format_stringtable): New declaration.
2685 * write-stringtable.c (msgdomain_list_print_stringtable): Make static.
2686 (output_format_stringtable): New variable.
2687 * msgattrib.c: Include write-catalog.h, write-properties.h,
2688 write-stringtable.h.
2689 (main): Change handling of --properties-output, --stringtable-output
2690 options. Pass the output_syntax to msgdomain_list_print.
2691 * msgcat.c: Include write-catalog.h, write-properties.h,
2692 write-stringtable.h.
2693 (main): Change handling of --properties-output, --stringtable-output
2694 options. Pass the output_syntax to msgdomain_list_print.
2695 * msgcomm.c: Include write-catalog.h, write-properties.h,
2696 write-stringtable.h.
2697 (main): Change handling of --properties-output, --stringtable-output
2698 options. Pass the output_syntax to msgdomain_list_print.
2699 * msgconv.c: Include write-catalog.h, write-properties.h,
2700 write-stringtable.h.
2701 (main): Change handling of --properties-output, --stringtable-output
2702 options. Pass the output_syntax to msgdomain_list_print.
2703 * msgen.c: Include write-catalog.h, write-properties.h,
2704 write-stringtable.h.
2705 (main): Change handling of --properties-output, --stringtable-output
2706 options. Pass the output_syntax to msgdomain_list_print.
2707 * msgfilter.c: Include write-catalog.h, write-properties.h,
2708 write-stringtable.h.
2709 (main): Change handling of --properties-output, --stringtable-output
2710 options. Pass the output_syntax to msgdomain_list_print.
2711 * msggrep.c: Include write-catalog.h, write-properties.h,
2712 write-stringtable.h.
2713 (main): Change handling of --properties-output, --stringtable-output
2714 options. Pass the output_syntax to msgdomain_list_print.
2715 * msginit.c: Include write-catalog.h, write-properties.h,
2716 write-stringtable.h.
2717 (main): Change handling of --properties-output, --stringtable-output
2718 options. Pass the output_syntax to msgdomain_list_print.
2719 * msgmerge.c: Include write-catalog.h, write-properties.h,
2720 write-stringtable.h.
2721 (main): Change handling of --properties-output, --stringtable-output
2722 options. Pass the output_syntax to msgdomain_list_print.
2723 * msgunfmt.c: Include write-catalog.h, write-properties.h,
2724 write-stringtable.h.
2725 (main): Change handling of --properties-output, --stringtable-output
2726 options. Pass the output_syntax to msgdomain_list_print.
2727 * msguniq.c: Include write-catalog.h, write-properties.h,
2728 write-stringtable.h.
2729 (main): Change handling of --properties-output, --stringtable-output
2730 options. Pass the output_syntax to msgdomain_list_print.
2731 * xgettext.c: Include write-catalog.h, write-properties.h,
2732 write-stringtable.h.
2733 (output_syntax): Change type to catalog_output_format_ty.
2734 (main): Update. Pass the output_syntax to msgdomain_list_print.
2735 (finalize_header): Update.
2736 * gettext-po.c: Include write-catalog.h.
2737 (po_file_write): Specify PO syntax.
2738 * Makefile.am (noinst_HEADERS): Add write-catalog.h.
2739 (libgettextsrc_la_SOURCES): Add write.catalog.c.
2741 2006-10-05 Bruno Haible <bruno@clisp.org>
2743 * lang-table.c (language_table): Add Adangme, Kashubian. Fix the
2744 names of Western Frisian, Marshallese, Sinhala.
2745 * msginit.c (catalogname_for_locale): Add entries for Kashubian,
2746 Western Frisian, South Ndebele. Change entry for Serbian from sr_CS to
2749 2006-10-06 Bruno Haible <bruno@clisp.org>
2751 * write-java.c (msgdomain_write_java): Use fopen_temp, fwriteerror_temp
2752 instead of fopen, fwriteerror.
2753 * write-csharp.c (msgdomain_write_csharp): Likewise.
2755 2006-10-06 Bruno Haible <bruno@clisp.org>
2757 * Makefile.am (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 3:0:3.
2759 2006-10-03 Bruno Haible <bruno@clisp.org>
2761 * message.h (struct message_ty): New fields prev_msgctxt, prev_msgid,
2763 * message.c (message_alloc): Initialize the prev_msg* fields.
2764 (message_free): Free the prev_msg* fields.
2765 (message_copy): Copy the prev_msg* fields.
2766 * msgl-ascii.c (is_ascii_message): Consider also the prev_msg* fields.
2767 * msgl-cat.c (catenate_msgdomain_list): Copy the prev_msg* fields if
2768 a message is copied, not merged.
2769 * msgl-equal.c (message_equal): Consider also the prev_msg* fields.
2770 * msgl-iconv.c (convert_prev_msgid): New function.
2771 (iconv_message_list): Call it.
2772 iconvable_prev_msgid): New function.
2773 (is_message_list_iconvable): Call it.
2775 * po-lex.c (po_lex_previous): New variable.
2776 (lex_start, lex_end): Reset it.
2777 (keyword_p): Test it. New return values PREV_MSGID, PREV_MSGID_PLURAL,
2779 (po_gram_lex): Recognize #| and #~| syntax. New return value
2781 * po-gram-gen.y (do_callback_message): Add prev_msgctxt, prev_msgid,
2782 prev_msgid_plural arguments.
2783 (free_message_intro): New macro.
2784 (PREV_MSGCTXT, PREV_MSGID, PREV_MSGID_PLURAL, PREV_STRING): New tokens.
2785 (prev, message_intro): New structures.
2786 (po_file): Renamed from msgfmt.
2787 (message): Pass prev_* fields around. Call free_message_intro.
2788 (message_intro, prev): New rules.
2789 (msg_intro): Renamed from message_intro.
2790 (prev_msg_intro, prev_msgid_pluralform, prev_string_list): New rules.
2791 * read-po-abstract.h (struct abstract_po_reader_class_ty): Add
2792 prev_msgctxt, prev_msgid, prev_msgid_plural arguments to the
2793 'directive_message' method.
2794 (po_callback_message): Add prev_msgctxt, prev_msgid,
2795 prev_msgid_plural arguments.
2796 * read-po-abstract.c (call_directive_message, po_callback_message): Add
2797 prev_msgctxt, prev_msgid, prev_msgid_plural arguments.
2798 * read-po.h (struct default_po_reader_class_ty): Add prev_msgctxt,
2799 prev_msgid, prev_msgid_plural arguments to the 'add_message' method.
2800 (default_directive_message, default_add_message): Add prev_msgctxt,
2801 prev_msgid, prev_msgid_plural arguments.
2802 * read-po.c (call_add_message, default_directive_message,
2803 default_add_message): Add prev_msgctxt, prev_msgid, prev_msgid_plural
2805 * read-properties.c (properties_parse): Update.
2806 * read-stringtable.c (stringtable_parse): Update.
2807 * xgettext.c (exclude_directive_message): Add prev_msgctxt, prev_msgid,
2808 prev_msgid_plural arguments.
2809 * x-po.c (extract_add_message): Add prev_msgctxt, prev_msgid,
2810 prev_msgid_plural arguments.
2812 * write-po.c (wrap): Add extra_indent argument.
2813 (message_print, message_print_obsolete): Print the prev_msgctxt,
2814 prev_msgid, prev_msgid_plural fields. Compute an extra_indent.
2816 * msgmerge.c (keep_previous): New variable.
2817 (long_options): Add --previous option.
2819 (usage): Document --previous option.
2820 (message_merge): Add force_fuzzy argument. Set the new message's
2822 (match_domain): Update.
2823 * msgattrib.c (REMOVE_PREV): New enum item.
2824 (long_options): Add --clear-previous option.
2826 (usage): Document --clear-previous option.
2827 (process_message_list): Handle REMOVE_PREV.
2828 * msgfmt.c (msgfmt_add_message): Add prev_msgctxt, prev_msgid,
2829 prev_msgid_plural arguments.
2830 * gettext-po.c (po_message_prev_msgctxt, po_message_set_prev_msgctxt,
2831 po_message_prev_msgid, po_message_set_prev_msgid,
2832 po_message_prev_msgid_plural, po_message_set_prev_msgid_plural): New
2835 2006-10-03 Bruno Haible <bruno@clisp.org>
2837 * msgmerge.c (definitions_init): Fix initialization of fresh_lock.
2839 2006-10-03 Bruno Haible <bruno@clisp.org>
2841 * msgcmp.c (include_fuzzies, include_untranslated): New variables.
2842 (long_options): Add options --use-fuzzy, --use-untranslated.
2843 (main): Handle them.
2844 (usage): Document them.
2845 (match_domain): Consider include_fuzzies and include_untranslated.
2847 2006-10-02 Bruno Haible <bruno@clisp.org>
2849 * gettext-po.h.in (LIBGETTEXTPO_VERSION): Bump version number.
2850 * Makefile.am (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 2:1:2.
2852 2006-10-01 Bruno Haible <bruno@clisp.org>
2854 * x-perl.c (extract_balanced): Remove state argument.
2856 * x-perl.c (extract_balanced): Remove unused variable prev_last_token.
2858 Fix Perl parsing bug introduced between 0.14.6 and 0.15.
2859 * x-perl.c (extract_balanced): Add eat_delim and comma_delim arguments.
2860 Use recursion to handle the case of a keyword not followed by an
2861 opening parenthesis. When a keyword is seen, set next_argparser
2862 instead of modifying the argparser variable of the current recursion.
2863 When seeing an opening parenthesis, distinguish the case of function
2864 arguments and the case of a subexpression. Don't call collect_message
2865 for unused argument positions.
2866 Reported by Nicolas François <nicolas.francois@centraliens.net>.
2868 * x-perl.c (extract_balanced): Remove unused variable.
2870 2006-09-06 Bruno Haible <bruno@clisp.org>
2872 * msgl-iconv.c: Include xstriconv.h instead of iconvstring.h.
2873 (convert_string, convert_msgstr, iconvable_string, iconvable_msgstr):
2874 Use xmem_cd_iconv instead of iconv_string.
2875 * recode-sr-latin.c: Include xstriconv.h instead of iconvstring.h.
2876 (process): Use xmem_cd_iconv instead of iconv_string.
2878 2006-09-04 Bruno Haible <bruno@clisp.org>
2880 * Makefile.am (msginit_SOURCES): Add ../../gettext-runtime/intl/lock.c.
2881 Reported by Aaron Williams <aaron_williams@net.com>.
2883 2006-08-28 Bruno Haible <bruno@clisp.org>
2885 * x-scheme.c (read_object): Don't call arglist_parser_remember if
2887 * x-elisp.c (read_object): Likewise.
2888 * x-librep.c (read_object): Likewise.
2889 * x-lisp.c (read_object): Likewise.
2890 Reported by Kevin Ryde <user42@zip.com.au>.
2892 2006-08-16 Bruno Haible <bruno@clisp.org>
2894 * plural-table.c (plural_table): Put Hungarian under nplurals=2.
2895 Reported by Arpad Biro <biro_arpad@yahoo.com> and
2896 Gabor Kelemen <kelemeng@gnome.hu>.
2898 2006-08-16 Bruno Haible <bruno@clisp.org>
2900 * read-mo.c: Include stdbool.h, stdlib.h, format.h.
2901 (read_mo_file): Mark messages with system-dependent segments as
2902 "#, c-format" or "#, objc-format", as appropriate.
2903 Reported by Egmont Koblinger <egmont@uhulinux.hu>.
2905 2006-08-07 Bruno Haible <bruno@clisp.org>
2907 * xgettext.c (remember_a_message): Use the position passed as argument
2908 instead of a dummypos.
2909 Reported by Paul Eggert <eggert@cs.ucla.edu>.
2911 2006-08-01 Bruno Haible <bruno@clisp.org>
2913 Fix behaviour of msgmerge when the PO file and the compendium are
2914 in different encodings.
2915 * msgl-iconv.h (is_message_list_iconvable): New declaration.
2916 * msgl-iconv.c (iconvable_string, iconvable_string_list,
2917 iconvable_msgid, iconvable_msgstr, is_message_list_iconvable): New
2919 * msgmerge.c: Include xallocsa.h.
2920 (merge): In the case that the .pot file is ASCII, not UTF-8, convert
2921 the definitions and the compendia contents to a common encoding.
2922 Reported by Stanislav Brabec <sbrabec@suse.cz>.
2924 2006-07-30 Bruno Haible <bruno@clisp.org>
2926 * Makefile.am (AM_CPPFLAGS, LDADD, libgettextsrc_la_LDFLAGS,
2927 libgettextpo_la_LDFLAGS, recode_sr_latin_LDADD, RELOCATABLE_SRC_DIR,
2928 RELOCATABLE_BUILD_DIR): Replace ../lib with ../gnulib-lib.
2929 (JAVACOMP, CSHARPCOMP): Remove lib/ from pathname.
2931 2006-07-30 Bruno Haible <bruno@clisp.org>
2933 * msgl-cat.c: Include c-strstr.h instead of strstr.h.
2934 (catenate_msgdomain_list): Use c_strstr instead of strstr.
2935 * msgl-charset.c: Include c-strstr.h instead of strstr.h.
2936 (compare_po_locale_charsets): Use c_strstr instead of strstr.
2937 * msgl-check.c: Include c-strstr.h instead of strstr.h.
2938 (plural_help, check_plural, check_header_entry): Use c_strstr instead
2940 * msgl-iconv.c: Include c-strstr.h instead of strstr.h.
2941 (iconv_message_list): Use c_strstr instead of strstr.
2942 * po-charset.c: Include c-strstr.h instead of strstr.h.
2943 (po_lex_charset_set): Use c_strstr instead of strstr.
2944 * write-po.c: Include c-strstr.h instead of strstr.h.
2945 (msgdomain_list_print_po): Use c_strstr instead of strstr.
2946 * write-stringtable.c: Include c-strstr.h instead of strstr.h.
2947 (write_message): Use c_strstr instead of strstr.
2948 * msgcmp.c: Include c-strstr.h instead of strstr.h.
2949 (compare): Use c_strstr instead of strstr.
2950 * msginit.c: Include c-strstr.h instead of strstr.h.
2951 (content_type): Use c_strstr instead of strstr.
2952 * msgmerge.c: Include c-strstr.h instead of strstr.h.
2953 (message_merge, merge): Use c_strstr instead of strstr.
2954 * x-python.c: Include c-strstr.h instead of strstr.h.
2955 (try_to_extract_coding): Use c_strstr instead of strstr.
2956 * xgettext.c: Include c-strstr.h instead of strstr.h.
2957 (remember_a_message, finalize_header): Use c_strstr instead of strstr.
2959 2006-07-23 Bruno Haible <bruno@clisp.org>
2961 Exploit CPUs with multiple execution units.
2962 * msgmerge.c: Include lock.h.
2963 (struct definitions_ty): Add 'findex_init_lock' field.
2964 (definitions_init): Initialize it.
2965 (definitions_init_findex): Ensure findex is initialized by the
2966 first thread who attempts so.
2967 (match_domain): Split the main loop into two. Parallelize the first
2968 loop using OpenMP pragmas.
2969 * Makefile.am (msgmerge_CFLAGS): New variable.
2970 (msgmerge_LDADD): Add OPENMP_CFLAGS.
2972 2006-07-25 Bruno Haible <bruno@clisp.org>
2974 * Makefile.msvc: Remove file.
2975 * Makefile.am (EXTRA_DIST): Remove Makefile.msvc.
2977 2006-07-25 Bruno Haible <bruno@clisp.org>
2979 * Makefile.vms: Remove file.
2980 * Makefile.am (EXTRA_DIST): Remove Makefile.vms.
2982 2006-07-24 Bruno Haible <bruno@clisp.org>
2984 * Makefile.am (include_HEADERS): Remove variable.
2985 (nodist_include_HEADERS): New variable.
2986 Suggested by Ralf Corsepius <rc040203@freenet.de>.
2988 2006-07-21 Bruno Haible <bruno@clisp.org>
2990 * gettext-0.15 released.
2992 2006-07-20 Bruno Haible <bruno@clisp.org>
2994 * gettext-po.h.in (LIBGETTEXTPO_VERSION): Bump version number.
2996 2006-07-20 Bruno Haible <bruno@clisp.org>
2998 * Makefile.am (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 2:0:2.
3000 2006-07-14 Bruno Haible <bruno@clisp.org>
3002 * Makefile.am (MOSTLYCLEANFILES): New variable.
3004 2006-07-02 Bruno Haible <bruno@clisp.org>
3006 * write-csharp.c (msgdomain_write_csharp): Update.
3007 * write-java.c (msgdomain_write_java): Update.
3009 2006-06-29 Bruno Haible <bruno@clisp.org>
3011 * write-csharp.c (msgdomain_write_csharp): Update.
3012 * write-java.c (msgdomain_write_java): Likewise.
3014 2006-06-28 Bruno Haible <bruno@clisp.org>
3016 Assume <dirent.h> on all Unix platforms. Assume closedir works.
3017 * msginit.c: Don't include <sys/ndir.h>, <sys/dir.h>, <ndir.h>.
3018 (find_pot): Use closedir directly.
3020 2006-06-27 Bruno Haible <bruno@clisp.org>
3022 Assume correct S_ISDIR macro.
3023 * write-csharp.c: Remove test of STAT_MACROS_BROKEN.
3024 * write-java.c: Likewise.
3026 2006-04-14 Bruno Haible <bruno@clisp.org>
3028 Assume autoconf >= 2.60.
3029 * Makefile.am (localedir): Remove variable.
3031 2006-06-21 Bruno Haible <bruno@clisp.org>
3033 * x-sh.c (read_word): Recognize the Bash process substitution syntax.
3035 2006-06-21 Bruno Haible <bruno@clisp.org>
3037 * x-sh.c (read_word): Recognize $(...) and $((...)) also inside
3038 double-quoted strings.
3039 Reported by Michelle Konzack <linux4michelle@freenet.de>.
3041 2006-06-04 Bruno Haible <bruno@clisp.org>
3043 * msgl-check.c (check_plural_eval): Declare 'distribution' as volatile,
3044 so that it is unaffected by longjmp.
3046 2006-06-04 Bruno Haible <bruno@clisp.org>
3048 * xgettext.c (arglist_parser_done): Cast length argument for format
3051 2006-05-31 Bruno Haible <bruno@clisp.org>
3053 * x-ycp.c (phase5_pushback, phase5_pushback_length): New variables.
3054 (phase5_get): Renamed from x_ycp_lex.
3055 (phase5_unget): New function.
3056 (phase8_get): New function.
3057 (extract_parenthesized): Inside i18n construct, use phase8_get
3058 instead of phase5_get.
3059 Reported by Karl Eichwalder <ke@suse.de>.
3061 2006-05-22 Bruno Haible <bruno@clisp.org>
3063 * msgfilter.c: Include <sys/select.h> also on Minix.
3064 Reported by Leonard den Ottolander <leonard@den.ottolander.nl>.
3066 2006-05-17 Bruno Haible <bruno@clisp.org>
3069 * hostname.c (WIN32_NATIVE): Renamed from WIN32.
3071 2006-05-16 Bruno Haible <bruno@clisp.org>
3073 * Makefile.am (CLEANFILES): Add gettext-po.h.
3075 2006-05-16 Bruno Haible <bruno@clisp.org>
3077 * xgettext.c (main): Use a size_t index variable for looping over the
3079 (arglist_parser_done): Fix a format string.
3081 2006-05-16 Bruno Haible <bruno@clisp.org>
3083 * msgfilter.c (main): Change type of i.
3085 2006-05-15 Bruno Haible <bruno@clisp.org>
3087 * Makefile.am: Test flag WOE32DLL instead of CYGWINDLL.
3089 2006-05-14 Bruno Haible <bruno@clisp.org>
3091 * x-php.c (x_php_lex): Fix handling of here documents.
3092 Reported by Gaëtan Frenoy <gaetan@frenoy.net>.
3094 2006-05-12 Bruno Haible <bruno@clisp.org>
3096 * write-csharp.c [MINGW]: Include <io.h>.
3097 (mkdir): Define using _mkdir.
3098 * write-java.c [MINGW]: Include <io.h>.
3099 (mkdir): Define using _mkdir.
3101 2006-05-11 Bruno Haible <bruno@clisp.org>
3103 * gettext-po.h.in: Renamed from gettext-po.h.
3104 * Makefile.am: Treat condition WOE32DLL like MINGW. Update file names.
3105 (libgettextsrc_la_SOURCES, libgettextsrc_la_LDFLAGS): Modify for
3107 libgettextpo_la_SOURCES, libgettextpo_la_LDFLAGS): Likewise.
3108 (BUILT_SOURCES): Add gettext-po.h.
3109 (EXTRA_DIST): Add gettext-po.h.in.
3110 (gettext-po.h): New rule.
3112 2006-05-11 Bruno Haible <bruno@clisp.org>
3114 * Makefile.am (format_CFLAGS): Remove variable.
3115 (format.lo): Remove variable.
3116 (FORMAT_SOURCE) [MINGW]: Use ../mingw/c++format.cc instead of format.c.
3118 2006-05-09 Bruno Haible <bruno@clisp.org>
3120 * plural-eval.h (USE_SIGINFO): Don't define on Cygwin.
3122 2006-05-02 Charles Wilson <cygwin@cwilson.fastmail.fm>
3124 * write-mo.h: Remove DLL_VARIABLE declarations, not needed since
3125 write-mo.c is not compiled into a shared library.
3126 * lang-table.h: Likewise.
3128 2006-05-02 Charles Wilson <cygwin@cwilson.fastmail.fm>
3130 * filters.h: Add C++ guards.
3132 2006-05-07 Bruno Haible <bruno@clisp.org>
3134 * x-perl.c (extract_variable): Fix syntax error introduced on
3137 2006-05-07 Bruno Haible <bruno@clisp.org>
3139 * format-awk.c: Include xvasprintf.h instead of xerror.h.
3140 * format-elisp.c: Likewise.
3141 * format-librep.c: Likewise.
3142 * format-pascal.c: Likewise.
3143 * format-php.c: Likewise.
3144 * format-tcl.c: Likewise.
3146 2006-04-30 Bruno Haible <bruno@clisp.org>
3148 * write-java.c (msgdomain_write_java): Specify source-version 1.3 and
3149 require target-version 1.1.
3151 2006-04-30 Bruno Haible <bruno@clisp.org>
3153 * msginit.c (main): Simplify by use of xasprintf().
3154 * write-java.c: Include xvasprintf.h.
3155 (msgdomain_write_java): Simplify by use of xasprintf().
3156 * x-c.c: Include xvasprintf.h.
3157 (phase8a_get): Simplify by use of xasprintf().
3158 * xgettext.c: Don't include stpcpy.h.
3159 (remember_a_message, remember_a_message_plural): Simplify by use of
3162 2006-04-30 Bruno Haible <bruno@clisp.org>
3164 * msgfmt.c: Include xvasprintf.h.
3165 * msginit.c: Likewise.
3166 * msgl-cat.c: Likewise.
3167 * msgl-charset.c: Likewise.
3168 * po-xerror.c: Likewise.
3169 * x-csharp.c: Likewise.
3170 * x-glade.c: Likewise.
3171 * x-python.c: Likewise.
3172 * xgettext.c: Likewise.
3173 * format-boost.c: Include xvasprintf.h instead of xerror.h.
3174 * format-c.c: Likewise.
3175 * format-csharp.c: Likewise.
3176 * format-gcc-internal.c: Likewise.
3177 * format-java.c: Likewise.
3178 * format-lisp.c: Likewise.
3179 * format-perl.c: Likewise.
3180 * format-python.c: Likewise.
3181 * format-qt.c: Likewise.
3182 * format-scheme.c: Likewise.
3183 * format-ycp.c: Likewise.
3184 * msgexec.c: Likewise.
3185 * msgl-check.c: Likewise.
3186 * msgl-iconv.c: Likewise.
3187 * open-po.c: Likewise.
3188 * po-charset.c: Likewise.
3189 * po-lex.c: Likewise.
3190 * po-time.c: Likewise.
3191 * read-po-abstract.c: Likewise.
3192 * read-properties.c: Likewise.
3193 * read-stringtable.c: Likewise.
3194 * write-po.c: Likewise.
3196 2006-04-30 Bruno Haible <bruno@clisp.org>
3198 * msginit.c (project_id, project_id_version, get_user_email): Close
3199 the FILE in case of I/O error.
3201 2006-04-30 Bruno Haible <bruno@clisp.org>
3203 * write-java.c (msgdomain_write_java): Don't fclose the FILE after
3204 fwriteerror signalled a failure.
3205 * write-csharp.c (msgdomain_write_csharp): Likewise.
3207 2006-04-23 Bruno Haible <bruno@clisp.org>
3209 * msgexec.c: Include <unistd.h> unconditionally.
3210 * msgfilter.c: Likewise.
3211 * msggrep.c: Likewise.
3212 * msginit.c: Likewise.
3213 * hostname.c: Likewise.
3214 * urlget.c: Likewise.
3216 2006-04-17 Bruno Haible <bruno@clisp.org>
3218 * Makefile.am: Use $(mkdir_p) instead of $(mkinstalldirs).
3220 2006-04-09 Bruno Haible <bruno@clisp.org>
3222 * write-csharp.c: Include clean-temp.h. Don't include unistd.h,
3223 mkdtemp.h, tmpdir.h, pathmax.h, fatal-signal.h, xallocsa.h.
3224 (cleanup_list): Remove variable.
3225 (cleanup): Remove function.
3226 (msgdomain_write_csharp): Simplify handling of temporary directory.
3227 * write-java.c: Include clean-temp.h. Don't include unistd.h,
3228 mkdtemp.h, tmpdir.h, pathmax.h, fatal-signal.h.
3229 (cleanup_list): Remove variable.
3230 (cleanup): Remove function.
3231 (msgdomain_write_java): Simplify handling of temporary directory.
3233 2006-04-03 Bruno Haible <bruno@clisp.org>
3235 * x-glade.c (p_XML_GetCurrentLineNumber, p_XML_GetCurrentColumnNumber):
3236 Declare differently for expat >= 2.0.0.
3237 (load_libexpat): Search for a differently library name for expat >=
3239 (do_extract_glade): Update.
3240 Reported by Mike Frysinger <vapier@gentoo.org>.
3242 2006-04-02 Bruno Haible <bruno@clisp.org>
3244 * hostname.c: Include propername.h.
3245 (main): Call proper_name.
3246 * msgattrib.c: Include propername.h.
3247 (main): Call proper_name.
3248 * msgcat.c: Include propername.h.
3249 (main): Call proper_name.
3250 * msgcmp.c: Include propername.h.
3251 (main): Call proper_name.
3252 * msgcomm.c: Include propername.h.
3253 (main): Call proper_name.
3254 * msgconv.c: Include propername.h.
3255 (main): Call proper_name.
3256 * msgen.c: Include propername.h.
3257 (main): Call proper_name.
3258 * msgexec.c: Include propername.h.
3259 (main): Call proper_name.
3260 * msgfilter.c: Include propername.h.
3261 (main): Call proper_name.
3262 * msgfmt.c: Include propername.h.
3263 (main): Call proper_name.
3264 * msggrep.c: Include propername.h.
3265 (main): Call proper_name.
3266 * msginit.c: Include propername.h.
3267 (main): Call proper_name.
3268 * msgmerge.c: Include propername.h.
3269 (main): Call proper_name.
3270 * msgunfmt.c: Include propername.h.
3271 (main): Call proper_name.
3272 * msguniq.c: Include propername.h.
3273 (main): Call proper_name.
3274 * recode-sr-latin.c: Include propername.h.
3275 (main): Call proper_name and proper_name_utf8.
3276 * urlget.c: Include propername.h.
3277 (main): Call proper_name.
3278 * xgettext.c: Include propername.h.
3279 (main): Call proper_name.
3281 2006-04-01 Bruno Haible <bruno@clisp.org>
3283 * xgettext.c (main): Treat --keyword= like --keyword.
3285 2006-03-28 Bruno Haible <bruno@clisp.org>
3287 * filters.h: New file.
3288 * filter-sr-latin.c: New file, based on code from Danilo Šegan.
3289 * recode-sr-latin.c: New file.
3290 * msgfilter.c: Include filters.h, msgl-iconv.h, po-charset.h.
3291 (filter): New variable.
3292 (main): Recognize recode-sr-latin as built-in.
3293 (generic_filter): New function, extracted from process_string.
3294 (process_string): Call the filter.
3295 * Makefile.am (bin_PROGRAMS): Add recode-sr-latin.
3296 (noinst_HEADERS): Add filters.h.
3297 (msgfilter_SOURCES): Add filter-sr-latin.c.
3298 (recode_sr_latin_SOURCES, recode_sr_latin_LDADD,
3299 recode_sr_latin_CPPFLAGS, recode_sr_latin_LDFLAGS): New variables.
3300 * Makefile.msvc (PROGRAMS): Add recode-sr-latin.exe.
3301 (msgfilter_OBJECTS): Add filter-sr-latin.obj.
3302 (recode_sr_latin_OBJECTS): New variable.
3303 (filter-sr-latin.obj, recode-sr-latin.obj): New rules.
3304 (recode-sr-latin.exe): New rule.
3305 (install): Also install recode-sr-latin.exe.
3306 (uninstall): Also uninstall recode-sr-latin.exe.
3307 * Makefile.vms (PROGRAMS): Add recode-sr-latin.exe.
3308 (msgfilter_OBJECTS): Add filter-sr-latin.obj.
3309 (recode_sr_latin_OBJECTS): New variable.
3310 (filter-sr-latin.obj, recode-sr-latin.obj): New rules.
3311 (recode-sr-latin.exe): New rule.
3312 (install): Also install recode-sr-latin.exe.
3313 (uninstall): Also uninstall recode-sr-latin.exe.
3315 2006-03-28 Bruno Haible <bruno@clisp.org>
3317 * msgl-iconv.c: Include iconvstring.h. Don't include <errno.h>.
3318 (iconv_string): Remove function, moved to ../lib/.
3320 2006-03-19 Bruno Haible <bruno@clisp.org>
3322 * xgettext.h (struct callshape): New field 'xcomments'.
3323 (struct partial_call): New field 'xcomments'.
3324 * xgettext.c (split_keywordspec): Accept the ID:ARGNUM...,"XCOMMENT"
3326 (insert_keyword_callshape): Store the xcomments from the new shape.
3327 (arglist_parser_alloc, arglist_parser_clone): Update.
3328 (arglist_parser_done): After calling remember_a_message, attach the
3329 specified extracted comments.
3330 * x-perl.c (extract_variable): Update.
3331 Suggested by Behdad Esfahbod <behdad@cs.toronto.edu>.
3333 2006-03-19 Bruno Haible <bruno@clisp.org>
3335 * xgettext.c (arglist_parser_done): Use error_at_line instead of error.
3337 2006-03-16 Bruno Haible <bruno@clisp.org>
3339 * msggrep.c (grep_task): Increment size.
3340 (long_options): Add --extracted-comment option.
3341 (main): Handle --extracted-comment option.
3342 (no_pass, usage): Update.
3343 (is_message_selected_no_invert): Implement matching on extracted
3345 Suggested by Behdad Esfahbod <behdad@cs.toronto.edu>.
3347 2006-03-16 Bruno Haible <bruno@clisp.org>
3349 Handle GNOME glib context syntax.
3350 * xgettext.h (struct callshape): Add fields argnum1_glib_context,
3351 argnum2_glib_context.
3352 (struct partial_call): Add fields argnum1_glib_context,
3353 argnum2_glib_context.
3354 * xgettext.c (split_keywordspec): Recognize suffix 'g' and set the
3355 argnum1_glib_context, argnum2_glib_context fields.
3356 (insert_keyword_callshape, arglist_parser_alloc, arglist_parser_clone):
3358 (arglist_parser_done): When suffix 'g' was specified, split off the
3359 context from the msgid and/or msgid_plural.
3360 * x-perl.c (extract_variable): Update.
3361 Suggested by Danilo Šegan <danilo@gnome.org>.
3363 2006-03-16 Bruno Haible <bruno@clisp.org>
3365 * xgettext.c (set_format_flags_from_context): Break long line.
3367 2006-03-11 Bruno Haible <bruno@clisp.org>
3369 * message.c (fuzzy_search_goal_function): Use 'volatile double'.
3371 2006-03-11 Bruno Haible <bruno@clisp.org>
3373 Speed up msgmerge with large compendia.
3374 * message.h (message_list_free): Add keep_messages argument.
3375 (message_list_list_free): Add keep_level argument.
3376 (fuzzy_search_goal_function): New declaration.
3377 (FUZZY_THRESHOLD): New macro.
3378 * message.c (message_list_free): Add keep_messages argument.
3379 (fuzzy_search_goal_function): New function, extracted from
3380 message_list_search_fuzzy_inner.
3381 (message_list_search_fuzzy_inner): Use it.
3382 (message_list_search_fuzzy): Use symbolic value FUZZY_THRESHOLD.
3383 (message_list_list_free): Comment in. Add keep_level argument.
3384 (message_list_list_search_fuzzy): Comment out. Use symbolic value
3386 (msgdomain_free): Update.
3387 (msgdomain_list_search_fuzzy): Use symbolic value FUZZY_THRESHOLD.
3388 * po-charset.h: Include stddef.h.
3389 (character_iterator_t): New type.
3390 (po_charset_character_iterator): New declaration.
3391 * po-charset.c (char_iterator, euc_character_iterator,
3392 euc_jp_character_iterator, euc_tw_character_iterator,
3393 big5_character_iterator, big5hkscs_character_iterator,
3394 gbk_character_iterator, gb18030_character_iterator,
3395 shift_jis_character_iterator, johab_character_iterator,
3396 utf8_character_iterator, po_charset_character_iterator): New functions.
3397 * msgl-fsearch.h: New file.
3398 * msgl-fsearch.c: New file.
3399 * msgmerge.c: Include po-charset.h, msgl-fsearch.h.
3400 (compendium_filenames): New variable.
3401 (compendium): Also put the filename into compendium_filenames.
3402 (definitions_ty): New structure type.
3403 (definitions_init, definitions_init_findex, definitions_current_list,
3404 definitions_set_current_list, definitions_search,
3405 definitions_search_fuzzy, definitions_destroy): New functions.
3406 (match_domain): Change type of 'definitions' argument.
3407 (merge): Also convert the compendium to UTF-8. Use definitions_init,
3408 definitions_set_current_list, definitions_destroy.
3409 * msgfmt.c (main): Update.
3410 * Makefile.am (noinst_HEADERS): Add msgl-fsearch.h.
3411 (msgmerge_SOURCES): Add msgl-fsearch.c.
3412 (msgmerge_LDADD): Link with MSGMERGE_LIBM.
3413 * Makefile.msvc (msgmerge_OBJECTS): Add msgl-fsearch.obj.
3414 (msgl-fsearch.obj): New rule.
3415 * Makefile.vms (msgmerge_OBJECTS): Add msgl-fsearch.obj.
3416 (msgl-fsearch.obj): New rule.
3417 Reported by Clytie Siddall <clytie@riverland.net.au>.
3419 2006-03-09 Bruno Haible <bruno@clisp.org>
3421 * Makefile.am (CXXLINK) [!mingw]: Overwrite automake's value. Fixes
3422 unintended dependency on libstdc++ introduced on 2005-07-05.
3424 2005-10-09 Bruno Haible <bruno@clisp.org>
3426 * lang-table.h: New file.
3427 * lang-table.c: New file, extracted from msginit.c.
3428 * msginit.c: Include lang-table.h.
3429 (englishname_of_language): Use language_table.
3430 * Makefile.am (noinst_HEADERS): Add lang-table.h.
3431 (msginit_SOURCES): Add lang-table.c.
3432 * Makefile.msvc (MSGINIT_OBJECTS): Add lang-table.obj.
3433 (lang-table.obj): New rule.
3434 * Makefile.vms (MSGINIT_OBJECTS): Add lang-table.obj.
3435 (lang-table.obj): New rule.
3437 2006-02-12 Bruno Haible <bruno@clisp.org>
3439 * message.h (format_type): New enum value 'format_boost'.
3440 (NFORMATS): Increment.
3441 * message.c (format_language): Add format_boost entry.
3442 (format_language_pretty): Likewise.
3443 * format.h (formatstring_boost): New declaration.
3444 * format-boost.c: New file, based on format-c.c.
3445 * format.c (formatstring_parsers): Add formatstring_boost.
3446 * x-c.c (init_flag_table_c): Also register flags for boost-format.
3447 * xgettext.c (flag_table_cxx_qt, flag_table_cxx_boost): New variables.
3448 (recognize_format_boost): New variable.
3449 (main): Handle --boost option.
3450 (usage): Document --boost option.
3451 (xgettext_record_flag): Also fill flag_table_cxx_qt,
3452 flag_table_cxx_boost.
3453 (remember_a_message, remember_a_message_plural): In the heuristics,
3454 don't mark a string as c-format that is already known to be a qt-format
3456 (language_to_extractor): Use a flag_table_cxx_qt or
3457 flag_table_cxx_boost that is different from flag_table_c.
3458 * Makefile.am (FORMAT_SOURCE): Add format-boost.c.
3459 * Makefile.msvc (OBJECTS): Add format-boost.obj.
3460 (format-boost.obj): New rule.
3461 * Makefile.vms (OBJECTS): Add format-boost.obj.
3462 (format-boost.obj): New rule.
3465 2006-02-12 Bruno Haible <bruno@clisp.org>
3467 * xgettext.c (xgettext_record_flag): When asked to set "qt-format",
3468 really set "qt-format", not "c-format". Fixes bug introduced on
3471 2006-02-12 Bruno Haible <bruno@clisp.org>
3473 Reduce the number of false positives produced by the c-format guessing
3475 * format.h (struct formatstring_parser): Add 'is_unlikely_intentional'
3477 * format-awk.c (formatstring_awk): Update.
3478 * format-c.c (struct spec): Add 'unlikely_unintentional' field.
3479 (format_parse): Set unlikely_unintentional to true when encountering
3480 a "%...%" directive other than "%%".
3481 (format_is_unlikely_intentional): New function.
3482 (formatstring_c, formatstring_objc): Use it.
3483 * format-csharp.c (formatstring_csharp): Update.
3484 * format-elisp.c (formatstring_elisp): Update.
3485 * format-gcc-internal.c (formatstring_gcc_internal): Update.
3486 * format-java.c (formatstring_java): Update.
3487 * format-librep.c (formatstring_librep): Update.
3488 * format-lisp.c (formatstring_lisp): Update.
3489 * format-pascal.c (formatstring_pascal): Update.
3490 * format-perl.c (formatstring_perl): Update.
3491 * format-perl-brace.c (formatstring_perl_brace): Update.
3492 * format-php.c (format_php): Update.
3493 * format-python.c (formatstring_python): Update.
3494 * format-qt.c (formatstring_qt): Update.
3495 * format-scheme.c (formatstring_scheme): Update
3496 * format-sh.c (formatstring_sh): Update.
3497 * format-tcl.c (formatstring_tcl): Update.
3498 * format-ycp.c (formatstring_ycp, formatstring_smalltalk): Update.
3499 * xgettext.c (remember_a_message, remember_a_message_plural): Don't
3500 mark the message as c-format if the validity as c-format looks
3503 2006-02-12 Bruno Haible <bruno@clisp.org>
3505 * msgattrib.c (main): Update year in --version output.
3506 * msgcat.c (main): Likewise.
3507 * msgcmp.c (main): Likewise.
3508 * msgcomm.c (main): Likewise.
3509 * msgconv.c (main): Likewise.
3510 * msgen.c (main): Likewise.
3511 * msgexec.c (main): Likewise.
3512 * msgfilter.c (main): Likewise.
3513 * msgfmt.c (main): Likewise.
3514 * msggrep.c (main): Likewise.
3515 * msginit.c (main): Likewise.
3516 * msgmerge.c (main): Likewise.
3517 * msgunfmt.c (main): Likewise.
3518 * msguniq.c (main): Likewise.
3519 * xgettext.c (main): Likewise.
3521 2006-01-25 Bruno Haible <bruno@clisp.org>
3523 * x-php.c (x_php_lex): Treat byte values >= 127 like alphabetic.
3524 Reported by Hagen Fritsch <itooktheredpill@gmx.de>.
3526 2005-12-25 Bruno Haible <bruno@clisp.org>
3528 Tell Python developers to use named arguments in format strings.
3529 * format.h (get_python_format_unnamed_arg_count): New declaration.
3530 * format-python.c (get_python_format_unnamed_arg_count): New function.
3531 * xgettext.c (warn_format_string): New function.
3532 (remember_a_message, remember_a_message_plural): Call it.
3533 Suggested by Martin von Löwis.
3535 2005-12-07 Bruno Haible <bruno@clisp.org>
3537 * msgl-iconv.c (iconv_message_list): Fix syntax error.
3538 Reported by Dave Patton <dpatton@confluence.org>.
3540 2005-12-04 Bruno Haible <bruno@clisp.org>
3542 * Makefile.am (CSHARPCOMPFLAGS): Use value set by csharpcomp.m4.
3544 2005-11-29 Colin Watson <cjwatson@ubuntu.com>
3546 * msggrep.c (invert_match): New variable.
3547 (long_options): Add --invert-match option.
3548 (main): Handle --invert-match option.
3549 (usage): Document --invert-match option.
3550 (is_message_selected_no_invert): New function, extracted from
3551 is_message_selected.
3552 (is_message_selected): Call it. Handle match inversion.
3554 2005-11-01 Bruno Haible <bruno@clisp.org>
3556 * write-csharp.c (write_csharp_code): Add culture_name argument.
3557 Emit an AssemblyCulture note for it.
3558 (msgdomain_write_csharp): Update.
3559 Suggested by Pepa <cerna.zelva@seznam.cz>.
3561 2005-10-09 Bruno Haible <bruno@clisp.org>
3563 * plural-eval.h: New file.
3564 * plural-eval.c: Include plural-eval.h.
3565 (sigfpe_exit, sigfpe_code, sigfpe_handler, install_sigfpe_handler,
3566 uninstall_sigfpe_handler): New definitions, moved here from
3568 * msgl-check.c: Include plural.eval.h.
3569 (sigjmp_buf, sigsetjmp, siglongjmp, USE_SIGINFO): Move to plural-eval.h.
3570 (sigfpe_exit, sigfpe_code, sigfpe_handler, install_sigfpe_handler,
3571 uninstall_sigfpe_handler): Move to plural-eval.c.
3572 * Makefile.am (noinst_HEADERS): Add plural-eval.h.
3574 2005-10-09 Bruno Haible <bruno@clisp.org>
3576 * msgl-check.c: Include c-ctype.h instead of ctype.h.
3577 (check_plural): Use c_isspace instead of isspace.
3578 * x-librep.c: Include c-ctype.h instead of ctype.h.
3579 (read_token): Use c_isxdigit instead of isxdigit.
3580 * x-rst.c: Include c-ctype.h instead of ctype.h.
3581 (extract_rst): Use c_isdigit instead of isdigit.
3582 * x-ycp.c: Don't include ctype.h.
3584 2005-10-09 Bruno Haible <bruno@clisp.org>
3586 * plural-exp.c: Renamed from plural.c.
3587 * Makefile.am (libgettextsrc_la_SOURCES): Update.
3589 2005-10-18 Bruno Haible <bruno@clisp.org>
3591 Disambiguate overloaded function calls according to argument count.
3592 * xgettext.h (struct callshape): Add field 'argtotal'.
3593 (struct partial_call): Likewise.
3594 (arglist_parser_done): Add argnum argument.
3595 * xgettext.c (split_keywordspec): Recognize NNt syntax and fill
3597 (insert_keyword_callshape, arglist_parser_alloc, arglist_parser_clone):
3599 (arglist_parser_decidedp): Compare also the argtotal if given.
3600 (arglist_parser_done): Add argnum argument.
3601 * x-awk.c (extract_parenthesized): Pass arg count to
3602 arglist_parser_done.
3603 * x-c.c (extract_parenthesized): Likewise.
3604 * x-csharp.c (extract_parenthesized): Likewise.
3605 * x-elisp.c (read_object): Likewise.
3606 * x-java.c (extract_parenthesized): Likewise.
3607 * x-librep.c (read_object): Likewise.
3608 * x-lisp.c (read_object): Likewise.
3609 * x-perl.c (extract_variable): Update.
3610 (extract_balanced): Pass arg count to arglist_parser_done.
3611 * x-php.c (extract_parenthesized): Likewise.
3612 * x-python.c (extract_parenthesized): Likewise.
3613 * x-scheme.c (read_object): Likewise.
3614 * x-sh.c (read_command): Likewise.
3615 * x-tcl.c (read_command): Likewise.
3616 Stimulated by a patch from
3617 Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>.
3619 2005-10-09 Bruno Haible <bruno@clisp.org>
3621 * msginit.c (catalogname_for_locale, language_of_locale): Drop support
3622 of CEN locale name syntax.
3624 2005-10-05 Bruno Haible <bruno@clisp.org>
3626 * format.h (check_msgid_msgstr_format): Add plural_distribution
3628 * format.c (check_msgid_msgstr_format): Add plural_distribution
3629 argument. Use it for index dependent strictness.
3630 * msgl-check.h (check_message): Add plural_distribution argument.
3631 * msgl-check.c: Include xalloc.h.
3632 (check_plural_eval): Create a plural_distribution array as additional
3634 (check_plural): Return plural_distribution array as additional output
3636 (check_pair, check_message): Add plural_distribution argument.
3637 (check_message_list): Pass the plural_distribution from check_plural
3639 * gettext-po.c (po_message_check_format): Update.
3641 2005-10-04 Bruno Haible <bruno@clisp.org>
3643 Combine all msgfmt checks in a single place.
3644 * format.h (check_msgid_msgstr_format): Change return type to int.
3645 * format.c (check_msgid_msgstr_format): Return the number of errors.
3646 * msgl-check.h (check_plural): Remove declaration.
3647 * msgl-check.c (check_plural): Make static. Return the number of
3649 (check_pair): Return the number of errors.
3650 (check_message_list): Likewise.
3651 * msgfmt.c (main): Perform the message checks here, after all files
3652 were read. Call check_message_list instead of check_plural and
3653 check_message. Emit statistics of fatal errors.
3654 (msgfmt_frob_new_message): Don't call check_message here.
3656 2005-10-04 Bruno Haible <bruno@clisp.org>
3658 * msgl-check.h (check_message_list): New declaration.
3659 * msgl-check.c (check_message_list): New function.
3660 * gettext-po.c (po_file_check_all, po_message_check_all): Call
3661 check_message_list instead of check_message and check_plural.
3663 2005-10-04 Bruno Haible <bruno@clisp.org>
3665 Fix handling of obsolete messages.
3666 * msgl-check.c (check_plural): Ignore obsolete messages.
3667 * gettext-po.c (po_file_check_all, po_message_check_all,
3668 po_message_check_format): Likewise.
3670 2005-10-04 Bruno Haible <bruno@clisp.org>
3672 * msgl-check.h (check_message): Remove msgstr_pos argument.
3673 * msgl-check.c (check_pair, check_message): Remove msgstr_pos argument.
3674 * msgfmt.c (msgfmt_frob_new_message): Update.
3675 * gettext-po.c (po_file_check_all, po_message_check_all,
3676 po_message_check_format): Update.
3678 2005-10-03 Bruno Haible <bruno@clisp.org>
3680 Add support for contexts in xgettext.
3681 * xgettext.h: Include stdbool.h.
3682 (struct callshape): New structure type.
3683 (split_keywordspec): Return a struct callshape, not two integers,
3685 (struct callshapes): New structure type.
3686 (insert_keyword_callshape): New declaration.
3687 (remember_a_message): Add msgctxt argument.
3688 (struct partial_call): New structure type.
3689 (struct arglist_parser): New structure type.
3690 (arglist_parser_alloc, arglist_parser_clone, arglist_parser_remember,
3691 arglist_parser_decidedp, arglist_parser_done): New declarations.
3692 * xgettext.c (split_keywordspec): Return a struct callshape, not two
3693 integers, by reference. Handle the notation Nc for a context argument.
3694 (insert_keyword_callshape): New function.
3695 (remember_a_message): Add msgctxt argument. Free both strings when
3696 the message is excluded.
3697 (arglist_parser_alloc, arglist_parser_clone, arglist_parser_remember,
3698 arglist_parser_decidedp, arglist_parser_done): New functions.
3699 * x-awk.c (x_awk_keyword): Use callshape API: split_keywordspec,
3700 insert_keyword_callshape.
3701 (extract_parenthesized): Replace commas_to_skip, plural_commas
3702 arguments with a single argparser argument. Use arglist_parser_* API.
3703 (extract_awk): Update.
3704 * x-c.c (add_keyword): Use callshape API: split_keywordspec,
3705 insert_keyword_callshape.
3706 (init_keywords): Register the new functions [d[c]][n]pgettext.
3707 (init_flag_table_c, init_flag_table_objc): Likewise.
3708 (struct xgettext_token_ty): Replace argnum1, argnum2 with a callshapes
3711 (extract_parenthesized): Replace commas_to_skip, plural_commas
3712 arguments with a single argparser argument. Use arglist_parser_* API.
3713 (extract_whole_file): Update.
3714 * x-csharp.c (x_csharp_keyword): Use callshape API: split_keywordspec,
3715 insert_keyword_callshape.
3716 (extract_parenthesized): Replace commas_to_skip, plural_commas
3717 arguments with a single argparser argument. Use arglist_parser_* API.
3718 (extract_csharp): Update.
3719 * x-elisp.c (x_elisp_keyword): Use callshape API: split_keywordspec,
3720 insert_keyword_callshape.
3721 (read_object): Use arglist_parser_* API.
3722 * x-glade.c (start_element_handler, end_element_handler): Update.
3723 * x-java.c (x_java_keyword): Use callshape API: split_keywordspec,
3724 insert_keyword_callshape.
3725 (extract_parenthesized): Replace commas_to_skip, plural_commas
3726 arguments with a single argparser argument. Use arglist_parser_* API.
3727 (extract_java): Update.
3728 * x-librep.c (x_librep_keyword): Use callshape API: split_keywordspec,
3729 insert_keyword_callshape.
3730 (read_object): Use arglist_parser_* API.
3731 * x-lisp.c (x_lisp_keyword): Use callshape API: split_keywordspec,
3732 insert_keyword_callshape.
3733 (read_object): Use arglist_parser_* API.
3734 * x-perl.c (x_perl_keyword): Use callshape API: split_keywordspec,
3735 insert_keyword_callshape.
3736 (extract_balanced): Replace arg_sg, arg_pl arguments with arg,
3737 argparser arguments. Use arglist_parser_* API.
3738 (extract_variable, interpolate_keywords, extract_perl): Update.
3739 * x-php.c (x_php_keyword): Use callshape API: split_keywordspec,
3740 insert_keyword_callshape.
3741 (extract_parenthesized): Replace commas_to_skip, plural_commas
3742 arguments with a single argparser argument. Use arglist_parser_* API.
3743 (extract_php): Update.
3744 * x-python.c (x_python_keyword): Use callshape API: split_keywordspec,
3745 insert_keyword_callshape.
3746 (extract_parenthesized): Replace commas_to_skip, plural_commas
3747 arguments with a single argparser argument. Use arglist_parser_* API.
3748 (extract_python): Update.
3749 * x-rst.c (extract_rst): Update.
3750 * x-scheme.c (x_scheme_keyword): Use callshape API: split_keywordspec,
3751 insert_keyword_callshape.
3752 (read_object): Use arglist_parser_* API.
3753 * x-sh.c (x_sh_keyword): Use callshape API: split_keywordspec,
3754 insert_keyword_callshape.
3755 (read_word): Update.
3756 (read_command): Use arglist_parser_* API.
3757 * x-smalltalk.c (extract_smalltalk): Update.
3758 * x-tcl.c (x_tcl_keyword): Use callshape API: split_keywordspec,
3759 insert_keyword_callshape.
3760 (read_command): Use arglist_parser_* API.
3761 * x-ycp.c (extract_parenthesized): Update.
3763 2005-10-03 Bruno Haible <bruno@clisp.org>
3765 * xgettext.h (savable_comment_to_xgettext_comment): Remove
3767 (remember_a_message, remember_a_message_plural): Add a comment
3769 * xgettext.c (savable_comment_to_xgettext_comment): Make static.
3770 (remember_a_message): Add comment argument. Call
3771 savable_comment_to_xgettext_comment and savable_comment_reset at the
3773 (remember_a_message_plural): Add comment argument. Call
3774 savable_comment_to_xgettext_comment and xgettext_comment_reset,
3775 savable_comment_reset at the end.
3776 * x-awk.c (extract_parenthesized): Pass comment to remember_a_message.
3777 * x-c.c (extract_parenthesized): Likewise.
3778 * x-csharp.c (extract_parenthesized): Likewise.
3779 * x-elisp.c (read_object): Likewise.
3780 * x-glade.c (start_element_handler, end_element_handler): Likewise.
3781 * x-java.c (extract_parenthesized): Likewise.
3782 * x-librep.c (read_object): Likewise.
3783 * x-lisp.c (read_object): Likewise.
3784 * x-perl.c (extract_variable, interpolate_keywords, extract_balanced):
3786 * x-php.c (extract_parenthesized): Likewise.
3787 * x-python.c (extract_parenthesized): Likewise.
3788 * x-scheme.c (read_object): Likewise.
3789 * x-sh.c (read_word, read_command): Likewise.
3790 * x-smalltalk.c (extract_smalltalk): Likewise.
3791 * x-tcl.c (read_command): Likewise.
3792 * x-ycp.c (extract_parenthesized): Likewise.
3793 * x-rst.c (extract_rst): Update.
3795 2005-10-03 Bruno Haible <bruno@clisp.org>
3797 * xgettext.h (xgettext_comment_add, xgettext_comment,
3798 xgettext_comment_reset): Remove declarations.
3799 * xgettext.c (xgettext_comment_add, xgettext_comment,
3800 xgettext_comment_reset): Make static.
3802 2005-10-03 Bruno Haible <bruno@clisp.org>
3804 Use savable_comment_* API instead of xgettext_comment_* API.
3805 * x-awk.c (phase2_getc): Call savable_comment_add instead of
3806 xgettext_comment_add.
3807 (x_awk_lex): Call savable_comment_reset instead of
3808 xgettext_comment_reset.
3809 (extract_parenthesized): Call savable_comment_to_xgettext_comment and
3810 savable_comment_reset around remember_a_message.
3811 * x-elisp.c (comment_line_end): Call savable_comment_add instead of
3812 xgettext_comment_add.
3813 (read_object): Call savable_comment_reset instead of
3814 xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3815 savable_comment_reset around remember_a_message.
3816 * x-glade.c (start_element_handler, end_element_handler): Call
3817 savable_comment_to_xgettext_comment and savable_comment_reset around
3818 remember_a_message. Call savable_comment_reset instead of
3819 xgettext_comment_reset.
3820 (comment_handler): Call savable_comment_add instead of
3821 xgettext_comment_add.
3822 * x-librep.c (comment_line_end): Call savable_comment_add instead of
3823 xgettext_comment_add.
3824 (read_object): Call savable_comment_reset instead of
3825 xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3826 savable_comment_reset around remember_a_message.
3827 * x-lisp.c (comment_line_end): Call savable_comment_add instead of
3828 xgettext_comment_add.
3829 (read_object): Call savable_comment_reset instead of
3830 xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3831 savable_comment_reset around remember_a_message.
3832 * x-perl.c (phase2_getc): Call savable_comment_add instead of
3833 xgettext_comment_add.
3834 (extract_variable, interpolate_keywords): Call
3835 savable_comment_to_xgettext_comment and savable_comment_reset around
3837 (x_perl_prelex): Call savable_comment_reset instead of
3838 xgettext_comment_reset.
3839 (extract_balanced): Call savable_comment_to_xgettext_comment and
3840 savable_comment_reset around remember_a_message.
3841 * x-php.c (comment_line_end): Call savable_comment_add instead of
3842 xgettext_comment_add.
3843 (x_php_lex): Call savable_comment_reset instead of
3844 xgettext_comment_reset.
3845 (extract_parenthesized): Call savable_comment_to_xgettext_comment and
3846 savable_comment_reset around remember_a_message.
3847 * x-scheme.c (comment_line_end): Call savable_comment_add instead of
3848 xgettext_comment_add.
3849 (read_object): Call savable_comment_reset instead of
3850 xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3851 savable_comment_reset around remember_a_message.
3852 * x-sh.c (comment_line_end): Call savable_comment_add instead of
3853 xgettext_comment_add.
3854 (read_word): Call savable_comment_reset instead of
3855 xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3856 savable_comment_reset around remember_a_message.
3857 (read_command): Call savable_comment_to_xgettext_comment and
3858 savable_comment_reset around remember_a_message.
3859 * x-smalltalk.c (comment_line_end): Call savable_comment_add instead of
3860 xgettext_comment_add.
3861 (phase2_get): Call savable_comment_reset instead of
3862 xgettext_comment_reset.
3863 (extract_smalltalk): Call savable_comment_to_xgettext_comment and
3864 savable_comment_reset around remember_a_message.
3865 * x-tcl.c (comment_line_end): Call savable_comment_add instead of
3866 xgettext_comment_add.
3867 (read_word): Call savable_comment_reset instead of
3868 xgettext_comment_reset.
3869 (read_command): Call savable_comment_to_xgettext_comment and
3870 savable_comment_reset around remember_a_message.
3871 * x-ycp.c (phase2_getc): Call savable_comment_add instead of
3872 xgettext_comment_add.
3873 (x_ycp_lex): Call savable_comment_reset instead of
3874 xgettext_comment_reset.
3875 (extract_parenthesized): Call savable_comment_to_xgettext_comment and
3876 savable_comment_reset around remember_a_message.
3878 2005-10-03 Bruno Haible <bruno@clisp.org>
3880 * message.c (message_list_hash_insert_entry): Update.
3882 2005-10-03 Bruno Haible <bruno@clisp.org>
3884 * message.c (message_list_alloc, message_list_free,
3885 message_list_hash_insert_entry, message_list_remove_if_not,
3886 message_list_msgids_changed, message_list_search): Update.
3887 * write-qt.c (write_qm): Update.
3888 * xgettext.c (flag_context_list_table_lookup,
3889 flag_context_list_table_insert): Update.
3890 * x-awk.c (x_awk_keyword, extract_parenthesized): Update.
3891 * x-c.c (add_keyword, x_c_lex): Update.
3892 * x-csharp.c (x_csharp_keyword, extract_parenthesized: Update.
3893 * x-elisp.c (x_elisp_keyword, read_object): Update.
3894 * x-glade.c (x_glade_keyword, start_element_handler): Update.
3895 * x-java.c (x_java_keyword, extract_parenthesized): Update.
3896 * x-librep.c (x_librep_keyword, read_object): Update.
3897 * x-lisp.c (x_lisp_keyword, read_object): Update.
3898 * x-perl.c (x_perl_keyword, extract_variable, interpolate_keywords,
3899 extract_balanced): Update.
3900 * x-php.c (x_php_keyword, extract_parenthesized): Update.
3901 * x-python.c (x_python_keyword, extract_parenthesized): Update.
3902 * x-scheme.c (x_scheme_keyword, read_object): Update.
3903 * x-sh.c (x_sh_keyword, read_command): Update.
3904 * x-tcl.c (x_tcl_keyword, read_command): Update.
3906 2005-10-01 Bruno Haible <bruno@clisp.org>
3908 Support for context dependent translations in PO files.
3909 * message.h (MSGCTXT_SEPARATOR): New macro.
3910 (struct message_ty): Add 'msgctxt' field.
3911 (message_alloc): Add msgctxt argument.
3912 (is_header): New macro.
3913 (message_list_search, message_list_search_fuzzy,
3914 message_list_list_search, message_list_list_search_fuzzy,
3915 msgdomain_list_search, msgdomain_list_search_fuzzy): Add msgctxt
3917 * message.c: Include xallocsa.h.
3918 (message_alloc): Add msgctxt argument.
3919 (message_copy): Update.
3920 (message_list_hash_insert_entry): New function.
3921 (message_list_append, message_list_prepend, message_list_insert_at,
3922 message_list_msgids_changed): Use it.
3923 (message_list_search): Add msgctxt argument.
3924 (message_list_search_fuzzy_inner): Likewise.
3925 (message_list_search_fuzzy): Likewise.
3926 (message_list_list_search): Likewise.
3927 (message_list_list_search_fuzzy): Likewise.
3928 * msgl-ascii.c (is_ascii_message): Also test the msgctxt.
3929 * write-po.c (message_print): Warn if some msgctxt has non-ASCII
3930 characters. Write out the msgctxt.
3931 (message_print_obsolete): Likewise.
3932 (msgdomain_list_print_po): Use is_header macro.
3933 (msgdomain_list_print): Likewise. Bail out if contexts are present and
3934 cannot be stored in the given output format.
3935 * write-properties.c (write_message): Use is_header macro.
3936 * po-lex.c: Include message.h.
3937 (keyword_p): Also recognize 'msgctxt'.
3938 (po_gram_lex): Bail out if a string contains the EOT character.
3939 * read-po-abstract.h (struct abstract_po_reader_class_ty): Add msgctxt
3940 argument to directive_message function pointer.
3941 (po_callback_message): Add msgctxt argument.
3942 * read-po-abstract.c (call_directive_message, po_callback_message): Add
3944 * po-gram-gen.y (do_callback_message): Add msgctxt argument. Use
3946 (MSGCTXT): New token type.
3947 (message_intro, MSGCTXT): Declare return types.
3948 (message): Use message_intro instead of just MSGID.
3949 (message_intro): New nonterminal reduction rules.
3950 * read-properties.c (properties_parse): Update.
3951 * read-stringtable.c (stringtable_parse): Update.
3952 * read-po.h (struct default_po_reader_class_ty): Add msgctxt argument
3953 to add_message field.
3954 (default_directive_message, default_add_message): Likewise.
3955 * read-po.c (call_add_message, default_directive_message,
3956 default_add_message): Add msgctxt argument.
3957 * msgl-iconv.c (convert_msgid): Also convert the msgctxt.
3958 (iconv_message_list): Use is_header macro. Test also the msgctxt for
3960 * msgl-cat.c (is_message_selected, is_message_needed): Use is_header
3962 (catenate_msgdomain_list): Likewise. Update.
3963 * msgl-equal.c (message_equal): Likewise. Also compare the msgctxt.
3964 * msgcmp.c (is_message_selected): Use is_header macro.
3965 (match_domain): Update.
3966 (compare): Use is_header macro.
3967 * msgmerge.c (message_merge, match_domain): Use is_header macro.
3970 * msgattrib.c (is_message_selected): Use is_header macro.
3971 (process_message_list): Likewise. Update.
3972 * msgl-charset.c (compare_po_locale_charsets): Use is_header macro.
3973 * msgexec.c (process_string): Also set or unset MSGEXEC_MSGCTXT
3975 * msgfilter.c (process_message): Use is_header macro.
3976 * msggrep.c (grep_task): Increase size from 3 to 4.
3977 (long_options): Add --msgctxt option.
3978 (main): Accept -J/--msgctxt option. Update grep_pass numbers.
3980 (usage): Mention -J option.
3981 (is_message_selected): Use is_header macro. Perform a new grep pass on
3983 * msginit.c (fill_header): Use is_header macro. Update.
3984 (update_msgstr_plurals): Update.
3985 * read-mo.c (read_mo_file): Split msgid into msgctxt and msgid. Update.
3986 * read-tcl.c (msgdomain_read_tcl): Use is_header macro.
3987 * msgl-check.c (check_plural): Update.
3988 (check_message): Use is_header macro.
3989 * write-mo.c (write_table): Write msgid with msgctxt, instead of just
3991 * write-java.c: Include xerror.h.
3992 (write_java_code): Update.
3993 (msgdomain_write_java): Give error if some entries have a context.
3994 * write-csharp.c: Include xerror.h.
3995 (write_csharp_code): Update.
3996 (msgdomain_write_csharp): Give error if some entries have a context.
3997 * write-resources.c (msgdomain_write_csharp_resources): Bail out if
3998 contexts are present and cannot be stored in the given output format.
3999 * write-tcl.c (write_msg): Use is_header macro.
4000 (msgdomain_write_tcl): Bail out if contexts are present and cannot be
4001 stored in the given output format.
4002 * write-qt.c: Include hash.h.
4003 (write_qm): Use is_header macro. Write out msgctxt if present. Write
4004 a contexts section if appropriate.
4005 * msgfmt.c (msgfmt_add_message): Add msgctxt argument.
4006 (msgfmt_frob_new_message): Use is_header macro.
4007 * xgettext.c (exclude_directive_message): Add msgctxt argument.
4008 (remember_a_message, construct_header, finalize_header): Update.
4009 * x-po.c (extract_add_message): Add msgctxt argument. Update.
4011 * gettext-po.h (po_message_msgctxt, po_message_set_msgctxt): New
4013 * gettext-po.c (po_file_domain_header): Use is_header macro.
4014 (po_message_create): Update.
4015 (po_message_msgctxt, po_message_set_msgctxt): New functions.
4016 (po_message_check_all): Use is_header macro.
4018 2005-10-01 Bruno Haible <bruno@clisp.org>
4020 Avoid a crash when msgcat or msgconv is asked to convert a non-ASCII
4022 * msgl-iconv.h (iconv_message_list): Change return type to boolean.
4023 * msgl-iconv.c (iconv_message_list): Likewise. Return true if some
4025 * msgl-cat.c (catenate_msgdomain_list): Exit with an error message if
4026 the msgids change through charset conversion.
4028 2005-10-04 Bruno Haible <bruno@clisp.org>
4030 * format.c: Include stdbool.h.
4031 (check_msgid_msgstr_format): Enable strict checking also when
4032 msgid_plural is present but nplurals = 1.
4033 Reported by Farzaneh Sarafraz <farzaneh@farsiweb.info>.
4035 2005-10-01 Bruno Haible <bruno@clisp.org>
4037 Change msgattrib to no longer remove extracted comments and file
4038 positions when marking messages obsolete.
4039 * msgmerge.c (merge): When marking a message obsolete, remove the
4040 extracted comments and file positions.
4041 * write-po.c (message_print_obsolete): Also print the extracted
4042 comments and file positions.
4044 2005-09-25 Bruno Haible <bruno@clisp.org>
4046 Support for Python source encodings (PEP 0263).
4047 * x-python.c: Include progname.h, basename.h, xerror.h, strstr.h,
4048 c-ctype.h, utf8-ucs4.h.
4049 (phase1_pushback): Reduce size.
4051 (phase2_pushback, phase2_pushback_length): New variables.
4052 (phase2_getc, phase2_ungetc): New functions.
4053 (struct unicode_string_buffer): New structure type.
4054 (init_unicode_string_buffer, unicode_string_buffer_append_unicode_grow,
4055 unicode_string_buffer_append_unicode, unicode_string_buffer_result,
4056 free_unicode_string_buffer): New functions.
4057 (comment_buffer): New variable.
4058 (buffer, bufmax, buflen): Remove variables.
4059 (comment_start, comment_add, comment_line_end): Rewritten.
4060 (comment_at_start): New function.
4061 (xgettext_current_file_source_encoding): New variable.
4062 (xgettext_current_file_source_iconv): New variable.
4063 (set_current_file_source_encoding, try_to_extract_coding): New
4065 (continuation_or_nonblank_line): New variable.
4066 (phase3_getc): Renamed from phase2_getc. Use phase2_getc instead of
4067 phase1_getc. Return a Unicode character. Call try_to_extract_coding
4068 when seeing a comment among the first two lines.
4069 (phase3_ungetc): Renamed from phase2_ungetc. Use phase2_ungetc instead
4071 (UNICODE, IS_UNICODE, UNICODE_VALUE): New macros.
4072 (struct mixed_string_buffer): New structure type.
4073 (init_mixed_string_buffer, mixed_string_buffer_append_byte,
4074 mixed_string_buffer_append_unicode_grow,
4075 mixed_string_buffer_append_unicode,
4076 mixed_string_buffer_flush_utf16_surr,
4077 mixed_string_buffer_flush_curr_buffer, mixed_string_buffer_append,
4078 mixed_string_buffer_result, free_mixed_string_buffer): New functions.
4079 (phase7_getuc): Use phase2_getc instead of phase1_getc. Return a
4080 Unicode character except for \ooo and \xnn.
4081 (phase5_get): Operate on the level of Unicode characters instead of
4082 at the level of bytes. Use a mixed_string_buffer to accumulate a
4084 (extract_parenthesized): Set xgettext_current_source_encoding to UTF-8
4085 while passing UTF-8 strings to the xgettext main code.
4086 (extract_python): Initialize xgettext_current_file_source_encoding and
4087 xgettext_current_source_encoding.
4089 2005-09-25 Bruno Haible <bruno@clisp.org>
4091 * x-csharp.c (phase2_getc): Fix mis-use of iconv() when the source
4092 encoding is neither ASCII nor UTF-8.
4094 2005-09-20 Bruno Haible <bruno@clisp.org>
4096 * msgattrib.c (main): Invoke bindtextdomain for bison-runtime.
4097 * msgcat.c (main): Likewise.
4098 * msgcmp.c (main): Likewise.
4099 * msgcomm.c (main): Likewise.
4100 * msgconv.c (main): Likewise.
4101 * msgen.c (main): Likewise.
4102 * msgexec.c (main): Likewise.
4103 * msgfilter.c (main): Likewise.
4104 * msggrep.c (main): Likewise.
4105 * msginit.c (main): Likewise.
4106 * msgmerge.c (main): Likewise.
4107 * msgunfmt.c (main): Likewise.
4108 * msguniq.c (main): Likewise.
4109 * xgettext.c (main): Likewise.
4110 * Makefile.am (DEFS): Also define BISON_LOCALEDIR.
4112 2005-09-17 Bruno Haible <bruno@clisp.org>
4114 * msgl-check.h: New file.
4115 * msgl-check.c: New file, mostly extracted from msgfmt.c.
4116 * Makefile.am (noinst_HEADERS): Add msgl-check.h.
4117 (libgettextsrc_la_SOURCES): Add msgl-check.c, plural-eval.c.
4118 (msgfmt_SOURCES): Remove plural-eval.c.
4119 * format.c (check_msgid_msgstr_format): Add const to argument type.
4120 * format.h (check_msgid_msgstr_format): Add const to argument type.
4121 * gettext-po.c: Include msgl-check.h.
4122 (po_file_check_all, po_message_check_all): New functions.
4123 (po_xerror_logger): Remove function.
4124 (po_message_check_format): Use new check_message function.
4125 * gettext-po.h (po_file_check_all, po_message_check_all): New
4127 * msgfmt.c: Include msgl-check.h instead of setjmp.h, signal.h,
4128 stdarg.h, po-xerror.h, format.h, plural-exp.h, plural-table.h,
4130 (SIZEOF, sigjmp_buf, sigsetjmp, siglongjmp, USE_SIGINFO,
4131 sigfpe_exit, sigfpe_code, sigfpe_handler, install_sigfpe_handler,
4132 uninstall_sigfpe_handler, check_plural_eval, plural_help, check_plural,
4133 curr_mp, curr_msgid_pos, formatstring_error_logger, check_pair,
4134 check_header_entry): Move definitions to msgl-check.c.
4136 (msgfmt_frob_new_message): Call check_message instead of
4137 check_header_entry and check_pair.
4139 2005-09-17 Bruno Haible <bruno@clisp.org>
4141 Use new error handlers in libgettextpo.
4142 * gettext-po.h (PO_SEVERITY_WARNING, PO_SEVERITY_ERROR,
4143 PO_SEVERITY_FATAL_ERROR): New macros.
4144 (po_xerror_handler): New structure type.
4145 (po_xerror_handler_t): New type.
4146 (po_file_read): Change signature; version 3.
4147 (po_file_write): Change signature; version 2.
4148 (po_message_check_format): Change signature; version 2.
4149 * gettext-po.c: Include po-xerror.h.
4150 (po_file_read): New implementation. Renamed old implementation to
4152 (po_file_write): New implementation. Keep old implementation.
4153 (po_xerror_logger): New function.
4154 (po_message_check_format): New implementation. Keep old implementation.
4156 2005-09-17 Bruno Haible <bruno@clisp.org>
4158 * msgfmt.c (check_plural): Fix broken determination of max_nplurals.
4160 2005-09-17 Bruno Haible <bruno@clisp.org>
4162 New, higher-level error message output primitives.
4163 * po-xerror.h: New file.
4164 * po-xerror.c: New file.
4165 * open-po.c: Include xerror.h, po-xerror.h, not error.h.
4166 (open_po_file): Use po_xerror instead of error.
4167 * po-charset.c: Include po-xerror.h, not po-error.h.
4168 (po_lex_charset_set): Use po_xerror instead of po_multiline_warning.
4169 * po-lex.c: Include xerror.h, po-error.h, po-xerror.h.
4170 (po_gram_error, po_gram_error_at_line): Use po_xerror instead of
4171 po_error or po_error_at_line. Don't decrement error_message_count;
4172 let the caller do this instead.
4173 (mbfile_getc, lex_getc): Use po_xerror instead of po_error.
4174 * po-lex.h: Don't include po-error.h.
4175 (po_gram_error, po_gram_error_at_line): Remove optimized macros.
4176 * read-po-abstract.c: Include xerror.h, po-xerror.h.
4177 (po_scan): Use po_xerror instead of po_error.
4178 * read-po.c: Include po-xerror.h.
4179 (default_add_message): Use po_xerror2 instead of po_gram_error_at_line
4181 * read-properties.c: Include xerror.h, po-xerror.h, not exit.h.
4182 (phase1_getc, phase4_getuc): Use po_xerror instead of error.
4183 * read-stringtable.c: Include xerror.h, po-xerror.h, not exit.h.
4184 (phase1_getc, read_string, stringtable_parse): Use po_xerror instead of
4186 * write-po.c: Include po-xerror.h, not exit.h, po-error.h.
4187 (wrap): Pass the entire message as argument. Use po_xerror instead of
4189 (message_print, message_print_obsolete): Update. Use po_xerror instead
4190 of po_multiline_warning.
4191 (msgdomain_list_print): Use po_xerror instead of po_error or
4193 * msgl-iconv.h (struct conversion_context): Add 'message' field.
4194 * msgl-iconv.c: Include xerror.h, po-xerror.h, not error.h, exit.h.
4195 (conversion_error): Use po_xerror instead of error.
4196 (iconv_message_list): Likewise. Set the entire message in the
4197 conversion context before calling convert_*.
4198 (iconv_msgdomain_list): Use po_xerror instead of error.
4199 * xgettext.c (from_current_source_encoding): Set context.message.
4200 * msgfmt.c: Include po-xerror.h.
4201 (check_plural_eval): Pass the entire header as argument. Use po_xerror
4202 instead of error_at_line.
4203 (plural_help): New function, extracted from check_plural.
4204 (check_plural): Change type of local variables has_plural, min_pos,
4205 max_pos. Use po_xerror2 instead of error_at_line pairs. Use po_xerror
4206 instead of error_at_line.
4207 (curr_mp): New variable.
4208 (formatstring_error_logger): Use po_xerror instead of vfprintf.
4209 (check_pair): Take the entire message as argument. Use po_xerror
4210 instead of error_at_line. Set curr_mp before calling
4211 check_msgid_msgstr_format.
4212 (check_header_entry): Take the entire header message as argument. Use
4213 po_xerror instead of multiline_error.
4214 (msgfmt_frob_new_message): Update.
4215 * msgcmp.c (match_domain): Decrement error_message_count between two
4216 error messages that belong together.
4217 * msgmerge.c (match_domain): Decrement error_message_count between two
4218 error messages that belong together.
4219 * Makefile.am (noinst_HEADERS): Add po-xerror.h.
4220 (COMMON_SOURCE): Add po-xerror.c.
4222 2005-09-16 Bruno Haible <bruno@clisp.org>
4224 * gettext-po.c (po_file_read): Set gram_max_allowed_errors to a large
4225 integer, so that po_gram_error doesn't cause the program to exit().
4227 2005-09-14 Bruno Haible <bruno@clisp.org>
4229 * x-csharp.c: Include xerror.h.
4231 2005-09-11 Bruno Haible <bruno@clisp.org>
4233 * user-email.sh.in: Add support for Mozilla Thunderbird and GNOME
4234 Evolution 2. Improve mutt support.
4236 2005-08-26 Bruno Haible <bruno@clisp.org>
4238 * plural-table.c (plural_table): Add an entry about Romanian.
4239 Explanations by Eddy Petrişor <eddy.petrisor@gmail.com>.
4241 2005-08-23 Bruno Haible <bruno@clisp.org>
4243 * write-mo.h (byteswap): New variable.
4244 * write-mo.c: Include byteswap.h.
4245 (byteswap): New variable.
4246 (BSWAP32): New macro.
4247 (write_table): If requested, byteswap all 32-bit values before writing
4249 * msgfmt.c (long_options): Add --endianness.
4250 (main): Accept --endianness argument and set byteswap.
4252 2005-08-08 Bruno Haible <bruno@clisp.org>
4254 * msginit.c (catalogname_for_locale): Add support for Old English,
4255 Hyam, Jju, Tyap, Maithili, Nahuatl, Low Saxon, Northern Sotho, Páez,
4257 (englishname_of_language): Add support for Old English, Hyam, Jju,
4258 Tyap, Kagoma, Maithili, Mayan, Nahuatl, Low Saxon, Northern Sotho,
4259 Páez, Tetum, Zapotec.
4261 2005-05-21 Bruno Haible <bruno@clisp.org>
4263 New undocumented option, used by glocale PO files.
4264 * msgfmt.c (include_fuzzies): Renamed from include_all.
4265 (include_untranslated): New variable.
4266 (long_options): Add --use-untranslated.
4267 (main): Handle --use-untranslated.
4268 (msgfmt_frob_new_message): Test include_untranslated.
4269 (msgfmt_comment_special): Update.
4271 2005-07-26 Bruno Haible <bruno@clisp.org>
4273 * user-email.sh.in (datarootdir): New variable.
4275 2005-07-26 Bruno Haible <bruno@clisp.org>
4277 Fix compilation error on systems without iconv().
4278 * xgettext.c (convert_string): Remove fallback macro definition.
4279 (from_current_source_encoding) [!HAVE_ICONV]: Just abort here.
4281 2005-07-17 Bruno Haible <bruno@clisp.org>
4283 * po-lex.c (mb_width): Remove gcc warnings on platform with unsigned
4284 'char' type (e.g. Linux/PowerPC).
4285 Reported by Jeff Rizzo <riz@netbsd.org>.
4287 2005-07-05 Bruno Haible <bruno@clisp.org>
4289 * Makefile.am (msgmerge_SOURCES, xgettext_SOURCES, msgattrib_SOURCES,
4290 msgcat_SOURCES, msgcomm_SOURCES, msgconv_SOURCES, msgen_SOURCES,
4291 msgfilter_SOURCES, msggrep_SOURCES, msguniq_SOURCES): On mingw, use
4293 (libgettextsrc_la_LDFLAGS, libgettextpo_la_LDFLAGS): Use LTNOUNDEF.
4294 (format_CFLAGS): New variable.
4295 (format.lo): New rule.
4296 (msg*_CFLAGS, xgettext_CFLAGS): Remove variables.
4297 (msg*_CPPFLAGS, xgettext_CPPFLAGS): New variables.
4299 2005-05-27 Bruno Haible <bruno@clisp.org>
4301 * write-po.c (wrap): Output \a and \v as an escape sequence, like
4303 Suggested by Asgeir Frimannsson <asgeirf@redhat.com>.
4305 2005-05-05 Bruno Haible <bruno@clisp.org>
4307 * Makefile.am (msgfmt_SOURCES): Add hash-string.c.
4308 * Makefile.msvc (msgfmt_OBJECTS): Add hash-string.obj.
4309 (hash-string.obj): New rule.
4310 * Makefile.vms (msgfmt_OBJECTS): Add hash-string.obj.
4311 (hash-string.obj): New rule.
4313 2005-05-01 Bruno Haible <bruno@clisp.org>
4315 * x-sh.c (open_singlequote_terminator): New variable.
4316 (saw_opening_singlequote): Set it.
4317 (phase2_getc): Handle the case of open_singlequote_terminator == '"'.
4318 (read_word): Likewise. Treat i18n quotes like single quotes with
4320 Reported by Jakub Bogusz <qboosh@pld-linux.org>.
4322 2005-05-01 Bruno Haible <bruno@clisp.org>
4324 Improved error message.
4325 * msgl-iconv.h (struct conversion_context): New type.
4326 (convert_string): Add context argument.
4327 * msgl-iconv.c (conversion_error): New function.
4328 (convert_string, convert_string_list, convert_msgid, convert_msgstr):
4329 Add context argument.
4330 (iconv_message_list): Construct context for them.
4331 * xgettext.c (convert_string): Add context argument.
4332 (from_current_source_encoding): Construct context for convert_string.
4333 Reported by Hans Ulrich Niedermann <debian@n-dimensional.de>.
4335 2005-04-18 Bruno Haible <bruno@clisp.org>
4337 * po-lex.h (po_gram_error, po_gram_error_at_line): Test for
4338 __APPLE_CC__ > 1. Needed because gcc-4.0 defines __APPLE_CC__ and
4339 implements __VA_ARGS__ correctly.
4340 * po-lex.c (po_gram_error, po_gram_error_at_line): Likewise.
4341 * read-stringtable.c (phase2_getc): Optimize UTF-8 code. Avoids
4344 2006-06-21 Bruno Haible <bruno@clisp.org>
4346 * gettext-0.14.6 released.
4348 2006-06-21 Bruno Haible <bruno@clisp.org>
4350 * Makefile.am (CLEANFILES): Add msgfmt.net.exe.mdb,
4351 msgunfmt.net.exe.mdb.
4353 2006-06-21 Bruno Haible <bruno@clisp.org>
4355 * gettext-po.h (LIBGETTEXTPO_VERSION): Bump version number.
4357 2006-06-20 Bruno Haible <bruno@clisp.org>
4359 * format-gcc-internal.c (struct unnumbered_arg): Remove type.
4360 (struct numbered_arg): New type.
4361 (struct spec): Use it.
4362 (isdigit): New macro.
4363 (numbered_arg_compare): New function.
4364 (format_parse, format_free, format_check, format_print): Update to
4365 GCC 4.1 internal format strings.
4366 Reported by Göran Uddeborg <goeran@uddeborg.se>.
4368 2005-05-23 Bruno Haible <bruno@clisp.org>
4370 * gettext-0.14.5 released.
4372 2005-05-23 Bruno Haible <bruno@clisp.org>
4374 * gettext-po.h (LIBGETTEXTPO_VERSION): Bump version number.
4376 2005-05-21 Bruno Haible <bruno@clisp.org>
4378 * format-gcc-internal.c: Update for GCC 4.0.
4379 (FAT_POINTER, FAT_SIZE_LONGLONG, FAT_SIZE_WIDE, FAT_SIZE_MASK): New
4382 (struct spec): Add uses_err_no field.
4383 (format_parse): Initialize uses_err_no field. Handle %q flag. Handle
4384 'll', 'w' size specifiers. Handle %<, %>, %', %m, %p, %J directives.
4385 (format_check): Also check that the use of err_no is the same.
4386 Based on a patch by Jakub Jelinek <jakub@redhat.com>.
4388 2005-04-11 Bruno Haible <bruno@clisp.org>
4390 * gettext-0.14.4 released.
4392 2005-04-11 Bruno Haible <bruno@clisp.org>
4394 * gettext-po.h (LIBGETTEXTPO_VERSION): Bump version number.
4396 2005-03-14 Bruno Haible <bruno@clisp.org>
4398 * gettext-0.14.3 released.
4400 2005-03-08 Bruno Haible <bruno@clisp.org>
4402 * gettext-po.h (LIBGETTEXTPO_VERSION): Bump version number.
4404 2005-02-26 Bruno Haible <bruno@clisp.org>
4406 * format-scheme.c (format_arg_type): Add FAT_COMPLEX. Remove
4408 (make_intersected_element): Simplify also the intersection with
4410 (make_union_element): Simplify also the union with FAT_COMPLEX.
4412 (nocheck_params): Remove function.
4413 (parse_upto): Remove handling of ~W, ~<, ~>.
4414 Implement non-CL handling of ~C, ~I, ~_, ~/, ~T.
4415 Implement handling of ~Y, ~!, ~Q, ~K.
4417 2005-02-26 Bruno Haible <bruno@clisp.org>
4419 * format-scheme.c (parse_upto): Remove support for ~!.
4420 Reported by Kevin Ryde <user42@zip.com.au>.
4422 2005-02-24 Bruno Haible <bruno@clisp.org>
4424 * gettext-0.14.2 released.
4426 2005-02-12 Bruno Haible <bruno@clisp.org>
4428 * Makefile.msvc (gettextpo.lib): Link with intl.lib as well.
4430 2005-02-12 Bruno Haible <bruno@clisp.org>
4432 * Makefile.msvc (msginit_OBJECTS): Add plural-count.obj.
4433 * Makefile.vms (msginit_OBJECTS): Add plural-count.obj.
4435 2005-02-10 Bruno Haible <bruno@clisp.org>
4437 * gettext-po.h (po_header_set_field): New declaration.
4438 * gettext-po.c (po_header_set_field): New function.
4439 Suggested by Ross Golder <ross@golder.org>.
4441 2005-02-10 Bruno Haible <bruno@clisp.org>
4443 * gettext-po.h (LIBGETTEXTPO_VERSION): New macro.
4444 (libgettextpo_version): New declaration.
4445 * gettext-po.c (libgettextpo_version): New variable.
4447 2005-02-10 Bruno Haible <bruno@clisp.org>
4449 * gettext-po.h (po_message_remove_filepos, po_message_add_filepos): New
4451 * gettext-po.c (po_message_remove_filepos, po_message_add_filepos): New
4453 Suggested by Asgeir Frimannsson <asgeirf@redhat.com>.
4455 2005-02-10 Bruno Haible <bruno@clisp.org>
4457 * gettext-po.h (po_message_set_extracted_comments): New declaration.
4458 * gettext-po.c (po_message_set_extracted_comments): New function.
4459 Suggested by Asgeir Frimannsson <asgeirf@redhat.com>.
4461 2005-02-08 Bruno Haible <bruno@clisp.org>
4463 * msginit.c (get_user_email): Cast _() to 'char *', to avoid compiler
4466 2005-02-07 Bruno Haible <bruno@clisp.org>
4468 Make the tools work in the tr_TR locale.
4469 * po-charset.c: Include c-strcase.h instead of strcase.h.
4470 (po_charset_canonicalize): Use c_strcasecmp.
4471 * msgcmp.c: Include c-strcase.h instead of strcase.h.
4472 (compare): Use c_strncasecmp.
4473 * msginit.c: Include c-strcase.h instead of strcase.h.
4474 (content_type): Use c_strcasecmp.
4475 * msgmerge.c: Include c-strcase.h instead of strcase.h.
4476 (message_merge, merge): Use c_strncasecmp.
4477 * xgettext.c: Include c-strcase.h instead of strcase.h.
4478 (language_to_extractor): Use c_strcasecmp.
4479 Reported by Recai Oktaş <roktas@omu.edu.tr>.
4481 2005-02-07 Bruno Haible <bruno@clisp.org>
4483 * project-id: Use LC_ALL=C to protect range expression against
4486 2005-02-06 Bruno Haible <bruno@clisp.org>
4488 Leave #: lines with unknown syntax alone instead of turning them into
4490 * po-hash.h: Remove file.
4491 * po-hash-gen.y: Remove file.
4492 * read-po-abstract.c: Don't include po-hash.h.
4493 (po_parse_comment_filepos, po_parse_comment_solaris_filepos): New
4495 (po_callback_comment_dispatcher): Call them instead of the old
4496 po_parse_comment_filepos.
4497 * read-stringtable.c: Don't include po-hash.h.
4498 * Makefile.am (noinst_HEADERS): Remove po-hash.h, po-hash-gen.h.
4499 (COMMON_SOURCE): Remove po-hash-gen.y.
4500 (BUILT_SOURCES): Remove po-hash-gen.c, po-hash-gen.h.
4501 * Makefile.msvc (OBJECTS): Remove po-hash-gen.obj.
4502 (po-hash-gen.obj): Remove rule.
4503 * Makefile.vms (OBJECTS): Remove po-hash-gen.obj.
4504 (po-hash-gen.obj): Remove rule.
4506 Reported by David Fraser <davidf@sjsoft.com>.
4508 2005-02-04 Bruno Haible <bruno@clisp.org>
4510 * plural-table.c (plural_table): Add an entry about Vietnamese.
4511 Explanations by Clytie Siddall <clytie@riverland.net.au>.
4513 2005-01-29 Bruno Haible <bruno@clisp.org>
4515 * Makefile.am (msgcmp_LDADD, msgfmt_LDADD, msgmerge_LDADD,
4516 msgunfmt_LDADD, xgettext_LDADD, msgattrib_LDADD, msgcat_LDADD,
4517 msgcomm_LDADD, msgconv_LDADD, msgen_LDADD, msgexec_LDADD,
4518 msgfilter_LDADD, msggrep_LDADD, msguniq_LDADD): Add INTL_MACOSX_LIBS.
4520 2005-01-27 Bruno Haible <bruno@clisp.org>
4522 * msgfmt.c (formatstring_error_logger): Cast the fprrintf argument,
4523 to make it work on big-endian 64-bit machines.
4525 2005-01-16 Bruno Haible <bruno@clisp.org>
4528 * message.h (format_type): New enum value 'format_scheme'.
4529 (NFORMATS): Increment.
4530 * message.c (format_language): Add format_scheme entry.
4531 (format_language_pretty): Likewise.
4532 * format.h (formatstring_scheme): New declaration.
4533 * format-scheme.c: New file, based on format-lisp.c.
4534 * format.c (formatstring_parsers): Add formatstring_scheme.
4535 * x-scheme.h: New file.
4536 * x-scheme.c: New file.
4537 * xgettext.c: Include x-scheme.h.
4538 (flag_table_scheme): New variable.
4539 (main): Invoke init_flag_table_scheme, x_scheme_extract_all,
4541 (usage): Mention Scheme source language.
4542 (xgettext_record_flag): Handle format_scheme.
4543 (language_to_extractor): Add Scheme rule.
4544 (extension_to_language): Add Scheme rule.
4545 * Makefile.am (noinst_HEADERS): Add x-scheme.h.
4546 (FORMAT_SOURCE): Add format-scheme.c.
4547 (xgettext_SOURCES): Add x-scheme.c.
4548 * Makefile.msvc (OBJECTS): Add format-scheme.obj.
4549 (xgettext_OBJECTS): Add x-scheme.obj.
4550 (format-scheme.obj, x-scheme.obj): New rules.
4551 * Makefile.vms (OBJECTS): Add format-scheme.obj.
4552 (xgettext_OBJECTS): Add x-scheme.obj.
4553 (format-scheme.obj, x-scheme.obj): New rules.
4556 2005-01-08 Bruno Haible <bruno@clisp.org>
4558 * msggrep.c (grep_args, grep_path, grep_argv): Remove variables.
4559 (struct grep_task): New type.
4560 (grep_task): New variable.
4561 (main): Initialize grep_task instead of grep_args. Change processing
4562 of options 'E', 'F' to set a matcher, of 'e', 'f' to append to the
4563 pattern string, and of 'i' to set a boolean. Compile the patterns.
4564 (is_string_selected): Execute a compiled pattern instead of calling
4566 (is_message_selected): Update.
4567 * Makefile.am (AM_CPPFLAGS): Add -I option for libgrep.
4568 (LIBGREP): New variable.
4569 (msggrep_LDADD): Add $(LIBGREP).
4570 * Makefile.msvc (INCLUDES): Add libgrep directory.
4571 (msggrep.exe): Link with libgrep.
4572 * Makefile.vms (INCLUDES): Add libgrep directory.
4573 (msggrep.exe): Link with libgrep.
4575 2005-01-09 Bruno Haible <bruno@clisp.org>
4577 * msgl-ascii.h (is_ascii_msgdomain_list): New declaration.
4578 * msgl-ascii.c (is_ascii_msgdomain_list): New function.
4579 * x-po.c (header_charset): New variable.
4580 (extract_add_message): When seeing the header entry, store the charset
4582 (extract): Store the value of header_charset in the new constructed
4584 * xgettext.c (main): Convert the existing PO file to UTF-8 if it was
4586 Reported by Jörg Schilling <schilling@fokus.fraunhofer.de>.
4588 2005-01-08 Bruno Haible <bruno@clisp.org>
4590 * msggrep.c (usage): Explain COMMENT-PATTERN syntax as well.
4592 2005-01-06 Bruno Haible <bruno@clisp.org>
4594 * x-tcl.c (read_word): Ignore non-space whitespace at the beginning.
4595 Reported by William J Poser <wjposer@ldc.upenn.edu>.
4597 2005-01-06 Bruno Haible <bruno@clisp.org>
4599 * write-csharp.c (msgdomain_write_csharp): Don't call fclose after
4601 * write-java.c (msgdomain_write_java): Likewise.
4602 * write-mo.c (msgdomain_write_mo): Likewise.
4603 * write-po.c (msgdomain_list_print): Likewise.
4604 * write-qt.c (msgdomain_write_qt): Likewise.
4605 * write-resources.c (execute_writing_input): Likewise.
4606 * write-tcl.c (msgdomain_write_tcl): Likewise.
4608 2005-01-05 Bruno Haible <bruno@clisp.org>
4610 * msgattrib.c (main): Update year in --version output.
4611 * msgcat.c (main): Likewise.
4612 * msgcmp.c (main): Likewise.
4613 * msgcomm.c (main): Likewise.
4614 * msgconv.c (main): Likewise.
4615 * msgen.c (main): Likewise.
4616 * msgexec.c (main): Likewise.
4617 * msgfilter.c (main): Likewise.
4618 * msgfmt.c (main): Likewise.
4619 * msggrep.c (main): Likewise.
4620 * msginit.c (main): Likewise.
4621 * msgmerge.c (main): Likewise.
4622 * msgunfmt.c (main): Likewise.
4623 * msguniq.c (main): Likewise.
4624 * xgettext.c (main): Likewise.
4626 2005-01-07 Bruno Haible <bruno@clisp.org>
4628 * gettext-po.c (po_file_read): Interpret "-" and "/dev/stdin" as
4630 Suggested by Asgeir Frimannsson <asgeirf@redhat.com>.
4632 2004-11-29 Bruno Haible <bruno@clisp.org>
4634 * Makefile.am (libgettextpo_la_LDFLAGS): Add @LTLIBINTL@ @LTLIBICONV@.
4635 Reported by Sam Steingold <sds@gnu.org>.
4637 2004-10-01 Guido Flohr <guido@imperia.net>
4639 * x-perl.c (x_perl_prelex): Recognize function names starting with '-'.
4640 Reported by Ryan Anderson <ryan@autoweb.net>.
4642 2004-09-16 Bruno Haible <bruno@clisp.org>
4644 * format.h (formatstring_error_logger_t): Modify decl for GCC <= 3.0.
4645 Reported by Jens A. Tkotz <jens@peino.de>.
4647 2004-09-11 Bruno Haible <bruno@clisp.org>
4649 * Makefile.am (msginit_SOURCES): Add plural-count.c.
4650 * msginit.c (update_msgstr_plurals): New function.
4652 * msgmerge.c (match_domain): Provide the appropriate number of plural
4653 forms for messages that don't occur in the Def.po file.
4654 Reported by Jens A. Tkotz <jens@peino.de>.
4656 2004-09-06 Bruno Haible <bruno@clisp.org>
4658 * format.h (formatstring_error_logger_t): New type.
4659 (struct formatstring_parser): Change calling convention of 'check'
4661 (check_msgid_msgstr_format): New declaration.
4662 * format-awk.c (format_check): Use error_logger argument instead of
4663 noisy and error_at_line.
4664 * format-c.c (format_check): Likewise.
4665 * format-csharp.c (format_check): Likewise.
4666 * format-elisp.c (format_check): Likewise.
4667 * format-gcc-internal.c (format_check): Likewise.
4668 * format-java.c (format_check): Likewise.
4669 * format-librep.c (format_check): Likewise.
4670 * format-lisp.c (format_check): Likewise.
4671 * format-pascal.c (format_check): Likewise.
4672 * format-perl.c (format_check): Likewise.
4673 * format-perl-brace.c (format_check): Likewise.
4674 * format-php.c (format_check): Likewise.
4675 * format-python.c (format_check): Likewise.
4676 * format-qt.c (format_check): Likewise.
4677 * format-sh.c (format_check): Likewise.
4678 * format-tcl.c (format_check): Likewise.
4679 * format-ycp.c (format_check): Likewise.
4680 * format.c (check_msgid_msgstr_format): New function, extracted from
4682 * msgfmt.c (curr_msgid_pos): New variable.
4683 (formatstring_error_logger): New function.
4684 (check_pair): Use check_msgid_msgstr_format, formatstring_error_logger.
4685 * msgmerge.c (msgfmt_check_pair_fails): Update.
4686 * gettext-po.h (po_message_check_format): New declaration.
4687 * gettext-po.c (po_error_logger, po_message_check_format): New
4690 2004-09-05 Bruno Haible <bruno@clisp.org>
4692 * po-error.h: New file.
4693 * po-error.c: New file.
4694 * po-charset.c: Include po-error.h.
4695 (po_lex_charset_set): Use po_multiline_warning instead of
4697 * po-lex.h: Include po-error.h.
4698 (po_gram_error): Use po_error instead of error.
4699 (po_gram_error_at_line): Use po_error_at_line instead of error_at_line.
4700 * po-lex.c (po_gram_error): Use po_error instead of error.
4701 (po_gram_error_at_line): Use po_error_at_line instead of error_at_line.
4702 (mbfile_getc, lex_getc): Use po_error instead of error.
4703 * read-po-abstract.c (po_scan): Likewise.
4704 * write-po.c: Include po-error.h instead of error.h.
4705 (wrap): Use po_error instead of error.
4706 (message_print, message_print_obsolete): Use po_multiline_warning
4707 instead of multiline_warning.
4708 (msgdomain_list_print): Use po_error instead of error, po_error_at_line
4709 instead of error_at_line.
4710 * str-list.h (string_list_join): New declaration.
4711 * str-list.c (string_list_join): New function.
4712 * message.h (message_list_insert_at): New declaration.
4713 * message.c (message_list_insert_at): New function.
4714 * gettext-po.h (po_filepos_t): New type.
4715 (struct po_error_handler, po_error_handler_t): New types.
4716 (po_file_create): New declaration.
4717 (po_file_read): Add handler argument.
4718 (po_file_write, po_message_insert, po_message_create,
4719 po_message_set_msgid, po_message_set_msgid_plural,
4720 po_message_set_msgstr, po_message_set_msgstr_plural,
4721 po_message_comments, po_message_set_comments,
4722 po_message_extracted_comments, po_message_filepos,
4723 po_message_set_obsolete, po_message_set_fuzzy, po_message_set_format,
4724 po_filepos_file, po_filepos_start_line): New declarations.
4725 * gettext-po.c (po_file_create): New function.
4726 (po_file_read): Add handler argument. Keep an old version for backward
4728 (po_file_write): New function.
4729 (po_message_iterator): Store more information, to make
4730 po_message_insert possible.
4731 (po_message_iterator_free): Update.
4732 (po_next_message): Don't crash if iterator->mlp is NULL.
4733 (po_message_insert): New function.
4734 (po_message_create): New function.
4735 (po_message_set_msgid, po_message_set_msgid_plural,
4736 po_message_set_msgstr, po_message_set_msgstr_plural,
4737 po_message_comments, po_message_set_comments,
4738 po_message_extracted_comments, po_message_filepos,
4739 po_message_set_obsolete, po_message_set_fuzzy, po_message_set_format,
4740 po_filepos_file, po_filepos_start_line): New functions.
4741 * Makefile.am (noinst_HEADERS): Add po-error.h.
4742 (COMMON_SOURCE): Add po-error.c.
4743 * Makefile.msvc (OBJECTS): Add po-error.obj.
4744 (po-error.obj): New rule.
4745 * Makefile.vms (OBJECTS): Add po-error.obj.
4746 (po-error.obj): New rule.
4749 2004-09-03 Bruno Haible <bruno@clisp.org>
4751 * Makefile.am (msginit_LDADD): Use the INTL_MACOSX_LDFLAGS.
4753 2004-08-30 Bruno Haible <bruno@clisp.org>
4755 * plural-table.c (plural_table): Czech is now like Slovak.
4756 Reported by Stepan Kasal <kasal@ucw.cz>.
4758 2004-06-23 Bruno Haible <bruno@clisp.org>
4760 * x-c.c (phase1_getc): Fix phase0_getc invocation.
4761 Reported by Matt Dreezer <matthew.dreezer@edl.uk.eds.com>.
4763 2004-05-14 Bruno Haible <bruno@clisp.org>
4765 * format-java.c (message_format_parse): Fix argument of freesa() calls.
4767 2004-03-19 Bruno Haible <bruno@clisp.org>
4769 * Makefile.am (install-exec-clean): Don't remove libgettextsrc.a on
4771 Reported by Kouichi Hashikawa <z01a7ksy@cs.ecip.tohoku.ac.jp>.
4773 2004-03-14 Bruno Haible <bruno@clisp.org>
4775 * format-lisp.c (parse_upto): Add integer restriction for the dispatch
4776 argument in ~[...~].
4778 2004-03-02 Bruno Haible <bruno@clisp.org>
4780 * read-csharp.c (msgdomain_read_csharp): Extend the lang -> frobbedlang
4781 mapping so as to support Serbian and Uzbek locales.
4782 * write-csharp.c (msgdomain_write_csharp): Likewise.
4783 Reported by Jorn Baayen <jbaayen@dds.nl>.
4785 2004-02-27 Bruno Haible <bruno@clisp.org>
4787 * plural-table.c (plural_table): Add an entry about Serbian.
4788 Reported by Danilo Segan <danilo@gnome.org>.
4790 2004-01-29 Bruno Haible <bruno@clisp.org>
4792 * gettext-0.14.1 released.
4794 2004-01-28 Bruno Haible <bruno@clisp.org>
4796 * gettext-0.14 released.
4798 2004-01-18 Bruno Haible <bruno@clisp.org>
4800 * msginit.c (catalogname_for_locale): Add entries for Akan, Avaric,
4801 Bambara, Cree, Divehi (Maldivian), Éwé, Igbo, Kongo, Kanuri, Ganda,
4802 Luba-Katanga, Ojibwa, Venda.
4803 (englishname_of_language): Likewise, and also for Fulah (Fulfulde).
4805 2004-01-09 Bruno Haible <bruno@clisp.org>
4807 * format.h (struct formatstring_parser): Add 'translated' argument to
4809 (get_sysdep_c_format_directives): Renamed from
4810 get_c99_format_directives. Add 'translated' argument. Change meaning
4811 of endpos in returned array.
4812 * format-c.c (struct spec): Rename field c99_directives to
4813 sysdep_directives, and c99_directives_count to sysdep_directives_count.
4814 (format_parse): Add 'translated' argument. Handle 'I' flag. Store the
4815 pointer past the '>' character instead of the pointer to the '>'.
4816 (format_c_parse, format_objc_parse): Add 'translated' argument.
4817 (get_sysdep_c_format_directives): Renamed from
4818 get_c99_format_directives. Add 'translated' argument.
4819 * format-awk.c (format_parse): Add 'translated' argument.
4820 * format-csharp.c (format_parse): Likewise.
4821 * format-elisp.c (format_parse): Likewise.
4822 * format-gcc-internal.c (format_parse): Likewise.
4823 * format-java.c (format_parse): Likewise.
4824 * format-librep.c (format_parse): Likewise.
4825 * format-lisp.c (format_parse): Likewise.
4826 * format-pascal.c (format_parse): Likewise.
4827 * format-perl-brace.c (format_parse): Likewise.
4828 * format-perl.c (format_parse): Likewise.
4829 * format-php.c (format_parse): Likewise.
4830 * format-python.c (format_parse): Likewise.
4831 * format-qt.c (format_parse): Likewise.
4832 * format-sh.c (format_parse): Likewise.
4833 * format-tcl.c (format_parse): Likewise.
4834 * format-ycp.c (format_parse): Likewise.
4835 * msgfmt.c (check_pair): Update.
4836 * msgmerge.c (msgfmt_check_pair_fails): Likewise.
4837 * read-mo.c (get_sysdep_string): Don't add '<'...'>' around segments
4839 (read_mo_file): Treat major revision 1 like major revision 0.
4840 * write-mo.c (write_table): Update. Use major revision 1 if "I" occurs
4841 among the sysdep segments.
4842 * xgettext.c (set_format_flags_from_context, remember_a_message,
4843 remember_a_message_plural): Update.
4845 2004-01-14 Bruno Haible <bruno@clisp.org>
4847 * msginit.c (fill_header): Avoid a NULL pointer access when the header
4848 has no comment attached to it.
4849 Reported by Josep Puigdemont <baldrick@terra.es>.
4851 2004-01-09 Bruno Haible <bruno@clisp.org>
4853 * msgattrib.c (main): Update year in --version output.
4854 * msgcat.c (main): Likewise.
4855 * msgcmp.c (main): Likewise.
4856 * msgcomm.c (main): Likewise.
4857 * msgconv.c (main): Likewise.
4858 * msgen.c (main): Likewise.
4859 * msgexec.c (main): Likewise.
4860 * msgfilter.c (main): Likewise.
4861 * msgfmt.c (main): Likewise.
4862 * msggrep.c (main): Likewise.
4863 * msginit.c (main): Likewise.
4864 * msgmerge.c (main): Likewise.
4865 * msgunfmt.c (main): Likewise.
4866 * msguniq.c (main): Likewise.
4867 * xgettext.c (main): Likewise.
4869 2003-12-29 Bruno Haible <bruno@clisp.org>
4871 * xgettext.h: Include stdlib.h, str-list.h.
4872 (struct refcounted_string_list_ty): New type.
4873 (add_reference, drop_reference): New functions.
4874 (savable_comment, savable_comment_add, savable_comment_reset,
4875 savable_comment_to_xgettext_comment): New declarations.
4876 * xgettext.c (savable_comment): New variable.
4877 (savable_comment_add, savable_comment_reset,
4878 savable_comment_to_xgettext_comment): New functions.
4879 * x-java.c (struct refcounted_string_list_ty, comment, add_reference,
4880 drop_reference, x_java_comment_add, x_java_comment_reset,
4881 x_java_comment_to_xgettext_comment): Remove. Use replacement from
4882 xgettext.{h,c} instead.
4883 * x-csharp.c (struct refcounted_string_list_ty, comment, add_reference,
4884 drop_reference, x_csharp_comment_add, x_csharp_comment_reset,
4885 x_csharp_comment_to_xgettext_comment): Remove. Use replacement from
4886 xgettext.{h,c} instead.
4887 * x-c.c (comment_line_end): Call savable_comment_add instead of
4888 xgettext_comment_add.
4889 (struct token_ty): Add 'comment' field.
4890 (free_token): Free it.
4891 (phase5_get): Initialize token's 'comment' field.
4892 (phase6_get): Call savable_comment_reset instead of
4893 xgettext_comment_reset.
4894 (phase8a_get): Initialize token's 'comment' field.
4895 (phase8b_get): Call savable_comment_reset instead of
4896 xgettext_comment_reset.
4897 (phase8c_get): In @"...", use the comment of the first token, not of
4899 (struct xgettext_token_ty): Add 'comment' field.
4900 (x_c_lex): Deal with the token's comment.
4901 (extract_parenthesized): Call savable_comment_to_xgettext_comment and
4902 savable_comment_reset. Free the token's comment field.
4903 * x-python.c (comment_line_end): Call savable_comment_add instead of
4904 xgettext_comment_add.
4905 (struct token_ty): Add 'comment' field.
4906 (phase5_get): Call savable_comment_reset instead of
4907 xgettext_comment_reset. Initialize token's 'comment' field.
4908 (extract_parenthesized): Call savable_comment_to_xgettext_comment and
4909 savable_comment_reset. Free the token's comment field.
4911 2003-12-28 Bruno Haible <bruno@clisp.org>
4913 * read-mo.h (read_mo_file): Change 'fn' into 'filename'.
4914 * read-mo.c (read_mo_file): Likewise.
4916 2003-12-28 Bruno Haible <bruno@clisp.org>
4918 * write-resources.h: New file.
4919 * write-resources.c: New file.
4920 * msgfmt.cs: New file.
4921 * msgfmt.c: Include write-resources.h.
4922 (csharp_resources_mode): New variable.
4923 (long_options): Add --csharp-resources.
4924 (main): Handle --csharp-resources. More generic code for detection of
4925 contradicting modes. Invoke msgdomain_write_csharp_resources.
4926 (usage): Document --csharp-resources option.
4927 (msgfmt_set_domain): Update.
4928 * read-resources.h: New file.
4929 * read-resources.c: New file.
4930 * msgunfmt.cs (DumpResource): Add a constructor that dumps a .resources
4932 (Main): Invoke it when only one argument is given.
4933 * msgunfmt.c: Include read-resources.h.
4934 (csharp_resources_mode): New variable.
4935 (long_options): Add --csharp-resources.
4936 (main): Handle --csharp-resources. More generic code for detection of
4937 contradicting modes. Invoke read_one_file instead of read_mo_file.
4938 (usage): Document --csharp-resources option.
4939 (read_one_file): New function.
4940 * Makefile.am (noinst_HEADERS): Add read-resources.h and
4942 (msgfmt_SOURCES): Add write-resources.c.
4943 (msgunfmt_SOURCES): Add read-resources.c.
4944 (EXTRA_DIST): Add msgfmt.cs.
4945 (CLEANFILES): Add msgfmt.net.exe.
4946 (msgfmt.net.exe): New rule.
4947 (all-csharp-yes): Depend on it.
4948 (install-exec-csharp-yes): Also install msgfmt.net.exe.
4949 (uninstall-csharp-yes): Also uninstall msgfmt.net.exe.
4950 * Makefile.msvc (msgfmt_OBJECTS): Add write-resources.obj.
4951 (msgunfmt_OBJECTS): Add read-resources.obj.
4952 (write-resources.obj, read-resources.obj): New rules.
4953 * Makefile.vms (msgfmt_OBJECTS): Add write-resources.obj.
4954 (msgunfmt_OBJECTS): Add read-resources.obj.
4955 (write-resources.obj, read-resources.obj): New rules.
4958 2003-12-26 Bruno Haible <bruno@clisp.org>
4961 * write-csharp.h: New file.
4962 * write-csharp.c: New file.
4963 * msgfmt.c: Include write-csharp.h.
4964 (csharp_mode, csharp_resource_name, csharp_locale_name,
4965 csharp_base_directory): New variables.
4966 (long_options): Add option --csharp.
4967 (main): Handle option --csharp. Initialize csharp_resource_name,
4968 csharp_locale_name, csharp_base_directory. Perform checks for C# mode.
4969 Invoke msgdomain_write_csharp.
4970 (usage): Document --csharp option and C# mode.
4971 (msgfmt_set_domain): Ignore in C# mode.
4972 * read-csharp.h: New file.
4973 * read-csharp.c: New file.
4974 * msgunfmt.cs: New file.
4975 * msgunfmt.c: Include read-csharp.h.
4976 (csharp_mode, csharp_resource_name, csharp_locale_name,
4977 csharp_base_directory): New variables.
4978 (long_options): Add option --csharp.
4979 (main): Handle option --csharp. Initialize csharp_resource_name,
4980 csharp_locale_name, csharp_base_directory. Perform checks for C# mode.
4981 Invoke msgdomain_read_csharp.
4982 (usage): Document --csharp option and C# mode.
4983 * Makefile.am (noinst_HEADERS): Add read-csharp.h, write-csharp.h.
4984 (CSHARPCOMP, CSHARPCOMPFLAGS): New variables.
4985 (msgfmt_SOURCES): Add write-csharp.c.
4986 (msgunfmt_SOURCES): Add read-csharp.c.
4987 (EXTRA_DIST): Add msgunfmt.cs.
4988 (CLEANFILES): Add msgunfmt.net.exe.
4989 (all-csharp-yes, all-csharp-no): New rules.
4990 (all-local): Depend on them.
4991 (msgunfmt.net.exe): New rule.
4992 (install-exec-csharp-yes, install-exec-csharp-no): New rules.
4993 (install-exec-local): Depend on them.
4994 (installdirs-csharp): New rule.
4995 (installdirs-local): Depend on it.
4996 (uninstall-csharp-yes, uninstall-csharp-no): New rules.
4997 (uninstall-local): Depend on it.
4998 * Makefile.msvc (msgfmt_OBJECTS): Add write-csharp.obj.
4999 (msgunfmt_OBJECTS): Add read-csharp.obj.
5000 (write-csharp.obj, read-csharp.obj): New rules.
5001 * Makefile.vms (msgfmt_OBJECTS): Add write-csharp.obj.
5002 (msgunfmt_OBJECTS): Add read-csharp.obj.
5003 (write-csharp.obj, read-csharp.obj): New rules.
5006 2003-12-26 Bruno Haible <bruno@clisp.org>
5008 * read-java.c (msgdomain_read_java): Relocate also the GETTEXTJAR
5010 * urlget.c (fetch): Likewise.
5012 2003-12-26 Bruno Haible <bruno@clisp.org>
5014 * write-java.c (write_java_code): Emit a static method
5015 'get_msgid_plural_table' instead of a static field 'plural'.
5016 * gnu/gettext/DumpResource.java (DumpResource.dump): Exploit a
5017 'get_msgid_plural_table' method if it exists.
5019 2003-12-14 Bruno Haible <bruno@clisp.org>
5021 * message.h (format_type): New enum value 'format_csharp'.
5022 (NFORMATS): Increment.
5023 * message.c (format_language): Add format_csharp entry.
5024 (format_language_pretty): Likewise.
5025 * format.h (formatstring_csharp): New declaration.
5026 * format-csharp.c: New file.
5027 * format.c (formatstring_parsers): Add formatstring_csharp.
5028 * x-csharp.h: New file.
5029 * x-csharp.c: New file.
5030 * xgettext.c: Include x-csharp.h.
5031 (flag_table_csharp): New variable.
5032 (main): Invoke init_flag_table_csharp, x_csharp_extract_all,
5034 (usage): Mention C# source language.
5035 (xgettext_record_flag): Handle format_csharp.
5036 (language_to_extractor): Add C# rule.
5037 (extension_to_language): Add C# rule.
5038 * Makefile.am (noinst_HEADERS): Add x-csharp.h.
5039 (FORMAT_SOURCE): Add format-csharp.c.
5040 (xgettext_SOURCES): Add x-csharp.c.
5041 * Makefile.msvc (OBJECTS): Add format-csharp.obj.
5042 (xgettext_OBJECTS): Add x-csharp.obj.
5043 (format-csharp.obj, x-csharp.obj): New rules.
5044 * Makefile.vms (OBJECTS): Add format-csharp.obj.
5045 (xgettext_OBJECTS): Add x-csharp.obj.
5046 (format-csharp.obj, x-csharp.obj): New rules.
5049 2003-12-28 Bruno Haible <bruno@clisp.org>
5051 * msgexec.c (process_string): Pass ignore_sigpipe = false.
5052 * msgfilter.c (process_string): Likewise.
5053 * msggrep.c (is_string_selected): Likewise.
5054 * msginit.c (project_id, project_id_version, get_user_email,
5055 language_team_address): Likewise.
5056 * read-java.c (execute_and_read_po_output): Likewise.
5057 * read-tcl.c (msgdomain_read_tcl): Likewise.
5058 * urlget.c (execute_it): Pass ignore_sigpipe = true.
5059 (fetch): Pass ignore_sigpipe = true when fetching the file, = false
5062 2003-12-14 Bruno Haible <bruno@clisp.org>
5064 * x-c.c (SIZEOF): New macro.
5065 (phase1_ungetc): Verify that the pushback buffer's size is sufficient.
5066 (phase2_ungetc): Likewise.
5067 (phase3_ungetc): Likewise.
5068 (phase5_unget): Likewise.
5069 (phase6_unget): Likewise.
5070 * x-java.c (SIZEOF): New macro.
5071 (phase1_ungetc): Verify that the pushback buffer's size is sufficient.
5072 (phase2_ungetc): Likewise.
5073 (phase3_ungetc): Likewise.
5074 (phase5_unget): Likewise.
5075 (phase6_unget): Likewise.
5076 * x-php.c (SIZEOF): New macro.
5077 (phase1_ungetc): Verify that the pushback buffer's size is sufficient.
5078 (phase2_ungetc): Likewise.
5079 (phase3_ungetc): Likewise.
5080 * x-python.c (SIZEOF): New macro.
5081 (phase1_ungetc): Verify that the pushback buffer's size is sufficient.
5082 (phase5_unget): Likewise.
5083 * x-sh.c (SIZEOF): New macro.
5084 (phase1_ungetc): Verify that the pushback buffer's size is sufficient.
5085 (phase2_ungetc): Likewise.
5086 * x-smalltalk.c (SIZEOF): New macro.
5087 (phase2_unget): Verify that the pushback buffer's size is sufficient.
5088 * x-tcl.c (SIZEOF): New macro.
5089 (phase1_ungetc): Verify that the pushback buffer's size is sufficient.
5090 (phase2_ungetc): Likewise.
5091 * x-ycp.c (SIZEOF): New macro.
5092 (phase2_unget): Verify that the pushback buffer's size is sufficient.
5094 2003-12-14 Bruno Haible <bruno@clisp.org>
5096 * x-c.c (phase1_pushback): Reduce size to 2.
5097 (phase2_pushback): Reduce size to 1.
5098 (phase3_pushback): Reduce size to 2.
5099 (phase5_pushback): Reduce size to 1.
5100 (phase6_pushback): Reduce size to 2.
5101 * x-java.c (phase2_pushback): Reduce size to 1.
5102 (phase3_pushback): Reduce size to 2.
5103 (phase5_pushback): Reduce size to 3.
5104 (phase6_pushback): Reduce size to 2.
5105 * x-php.c (phase1_pushback): Reduce size to 2.
5106 * x-python.c (max): New macro.
5107 (phase1_pushback): Reduce size to UNINAME_MAX + 3.
5108 (phase5_pushback): Reduce size to 1.
5109 * x-sh.c (phase1_pushback): Reduce size to 1.
5110 (phase2_pushback): Reduce size to 2.
5111 * x-smalltalk.c (phase2_pushback): Reduce size to 1.
5112 * x-tcl.c (phase1_pushback): Reduce size to 1.
5113 (phase2_pushback): Reduce size to 2.
5115 2003-12-12 Bruno Haible <bruno@clisp.org>
5117 Assume automake-1.8.
5118 * Makefile.am (install-exec-local): Renamed from install-exec-am.
5120 2003-11-30 Bruno Haible <bruno@clisp.org>
5122 * format-java.c: Include xallocsa.h.
5123 (message_format_parse): Use xallocsa instead of alloca.
5124 (choice_format_parse): Likewise.
5125 * msgl-cat.c: Include xallocsa.h.
5126 (catenate_msgdomain_list): Use xallocsa instead of alloca.
5127 * msgl-charset.c: Include xallocsa.h.
5128 (compare_po_locale_charsets): Use xallocsa instead of alloca.
5129 * msgl-iconv.c: Include xallocsa.h.
5130 (iconv_message_list): Use xallocsa instead of alloca.
5131 * po-charset.c: Include xallocsa.h.
5132 (po_lex_charset_set): Use xallocsa instead of alloca.
5133 * read-tcl.c: Include xallocsa.h.
5134 (msgdomain_read_tcl): Use xallocsa instead of alloca.
5135 * write-java.c: Include xallocsa.h.
5136 (compute_hashsize, msgdomain_write_java): Use xallocsa instead of
5138 * write-mo.c: Include xallocsa.h.
5139 (write_table): Use xallocsa instead of alloca.
5140 * write-po.c: Include xallocsa.h.
5141 (msgdomain_list_print_po): Use xallocsa instead of alloca.
5142 * write-tcl.c: Include xallocsa.h.
5143 (msgdomain_write_tcl): Use xallocsa instead of alloca.
5144 * msggrep.c: Include xallocsa.h.
5145 (is_message_selected): Use xallocsa instead of alloca.
5146 * msginit.c: Include xallocsa.h.
5147 (subst_string): Use xallocsa instead of alloca.
5148 * msgmerge.c: Include obstack.h.
5149 (obstack_chunk_alloc, obstack_chunk_free): New macros.
5150 (message_merge): Use obstack_alloc instead of alloca.
5151 * xgettext.c: Include xallocsa.h.
5152 (flag_context_list_table_insert): Use xallocsa instead of alloca.
5154 2003-12-17 Bruno Haible <bruno@clisp.org>
5156 * gettext-0.13.1 released.
5158 2003-12-14 Bruno Haible <bruno@clisp.org>
5160 * x-sh.c (phase2_getc): Call phase1_ungetc instead of phase2_ungetc:
5161 The next phase2_getc invocation must return QUOTED('"'), not '"'.
5163 2003-12-14 Bruno Haible <bruno@clisp.org>
5165 * x-c.c (phase7_getc): Remove dead code.
5166 * x-java.c (accumulate_escaped): More precise error message.
5168 2003-12-02 Bruno Haible <bruno@clisp.org>
5170 * msginit.c (catalogname_for_locale): Treat sr_CS like sr_YU.
5172 2003-11-30 Bruno Haible <bruno@clisp.org>
5174 * gettext-0.13 released.
5176 2003-11-28 Bruno Haible <bruno@clisp.org>
5178 * xgettext.c (set_format_flags_from_context): Add casts, to make it
5179 compile in C++ mode.
5181 2003-11-22 Bruno Haible <bruno@clisp.org>
5183 * x-c.c (phase4_getc): Skip leading whitespace in C++ style comments
5185 * x-sh.c (read_word): Skip leading whitespace in comments.
5186 * x-lisp.c (read_object): Skip leading whitespace in single-line
5188 * x-elisp.c (read_object): Skip leading whitespace in comments.
5189 * x-librep.c (read_object): Skip leading whitespace in single-line
5191 * x-java.c (phase4_getc): Skip leading whitespace in C++ style comments
5193 * x-awk.c (phase2_getc): Skip leading whitespace in comments.
5194 * x-ycp.c (phase2_getc): Skip leading whitespace in single-line
5196 * x-tcl.c (read_command): Skip leading whitespace in comments.
5198 2003-11-24 Bruno Haible <bruno@clisp.org>
5200 * format-lisp.c (check_params): Use ngettext for one of the messages.
5201 Reported by Rafał Maszkowski <rzm@icm.edu.pl>.
5203 2003-11-15 Bruno Haible <bruno@clisp.org>
5205 * Makefile.am (AM_CPPFLAGS): Renamed from INCLUDES.
5207 2003-11-09 Bruno Haible <bruno@clisp.org>
5209 * msginit.c (main): Drop the blank line in --no-translator mode.
5211 2003-11-07 Bruno Haible <bruno@clisp.org>
5213 * xgettext.c (remember_a_message): Omit the programmer comments of a
5214 duplicated msgid only if they are redundant.
5215 Reported by Christian Neumair <chris@gnome-de.org>.
5217 2003-11-05 Bruno Haible <bruno@clisp.org>
5219 * user-email.sh.in: Renamed from user-email.in. Internationalize, use
5220 localedir and gettext.
5223 2003-10-23 Bruno Haible <bruno@clisp.org>
5225 * read-stringtable.c (read_string, stringtable_parse): Cast
5226 gram_pos.line_number to 'unsigned long'.
5227 * x-sh.c (read_word): Case line_number to 'unsigned long'.
5229 2003-10-21 Bruno Haible <bruno@clisp.org>
5231 * message.h (message_list_msgids_changed): New declaration.
5232 * message.c (message_list_msgids_changed): New function.
5233 * msgl-iconv.c (iconv_message_list): Update the message list's hash
5234 table if it happens to contain non-ASCII msgids.
5236 2003-10-19 Bruno Haible <bruno@clisp.org>
5238 * message.h (format_type): New enum value 'format_qt'.
5239 (NFORMATS): Increment.
5240 * message.c (format_language): Add format_qt entry.
5241 (format_language_pretty): Likewise.
5242 * format.h (formatstring_qt): New declaration.
5243 * format-qt.c: New file.
5244 * format.c (formatstring_parsers): Add formatstring_qt.
5245 * xgettext.c (recognize_format_qt): New variable.
5246 (long_options): Add option "--qt".
5247 (main): Handle --qt option. Determine the extractor only after option
5248 processing is complete.
5249 (usage): Document --qt option.
5250 (xgettext_record_flag): Handle format_qt.
5251 (language_to_extractor): For C++, return a different extractor when
5253 * write-qt.h: New file.
5254 * write-qt.c: New file.
5255 * msgfmt.c: Include write-qt.h.
5256 (qt_mode): New variable.
5257 (long_options): Add option "--qt".
5258 (main): Handle --qt option. More checks for contradicting options.
5259 Call msgdomain_write_qt.
5260 (usage): Mention Qt mode.
5261 (format_directive_domain): Ignore domain directive if in Qt mode.
5262 * Makefile.am (noinst_HEADERS): Add write-qt.h.
5263 (FORMAT_SOURCE): Add format-qt.c.
5264 (msgfmt_SOURCES): Add write-qt.c.
5265 * Makefile.msvc (OBJECTS): Add format-qt.obj.
5266 (msgfmt_OBJECTS): Add write-qt.obj.
5267 (format-qt.obj, write-qt.obj): New rules.
5268 * Makefile.vms (OBJECTS): Add format-qt.obj.
5269 (msgfmt_OBJECTS): Add write-qt.obj.
5270 (format-qt.obj, write-qt.obj): New rules.
5273 2003-10-14 Bruno Haible <bruno@clisp.org>
5275 Fix compilation errors in C++ mode.
5276 * msgfilter.c (process_string): Cast the xrealloc expression.
5277 * xgettext.c (language_to_extractor, extension_to_language): Move the
5278 typedef after the struct definition.
5280 2003-10-13 Bruno Haible <bruno@clisp.org>
5282 Support CR/LF line terminators in C sources even on Unix.
5283 * x-c.c (phase0_getc, phase0_ungetc): New functions.
5284 (phase1_getc): Use them instead of calling getc/ungetc directly.
5285 Reported by Christoph Thielecke <u15119@hs-harz.de>.
5287 2003-10-13 Bruno Haible <bruno@clisp.org>
5289 Support and recognize Objective C specific format strings.
5290 * message.h (enum format_type): New item format_objc.
5291 (NFORMATS): Increment.
5292 * message.c (format_language): Add an entry for format_objc.
5293 (format_language_pretty): Likewise.
5294 * format.h (formatstring_objc): New declaration.
5295 * format-c.c (enum format_arg_type): New item FAT_OBJC_OBJECT.
5296 (format_parse): Add objc_extensions argument. Handle %@ in ObjC mode.
5297 (format_c_parse, format_objc_parse): New functions.
5298 (formatstring_c): Use format_c_parse instead of format_parse.
5299 (formatstring_objc): New variable.
5300 (get_c99_format_directives): Update.
5301 * format.c (formatstring_parsers): Add an entry for format_objc.
5302 * write-mo.c (write_table): Look for system dependent strings also in
5303 ObjectiveC format strings.
5304 * x-c.h (SCANNERS_C): Use separate flag_table for ObjectiveC.
5305 (x_objc_keyword, init_flag_table_objc): New declarations.
5306 (x_c_any_keywords): Remove declaration.
5307 * x-c.c (c_keywords): Renamed from keywords.
5308 (objc_keywords): New variable.
5309 (add_keyword): Renamed from x_c_keyword. Add keywords table argument.
5310 (x_c_keyword, x_objc_keyword): New functions.
5311 (x_c_any_keywords): Remove function.
5312 (init_keywords): Also initialize ObjectiveC keyword table.
5313 (init_flag_table_objc): New function.
5314 (enum token_type_ty): New item token_type_colon.
5315 (phase5_get): Recognize colon.
5316 (enum xgettext_token_type_ty): New item xgettext_token_type_colon.
5317 (x_c_lex): Use keywords table depending on objc_extensions. Handle
5319 (extract_parenthesized): Change the context_iter and inner_context
5320 after a keyword/symbol followed by a colon was seen.
5321 * xgettext.c (flag_table_objc): New variable.
5322 (main): Invoke init_flag_table_objc, x_objc_keyword. Watch out for
5323 keywords arguments, instead of calling x_c_any_keywords().
5324 (flag_context_list_table_insert): New function, extracted from
5325 xgettext_record_flag.
5326 (xgettext_record_flag): Call it. For format_c, insert the flags also
5327 in the flag_table_objc. Handle format_objc.
5328 (remember_a_message): Don't add a heuristic c-format flag to an entry
5329 that already carries objc-format.
5330 (remember_a_message_plural): Likewise.
5332 2003-10-18 Bruno Haible <bruno@clisp.org>
5334 Support for GNUstep .strings format.
5335 * read-stringtable.h: New file.
5336 * read-stringtable.c: New file.
5337 * read-po-abstract.h (enum input_syntax_ty): New item
5339 (po_callback_comment_dispatcher): Renamed from po_callback_comment.
5340 (po_callback_comment, po_callback_comment_special): New declarations.
5341 * read-po-abstract.c: Include read-stringtable.h.
5342 (po_scan): Add support for syntax_stringtable.
5343 (po_callback_comment_dispatcher): Renamed from po_callback_comment.
5344 (po_callback_comment, po_callback_comment_dot): New functions.
5345 (po_callback_comment_special): New function.
5346 * read-po.c (read_po): Set mdlp->encoding for syntax_stringtable too.
5347 * po-gram-gen.y: Update po_callback_comment_dispatcher call.
5348 * read-properties.c (properties_parse): Likewise.
5349 * write-stringtable.h: New file.
5350 * write-stringtable.c: New file.
5351 * write-po.h (make_format_description_string, significant_format_p):
5353 (message_print_syntax_stringtable): New declaration.
5354 * write-po.c: Include write-stringtable.h.
5355 (make_format_description_string, significant_format_p): Make
5357 (use_syntax_stringtable): New variable.
5358 (message_print_syntax_stringtable): New function.
5359 (msgdomain_list_print): Add check for plural forms for
5360 syntax_stringtable too. Add support for writing the .strings format.
5361 * msgattrib.c (long_options): Add --stringtable-input/output.
5362 (main): Handle them.
5363 (usage): Document options --stringtable-input/output.
5364 * msgcat.c (long_options): Add --stringtable-input/output.
5365 (main): Handle them. If option --stringtable-output is used, convert to
5366 UTF-8 and ignore the to_code.
5367 (usage): Document options --stringtable-input/output.
5368 * msgcmp.c (long_options): Add --stringtable-input.
5370 (usage): Document option --stringtable-input.
5371 * msgcomm.c (long_options): Add --stringtable-input/output.
5372 (main): Handle them.
5373 (usage): Document options --stringtable-input/output.
5374 * msgconv.c (long_options): Add --stringtable-input/output.
5375 (main): Handle them. If option --stringtable-output is used, ignore the
5377 (usage): Document options --stringtable-input/output.
5378 * msgen.c (long_options): Add --stringtable-input/output.
5379 (main): Handle them.
5380 (usage): Document options --stringtable-input/output.
5381 * msgexec.c: Include limits.h.
5382 (long_options): Add --stringtable-input.
5384 (usage): Document option --stringtable-input.
5385 * msgfilter.c (long_options): Add --stringtable-input/output.
5386 (main): Handle them.
5387 (usage): Document options --stringtable-input/output.
5388 * msgfmt.c (long_options): Add --stringtable-input.
5390 (usage): Document option --stringtable-input.
5391 * msggrep.c (long_options): Add --stringtable-input/output.
5392 (main): Handle them.
5393 (usage): Document options --stringtable-input/output.
5394 * msginit.c (long_options): Add --stringtable-input/output.
5395 (main): Handle them.
5396 (usage): Document options --stringtable-input/output.
5397 * msgmerge.c (long_options): Add --stringtable-input/output.
5398 (main): Handle them. In update mode, --stringtable-input implies
5399 --stringtable-output.
5400 (usage): Document options --stringtable-input/output.
5401 * msgunfmt.c (long_options): Add --stringtable-output.
5403 (usage): Document option --stringtable-output.
5404 * msguniq.c (long_options): Add --stringtable-input/output.
5405 (main): Handle them.
5406 (usage): Document options --stringtable-input/output.
5407 * x-stringtable.h: New file.
5408 * x-po.c: Include x-stringtable.h.
5409 (extract_stringtable): New function.
5410 * xgettext.c: Include x-stringtable.h.
5411 (long_options): Add --stringtable-output.
5413 (usage): Document options -L NXStringTable and --stringtable-output.
5414 (finalize_header): If --stringtable-output was given, set the charset.
5415 (language_to_extractor): Add support for .strings format.
5416 (extension_to_language): Likewise.
5417 * Makefile.am (noinst_HEADERS): Add read-stringtable.h,
5418 write-stringtable.h, x-stringtable.h.
5419 (COMMON_SOURCE): Add read-stringtable.c.
5420 (libgettextsrc_la_SOURCES): Add write-stringtable.c.
5421 * Makefile.msvc (OBJECTS): Add read-stringtable.obj,
5422 write-stringtable.obj.
5423 (read-stringtable.obj, write-stringtable.obj): New rules.
5424 * Makefile.vms (OBJECTS): Add read-stringtable.obj,
5425 write-stringtable.obj.
5426 (read-stringtable.obj, write-stringtable.obj): New rules.
5429 2003-10-21 Bruno Haible <bruno@clisp.org>
5431 * hostname.c (xgethostname): Add support for native Woe32 API.
5433 2003-10-21 Bruno Haible <bruno@clisp.org>
5435 * message.c (message_list_search): Avoid casting a pointer to a local
5436 variable; it violated strict aliasing.
5438 2003-10-21 Bruno Haible <bruno@clisp.org>
5440 * write-java.c (mkdir): Redefine on mingw.
5442 2003-10-12 Bruno Haible <bruno@clisp.org>
5444 Improved ObjectiveC support.
5445 * x-c.h (extract_objc): New declaration.
5446 (SCANNERS_C): For ObjectiveC, use extract_objc.
5447 * x-c.c (objc_extensions): New variable.
5448 (enum token_type_ty): New item token_type_objc_special.
5449 (phase5_get): Recognize '@' for ObjectiveC.
5450 (phase8b_get, phase8b_unget): New functions. Handle
5451 token_type_white_space and token_type_eoln here instead of in x_c_lex.
5452 (phase8c_get, phase8c_unget): New functions.
5453 (phase8_get): Rely on phase8c, not phase8a. No more need to care about
5454 token_type_white_space and token_type_eoln.
5455 (x_c_lex): Drop handling of token_type_white_space and token_type_eoln.
5456 (extract_whole_file): Renamed from extract_c.
5457 (extract_c, extract_objc): New functions.
5459 2003-10-20 Bruno Haible <bruno@clisp.org>
5461 * x-java.c (phase3_getc): Fix typo: Use phase2_ungetc, not phase2_getc.
5463 2003-10-20 Bruno Haible <bruno@clisp.org>
5465 Portability to AIX with cc.
5466 * xgettext.h (struct flag_context_ty): Define the bitfields of type
5469 2003-10-20 Bruno Haible <bruno@clisp.org>
5471 Portability to Solaris with cc.
5472 * x-java.c (string_buffer_append): Avoid aggregate initializer
5473 containing non-constant expressions.
5474 * xgettext.c (flag_context_list_iterator): Likewise.
5475 (language_to_extractor): Likewise.
5477 2003-10-11 Bruno Haible <bruno@clisp.org>
5479 * xgettext.c (main): Drop suffix ".in" from input file name, if
5480 present, before looking at the file extension.
5482 2003-10-09 Bruno Haible <bruno@clisp.org>
5484 * format-awk.c: Include xalloc.h instead of xmalloc.h.
5485 * format-c.c: Likewise.
5486 * format-elisp.c: Likewise.
5487 * format-gcc-internal.c: Likewise.
5488 * format-java.c: Likewise.
5489 * format-librep.c: Likewise.
5490 * format-lisp.c: Likewise.
5491 * format-pascal.c: Likewise.
5492 * format-perl.c: Likewise.
5493 * format-perl-brace.c: Likewise.
5494 * format-php.c: Likewise.
5495 * format-python.c: Likewise.
5496 * format-sh.c: Likewise.
5497 * format-tcl.c: Likewise.
5498 * format-ycp.c: Likewise.
5499 * gettext-po.c: Likewise.
5500 * hostname.c: Likewise.
5501 * message.c: Likewise.
5502 * msgexec.c: Likewise.
5503 * msgfilter.c: Likewise.
5504 * msgfmt.c: Likewise.
5505 * msggrep.c: Likewise.
5506 * msginit.c: Likewise.
5507 * msgl-cat.c: Likewise.
5508 * msgl-english.c: Likewise.
5509 * msgl-iconv.c: Likewise.
5510 * msgmerge.c: Likewise.
5511 * open-po.c: Likewise.
5512 * po-gram-gen.y: Likewise.
5513 * po-hash-gen.y: Likewise.
5514 * po-lex.c: Likewise.
5515 * read-mo.c: Likewise.
5516 * read-po-abstract.c: Likewise.
5517 * read-po.c: Likewise.
5518 * read-properties.c: Likewise.
5519 * str-list.c: Likewise.
5520 * write-java.c: Likewise.
5521 * write-mo.c: Likewise.
5522 * write-po.c: Likewise.
5523 * write-properties.c: Likewise.
5524 * write-tcl.c: Likewise.
5525 * x-awk.c: Likewise.
5527 * x-elisp.c: Likewise.
5528 * x-glade.c: Likewise.
5529 * x-java.c: Likewise.
5530 * x-librep.c: Likewise.
5531 * x-lisp.c: Likewise.
5532 * x-perl.c: Likewise.
5533 * x-php.c: Likewise.
5535 * x-python.c: Likewise.
5536 * x-rst.c: Likewise.
5538 * x-smalltalk.c: Likewise.
5539 * x-tcl.c: Likewise.
5540 * x-ycp.c: Likewise.
5541 * xgettext.c: Likewise.
5543 2003-10-07 Bruno Haible <bruno@clisp.org>
5545 More reliable subprocess cleanup.
5546 * msgexec.c (process_string): Pass slave_process = true to
5547 create_pipe_out() and wait_subprocess().
5548 * msgfilter.c (process_string): Pass slave_process = true to
5549 create_pipe_bidi() and wait_subprocess().
5550 * msggrep.c (is_string_selected): Pass slave_process = true to
5551 create_pipe_out() and wait_subprocess().
5552 * msginit.c (project_id, project_id_version, get_user_email,
5553 language_team_address): Pass slave_process = true to create_pipe_in()
5554 and wait_subprocess().
5555 * read-java.c (execute_and_read_po_output): Likewise.
5556 * read-tcl.c (msgdomain_read_tcl): Likewise.
5557 * urlget.c (execute_it, fetch): Pass slave_process = true to execute().
5559 2003-10-05 Bruno Haible <bruno@clisp.org>
5561 * write-java.c: Include fatal-signal.h, not signal.h.
5562 (uninstall_handlers): Remove function.
5563 (cleanup): Remove signal argument. Don't execute the signal's default
5564 action; leave that to the caller.
5565 (install_handlers, init_signal_set, block, unblock): Remove functions.
5566 (msgdomain_write_java): Invoke at_fatal_signal instead of
5567 install_handlers/uninstall_handlers. Invoke [un]block_fatal_signals
5568 instead of [un]block.
5570 2003-10-05 Bruno Haible <bruno@clisp.org>
5572 * xgettext.c (substring_match): Remove variable.
5573 (long_options): Remove --keyword-substring option.
5574 (main): Remove handling of --keyword-substring option.
5576 2003-10-05 Bruno Haible <bruno@clisp.org>
5578 * message.h (enum is_format): New item yes_according_to_context.
5579 * message.c (possible_format_p): Handle also yes_according_to_context.
5580 * write-po.c (make_format_description_string): Likewise.
5582 * xgettext.h (struct flag_context_ty): New type.
5583 (null_context, passthrough_context): New declarations.
5584 (inherited_context): New declaration.
5585 (struct flag_context_list_ty): New type.
5586 (struct flag_context_list_iterator_ty): New type.
5587 (null_context_list_iterator, passthrough_context_list_iterator): New
5589 (flag_context_list_iterator): New declaration.
5590 (flag_context_list_iterator_advance): New declaration.
5591 (flag_context_list_table_ty): New type.
5592 (flag_context_list_table_lookup): New declaration.
5593 (xgettext_record_flag): New declaration.
5594 (remember_a_message, remember_a_message_plural): Add context argument.
5595 * xgettext.c: Include alloca.h.
5596 (flag_table_c, flag_table_gcc_internal, flag_table_sh,
5597 flag_table_python, flag_table_lisp, flag_table_elisp,
5598 flag_table_librep, flag_table_java, flag_table_awk, flag_table_ycp,
5599 flag_table_tcl, flag_table_perl, flag_table_php): New variables.
5600 (long_options): Add option --flag.
5601 (extractor_func): Add argument flag_table.
5602 (struct extractor_ty): New type.
5603 (main): Use type 'extractor_ty' instead of 'extractor_func'.
5604 Invoke init_flag_table_c(), init_flag_table_gcc_internal(),
5605 init_flag_table_sh(), init_flag_table_python(), init_flag_table_lisp(),
5606 init_flag_table_elisp(), init_flag_table_librep(),
5607 init_flag_table_java(), init_flag_table_awk(), init_flag_table_ycp(),
5608 init_flag_table_tcl(), init_flag_table_perl(), init_flag_table_php().
5609 Implement option --flag.
5610 (usage): Rename a section to "Language specific options". Document
5611 the languages to which --extract-all, --keyword, --trigraphs are
5612 applicable. Document option --flag.
5613 (null_context): New variable.
5614 (passthrough_context): New variable.
5615 (inherited_context): New function.
5616 (null_context_list_iterator): New variable.
5617 (passthrough_context_circular_list, passthrough_context_list_iterator):
5619 (flag_context_list_iterator): New function.
5620 (flag_context_list_iterator_advance): New function.
5621 (flag_context_list_table_lookup): New function.
5622 (xgettext_record_flag): New function.
5623 (extract_from_file): Change argument type to 'extractor_ty' instead of
5624 'extractor_func'. Set current_formatstring_parser{1,2} before invoking
5626 (set_format_flags_from_context): New function.
5627 (remember_a_message): Add context argument. Set some *-format flag if
5628 the context specifies it.
5629 (remember_a_message_plural): Likewise.
5630 (language_to_extractor): Change return type to 'extractor_ty' instead
5631 of 'extractor_func'.
5633 * x-awk.h (SCANNERS_AWK): Refer to flag_table_awk.
5634 (extract_awk): Add argument flag_table.
5635 (init_flag_table_awk): New declaration.
5636 * x-awk.c (init_flag_table_awk): New function.
5637 (enum token_type_ty): New enum item token_type_semicolon.
5638 (x_awk_lex): Recognize semicolon.
5639 (flag_context_list_table): New variable.
5640 (extract_parenthesized): Add arguments outer_context, context_iter.
5641 Implement context handling depending on symbol before '('. Also
5642 recognize argument lists that start without '(', but only up to the
5644 (extract_awk): Add argument flag_table. Initialize
5645 flag_context_list_table.
5647 * x-c.h (SCANNERS_C): Refer to flag_table_c, flag_table_gcc_internal.
5648 (extract_c): Add argument flag_table.
5649 (init_flag_table_c): New declaration.
5650 (init_flag_table_gcc_internal): New declaration.
5651 * x-c.c (init_flag_table_c): New function.
5652 (init_flag_table_gcc_internal): New function.
5653 (enum xgettext_token_type_ty): New item xgettext_token_type_other.
5654 (x_c_lex): For token_type_name, put the string into the resulting
5655 token instead of freeing it. Return token type
5656 xgettext_token_type_other instead of xgettext_token_type_symbol in
5658 (flag_context_list_table): New variable.
5659 (extract_parenthesized): Add arguments outer_context, context_iter.
5660 Implement context handling depending on symbol before '('.
5661 (extract_c): Add argument flag_table. Initialize
5662 flag_context_list_table.
5664 * x-elisp.h (SCANNERS_ELISP): Refer to flag_table_elisp.
5665 (extract_elisp): Add argument flag_table.
5666 (init_flag_table_elisp): New declaration.
5667 * x-elisp.c (init_flag_table_elisp): New function.
5668 (flag_context_list_table): New variable.
5669 (read_object): Add argument outer_context. Implement context handling
5670 depending on first symbol after '('.
5671 (extract_elisp): Add argument flag_table. Initialize
5672 flag_context_list_table.
5674 * x-glade.h (SCANNERS_GLADE): Update.
5675 (extract_glade): Add argument flag_table.
5676 * x-glade.c (start_element_handler, end_element_handler): Pass null
5677 context to remember_a_message.
5678 (extract_glade): Add argument flag_table.
5680 * x-java.h (SCANNERS_JAVA): Refer to flag_table_java.
5681 (extract_java): Add argument flag_table.
5682 (init_flag_table_java): New declaration.
5683 * x-java.c (init_flag_table_java): New function.
5684 (flag_context_list_table): New variable.
5685 (extract_parenthesized): Add arguments outer_context, context_iter.
5686 Implement context handling depending on symbol before '('.
5687 (extract_java): Add argument flag_table. Initialize
5688 flag_context_list_table.
5690 * x-librep.h (SCANNERS_ELISP): Refer to flag_table_librep.
5691 (extract_librep): Add argument flag_table.
5692 (init_flag_table_librep): New declaration.
5693 * x-librep.c (init_flag_table_librep): New function.
5694 (flag_context_list_table): New variable.
5695 (read_object): Add argument outer_context. Implement context handling
5696 depending on first symbol after '('.
5697 (extract_librep): Add argument flag_table. Initialize
5698 flag_context_list_table.
5700 * x-lisp.h (SCANNERS_LISP): Refer to flag_table_lisp.
5701 (extract_lisp): Add argument flag_table.
5702 (init_flag_table_lisp): New declaration.
5703 * x-lisp.c (init_flag_table_lisp): New function.
5704 (flag_context_list_table): New variable.
5705 (read_object): Add argument outer_context. Implement context handling
5706 depending on first symbol after '('.
5707 (extract_lisp): Add argument flag_table. Initialize
5708 flag_context_list_table.
5710 * x-perl.h (SCANNERS_PERL): Refer to flag_table_perl.
5711 (extract_perl): Add argument flag_table.
5712 (init_flag_table_perl): New declaration.
5713 * x-perl.c (init_flag_table_java): New function.
5714 (flag_context_list_table): New variable.
5715 (extract_variable): Update. Implement context handling depending on
5716 symbol before '{'...'}'.
5717 (interpolate_keywords): Implement context handling depending on symbol
5718 before '->' or '{'...'}'.
5719 (extract_balanced): Add arguments outer_context, context_iter.
5720 Implement context handling depending on symbol before '('. Also
5721 recognize argument lists that start without '('.
5722 (extract_perl): Add argument flag_table. Initialize
5723 flag_context_list_table.
5725 * x-php.h (SCANNERS_PHP): Refer to flag_table_php.
5726 (extract_php): Add argument flag_table.
5727 (init_flag_table_php): New declaration.
5728 * x-php.c (init_flag_table_php): New function.
5729 (flag_context_list_table): New variable.
5730 (extract_parenthesized): Add arguments outer_context, context_iter.
5731 Implement context handling depending on symbol before '('.
5732 (extract_php): Add argument flag_table. Initialize
5733 flag_context_list_table.
5735 * x-po.h (SCANNERS_PO): Update.
5736 (extract_po): Add argument flag_table.
5737 * x-properties.h (SCANNERS_PROPERTIES): Update.
5738 (extract_properties): Add argument flag_table.
5739 * x-po.c (extract_po): Add argument flag_table.
5740 (extract_properties): Add argument flag_table.
5742 * x-python.h (SCANNERS_PYTHON): Refer to flag_table_python.
5743 (extract_python): Add argument flag_table.
5744 (init_flag_table_python): New declaration.
5745 * x-python.c (init_flag_table_python): New function.
5746 (flag_context_list_table): New variable.
5747 (extract_parenthesized): Add arguments outer_context, context_iter.
5748 Implement context handling depending on symbol before '('.
5749 (extract_python): Add argument flag_table. Initialize
5750 flag_context_list_table.
5752 * x-rst.h (SCANNERS_RST): Update.
5753 (extract_rst): Add argument flag_table.
5754 * x-rst.c (extract_rst): Add argument flag_table.
5756 * x-sh.h (SCANNERS_SH): Refer to flag_table_sh.
5757 (extract_sh): Add argument flag_table.
5758 (init_flag_table_sh): New declaration.
5759 * x-sh.c (init_flag_table_sh): New function.
5760 (flag_context_list_table): New variable.
5761 (read_word): Add context argument.
5762 (read_command): Add outer_context argument. Implement context handling
5763 depending on first symbol of command.
5764 (read_command_list): Add outer_context argument.
5765 (extract_sh): Add argument flag_table. Initialize
5766 flag_context_list_table.
5768 * x-smalltalk.h (SCANNERS_SMALLTALK): Update.
5769 (extract_smalltalk): Add argument flag_table.
5770 * x-smalltalk.c (extract_smalltalk): Add argument flag_table.
5772 * x-tcl.h (SCANNERS_TCL): Refer to flag_table_tcl.
5773 (extract_tcl): Add argument flag_table.
5774 (init_flag_table_tcl): New declaration.
5775 * x-tcl.c (init_flag_table_tcl): New function.
5776 (flag_context_list_table): New variable.
5777 (accumulate_word): Add context argument.
5778 (read_word): Add context argument.
5779 (read_command): Add outer_context argument. Implement context handling
5780 depending on first symbol of command.
5781 (read_command_list): Add outer_context argument.
5782 (extract_tcl): Add argument flag_table. Initialize
5783 flag_context_list_table.
5785 * x-ycp.h (SCANNERS_YCP): Refer to flag_table_ycp.
5786 (extract_ycp): Add argument flag_table.
5787 (init_flag_table_ycp): New declaration.
5788 * x-ycp.c (init_flag_table_ycp): New function.
5789 (flag_context_list_table): New variable.
5790 (extract_parenthesized): New function, split off from extract_ycp.
5791 Implement context handling depending on symbol before '('.
5792 (extract_ycp): Add argument flag_table. Initialize
5793 flag_context_list_table. Call extract_parenthesized to do the work.
5795 * po-lex.c (mbfile_getc, control_sequence): Remove explicit marking of
5796 strings as c-format, now done by xgettext.
5798 2003-09-23 Bruno Haible <bruno@clisp.org>
5800 * x-awk.c (extract_parenthesized): Remove optimization of the
5802 * x-c.c (extract_parenthesized): Likewise.
5803 * x-elisp.c (read_object): Likewise.
5804 * x-librep.c (read_object): Likewise.
5805 * x-lisp.c (read_object): Likewise.
5806 * x-perl.c (x_perl_prelex, extract_balanced): Likewise.
5807 * x-php.c (extract_parenthesized): Likewise.
5808 * x-python.c (extract_parenthesized): Likewise.
5809 * x-sh.c (read_command): Likewise.
5811 2003-10-08 Bruno Haible <bruno@clisp.org>
5813 * msgmerge.c (main): Make option -N work.
5814 Reported by Liu Garfield <jackliu9999@hotmail.com>.
5816 2003-10-04 Bruno Haible <bruno@clisp.org>
5819 * x-java.c: New file.
5820 * x-java.l: Remove file.
5821 * Makefile.am (xgettext_SOURCES): Add x-java.c, remove x-java.l.
5822 (x-java.c): Remove rule.
5825 2003-09-22 Bruno Haible <bruno@clisp.org>
5827 * x-glade.c (start_element_handler): Implement extract_all behaviour.
5829 2003-10-04 Bruno Haible <bruno@clisp.org>
5831 * x-glade.c (do_extract_glade): Initialize stack_depth.
5832 * x-perl.c (extract_perl): Initialize linesize and linepos.
5834 * x-python.c (phase2_getc): Set last_comment_line.
5835 (phase5_get): Set last_non_comment_line.
5837 2003-10-04 Bruno Haible <bruno@clisp.org>
5839 * x-glade.c: Don't include msgl-ascii.h and msgl-iconv.h.
5840 * x-python.c: Likewise.
5841 * x-tcl.c: Likewise.
5843 2003-10-06 Guido Flohr <guido@imperia.net>
5844 Bruno Haible <bruno@clisp.org>
5846 * x-perl.c (enum symbol_type_ty): New enum.
5847 (struct token_ty): Rename field string_type to sub_type and change its
5849 (extract_quotelike_pass3, interpolate_keywords): Update.
5850 (x_perl_prelex): Set sub_type also for symbol tokens.
5851 (x_perl_lex): Special handling of prototype argument lists.
5852 Reported by Crispin Flowerday <cflowerday@zeus.com>.
5854 2003-09-22 Bruno Haible <bruno@clisp.org>
5856 * x-sh.c (read_word): Warn about $"...".
5858 2003-09-18 Bruno Haible <bruno@clisp.org>
5860 * gettext-po.h (po_file_domain_header, po_header_field,
5861 po_message_is_obsolete, po_message_is_fuzzy, po_message_is_format): New
5863 * gettext-po.c (po_file_domain_header, po_header_field,
5864 po_message_is_obsolete, po_message_is_fuzzy, po_message_is_format): New
5866 * Makefile.am (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 1:0:1.
5868 2003-09-14 Bruno Haible <bruno@clisp.org>
5870 * plural-count.c: Include plural-count.h.
5871 * x-po.c: Include x-properties.h.
5872 * x-java.l (append_strings): Change argument type to 'const char *'.
5874 2003-09-14 Bruno Haible <bruno@clisp.org>
5876 * msgfmt.c (check_plural_eval): Mark some strings as c-format.
5877 (msgfmt_add_message): Make static.
5878 * po-lex.c (mbfile_getc, control_sequence): Mark some strings as
5881 2003-09-18 Bruno Haible <bruno@clisp.org>
5885 2003-09-14 Bruno Haible <bruno@clisp.org>
5887 More reliable checking for read errors.
5888 * po-lex.c (mbfile_getc): Diagnose read errors also in the middle of
5889 multibyte characters.
5890 (lex_getc): Diagnose read errors also right after backslash.
5891 * x-rst.c (extract_rst): Diagnose read errors also inside ConstName
5892 and immediately after #.
5894 2003-09-14 Bruno Haible <bruno@clisp.org>
5896 * write-mo.c: Include fwriterror.h.
5897 (msgdomain_write_mo): Use fwriteerror, to get right errno value in
5898 error message about write error.
5899 * write-po.c: Include fwriterror.h.
5900 (msgdomain_list_print): Use fwriteerror, to get right errno value in
5901 error message about write error.
5902 * write-java.c: Include fwriterror.h.
5903 (msgdomain_write_java): Use fwriteerror, to get right errno value in
5904 error message about write error.
5905 * write-tcl.c: Include fwriterror.h.
5906 (msgdomain_write_tcl): Use fwriteerror, to get right errno value in
5907 error message about write error.
5909 2003-09-18 Bruno Haible <bruno@clisp.org>
5911 * xgettext.c (from_current_source_encoding): Use multiline_error,
5912 for a prettier error message.
5914 * x-perl.c (extract_quotelike_pass1): Store counter_delim instead of
5915 EOF as delimiter, to avoid error during from_current_source_encoding.
5916 Reported by Crispin Flowerday <cflowerday@zeus.com>.
5918 2003-09-13 Bruno Haible <bruno@clisp.org>
5920 * format-sh.c (INVALID_SHELL_SYNTAX,
5921 INVALID_CONTEXT_DEPENDENT_VARIABLE): New macros.
5922 (format_parse): Reject constructs like ${variable-default} and $?.
5924 2003-09-13 Bruno Haible <bruno@clisp.org>
5926 Fix behaviour of "<program> --help > /dev/full".
5927 * hostname.c: Include closeout.h.
5928 (main): Register close_stdout for execution at program exit.
5929 * msgattrib.c: Include closeout.h.
5930 (main): Register close_stdout for execution at program exit.
5931 * msgcat.c: Include closeout.h.
5932 (main): Register close_stdout for execution at program exit.
5933 * msgcmp.c: Include closeout.h.
5934 (main): Register close_stdout for execution at program exit.
5935 * msgcomm.c: Include closeout.h.
5936 (main): Register close_stdout for execution at program exit.
5937 * msgconv.c: Include closeout.h.
5938 (main): Register close_stdout for execution at program exit.
5939 * msgen.c: Include closeout.h.
5940 (main): Register close_stdout for execution at program exit.
5941 * msgexec.c: Include closeout.h.
5942 (main): Register close_stdout for execution at program exit.
5943 * msgfilter.c: Include closeout.h.
5944 (main): Register close_stdout for execution at program exit.
5945 * msgfmt.c: Include closeout.h.
5946 (main): Register close_stdout for execution at program exit.
5947 * msggrep.c: Include closeout.h.
5948 (main): Register close_stdout for execution at program exit.
5949 * msginit.c: Include closeout.h.
5950 (main): Register close_stdout for execution at program exit.
5951 * msgmerge.c: Include closeout.h.
5952 (main): Register close_stdout for execution at program exit.
5953 * msgunfmt.c: Include closeout.h.
5954 (main): Register close_stdout for execution at program exit.
5955 * msguniq.c: Include closeout.h.
5956 (main): Register close_stdout for execution at program exit.
5957 * urlget.c: Include closeout.h.
5958 (main): Register close_stdout for execution at program exit.
5959 * xgettext.c: Include closeout.h.
5960 (main): Register close_stdout for execution at program exit.
5961 * write-po.c (msgdomain_list_print): Don't fclose (stdout) here.
5963 2003-09-11 Bruno Haible <bruno@clisp.org>
5965 * po-lex.c (mbfile_getc): Handle unexpected return value of
5966 u8_mbtouc(). Reported by Jochen Hein <jochen@jochen.org>.
5968 2003-09-09 Bruno Haible <bruno@clisp.org>
5970 * read-properties.c (phase4_getuc): Cast line_number to 'unsigned long'
5971 before outputting it.
5973 2003-09-09 Bruno Haible <bruno@clisp.org>
5975 * po-lex.c: Test HAVE_DECL_GETC_UNLOCKED instead of HAVE_GETC_UNLOCKED.
5976 * write-po.c: Test HAVE_DECL_PUTC_UNLOCKED instead of
5979 2003-09-09 Guido Flohr <guido@imperia.net>
5981 * x-perl.c (extract_quotelike_pass3): Change \l handling to no longer
5982 eat up non-uppercase characters; likewise for \u. Also make \l and \u
5983 work on characters written using hex or octal escape sequence. Fix \Q
5984 handling. With option --extract-all, avoid "invalid variable
5985 interpolation" warnings.
5986 (x_perl_prelex): With option --extract-all, keep variables inside
5987 double-quoted strings untouched.
5989 2003-09-03 Bruno Haible <bruno@clisp.org>
5993 * xgettext.c: Include x-sh.h.
5994 (main): Call x_sh_extract_all, x_sh_keyword.
5995 (usage): Mention Shell language.
5996 (language_to_extractor): Add Shell rule.
5997 (extension_to_language): Add Shell rule.
5998 * Makefile.am (noinst_HEADERS): Add x-sh.h.
5999 (xgettext_SOURCES): Add x-sh.c.
6000 * Makefile.msvc (xgettext_OBJECTS): Add x-sh.obj.
6001 (x-sh.obj): New rule.
6002 * Makefile.vms (xgettext_OBJECTS): Add x-sh.obj.
6003 (x-sh.obj): New rule.
6005 2003-08-31 Bruno Haible <bruno@clisp.org>
6007 * format-sh.c: New file.
6008 * message.h (format_sh): New enum value.
6009 (NFORMATS): Increment.
6010 * format.h (formatstring_sh): New declaration.
6011 * format.c (formatstring_parsers): Add entry for sh.
6012 * message.c (format_language, format_language_pretty): Likewise.
6013 * Makefile.am (FORMAT_SOURCE): Add format-sh.c.
6014 * Makefile.msvc (OBJECTS): Add format-sh.obj.
6015 (format-sh.obj): New rule.
6016 * Makefile.vms (OBJECTS): Add format-sh.obj.
6017 (format-sh.obj): New rule.
6019 2003-08-31 Bruno Haible <bruno@clisp.org>
6021 * format-gcc-internal.c (isdigit): Remove unused macro.
6022 * format-perl-brace.c (isdigit): Likewise.
6024 2003-09-01 Guido Flohr <guido@imperia.net>
6026 * x-perl.c (extract_balanced): Access the global last_token.
6027 Initialize last_token and prefer_division_over_regexp here.
6028 (extract_perl): Not here.
6030 2003-08-29 Bruno Haible <bruno@clisp.org>
6032 * x-perl.c: Include getline.h.
6034 2003-08-24 Bruno Haible <bruno@clisp.org>
6036 * Makefile.msvc (format.obj, msgmerge.obj, xgettext.obj, msgattrib.obj,
6037 msgcat.obj, msgcomm.obj, msgconv.obj, msgen.obj, msgfilter.obj,
6038 msggrep.obj, msguniq.obj): Compile these in C++ mode. This works around
6039 the "non-constant initializer" error that we get for addresses of
6040 variables in DLLs in C mode.
6042 2003-08-24 Bruno Haible <bruno@clisp.org>
6044 * msgfilter.c (process_message): Cast xrealloc() result.
6046 2003-08-24 Bruno Haible <bruno@clisp.org>
6048 * msgfilter.c: On Windows, include <io.h> instead of <unistd.h>.
6049 * msggrep.c: Likewise.
6051 2003-08-24 Bruno Haible <bruno@clisp.org>
6053 * plural-count.h: New file.
6054 * plural-count.c: New file, extracted from msgmerge.c.
6055 * msgmerge.c: Include plural-count.h instead of plural-exp.h.
6056 (match_domain): Use function get_plural_count().
6057 * Makefile.am (noinst_HEADERS): Add plural-count.h.
6058 (msgmerge_SOURCES): Add plural-count.c.
6059 * Makefile.msvc (msgmerge_OBJECTS): Add plural-count.obj.
6060 (plural-count.obj): New rule.
6061 * Makefile.vms (msgmerge_OBJECTS): Add plural-count.obj.
6062 (plural-count.obj): New rule.
6064 2003-08-24 Bruno Haible <bruno@clisp.org>
6066 Support for building DLLs on Windows.
6067 * format.h (formatstring_c, formatstring_python, formatstring_lisp,
6068 formatstring_elisp, formatstring_librep, formatstring_smalltalk,
6069 formatstring_java, formatstring_awk, formatstring_pascal,
6070 formatstring_ycp, formatstring_tcl, formatstring_perl,
6071 formatstring_perl_brace, formatstring_php, formatstring_gcc_internal,
6072 formatstring_parsers): Add DLL_VARIABLE attribute.
6073 * message.h (format_language, format_language_pretty): Likewise.
6074 * msgl-cat.h (more_than, less_than, use_first, msgcomm_mode,
6075 omit_header): Likewise.
6076 * plural-table.h (plural_table, plural_table_size): Likewise.
6077 * po-charset.h (po_charset_ascii, po_charset_utf8, po_lex_charset,
6078 po_lex_iconv, po_lex_weird_cjk): Likewise.
6079 * po-lex.h (gram_pos, gram_pos_column, gram_max_allowed_errors,
6080 pass_obsolete_entries): Likewise.
6081 * read-po.h (line_comment, allow_duplicates, input_syntax): Likewise.
6082 * write-mo.h (alignment, no_hash_table): Likewise.
6083 * Makefile.am (po-gram-gen2.h): Likewise.
6085 2003-08-24 Bruno Haible <bruno@clisp.org>
6087 * Makefile.msvc (gettext-po.obj, gettextpo.lib, gettextpo.res): New
6089 (all): Depend on gettextpo.lib.
6090 (install, installdirs, uninstall): Install/uninstall gettext-po.h,
6091 gettextpo.dll and gettextpo.lib.
6092 * Makefile.vms (gettext-po.obj, gettextpo.olb): New rules.
6093 (all): Depend on gettextpo.olb.
6094 (install, installdirs, uninstall): Install/uninstall gettext-po.h,
6097 2003-08-24 Bruno Haible <bruno@clisp.org>
6099 * dir-list.h: Make this file includable in C++ mode: add extern "C".
6100 * file-list.h: Likewise.
6101 * format.h: Likewise.
6102 * message.h: Likewise.
6103 * msgl-ascii.h: Likewise.
6104 * msgl-cat.h: Likewise.
6105 * msgl-charset.h: Likewise.
6106 * msgl-english.h: Likewise.
6107 * msgl-equal.h: Likewise.
6108 * msgl-iconv.h: Likewise.
6109 * open-po.h: Likewise.
6110 * po-charset.h: Likewise.
6111 * po-lex.h: Likewise.
6112 * po-time.h: Likewise.
6113 * read-po-abstract.h: Likewise.
6114 * str-list.h: Likewise.
6115 * write-po.h: Likewise.
6116 * xgettext.h: Likewise.
6117 * read-po.h: Likewise.
6118 (this): Redefine to a different symbol.
6119 * xgettext.c: Add extern "C" around all "x-*.h" includes.
6121 2003-08-22 Bruno Haible <bruno@clisp.org>
6123 * format-awk.c: Include error-progname.h instead of progname.h.
6124 * format-c.c: Likewise.
6125 * format-elisp.c: Likewise.
6126 * format-gcc-internal.c: Likewise.
6127 * format-java.c: Likewise.
6128 * format-librep.c: Likewise.
6129 * format-lisp.c: Likewise.
6130 * format-pascal.c: Likewise.
6131 * format-perl.c: Likewise.
6132 * format-perl-brace.c: Likewise.
6133 * format-php.c: Likewise.
6134 * format-python.c: Likewise.
6135 * format-tcl.c: Likewise.
6136 * format-ycp.c: Likewise.
6137 * po-lex.h: Likewise.
6138 * read-properties.c: Likewise.
6139 * write-po.c: Likewise.
6140 * x-awk.c: Likewise.
6142 * x-perl.c: Likewise.
6143 * x-python.c: Likewise.
6144 * x-rst.c: Likewise.
6145 * hostname.c: Include error-progname.h.
6146 * msgattrib.c: Likewise.
6147 * msgcat.c: Likewise.
6148 * msgcmp.c: Likewise.
6149 * msgcomm.c: Likewise.
6150 * msgconv.c: Likewise.
6151 * msgen.c: Likewise.
6152 * msgexec.c: Likewise.
6153 * msgfilter.c: Likewise.
6154 * msgfmt.c: Likewise.
6155 * msggrep.c: Likewise.
6156 * msginit.c: Likewise.
6157 * msgmerge.c: Likewise.
6158 * msgunfmt.c: Likewise.
6159 * msguniq.c: Likewise.
6160 * urlget.c: Likewise.
6161 * xgettext.c: Likewise.
6162 * po-lex.c: Include error-progname.h and pos.h.
6164 2003-08-15 Bruno Haible <bruno@clisp.org>
6166 * msginit.c (catalogname_for_locale): Add entries for Aragonese,
6167 Haitian, Sichuan Yi, Limburgish.
6168 (englishname_of_language): Likewise.
6170 2003-08-08 Bruno Haible <bruno@clisp.org>
6172 * format-gcc-internal.c: New file.
6173 * message.h (format_gcc_internal): New enum value.
6174 (NFORMATS): Increment.
6175 * format.h (formatstring_gcc_internal): New declaration.
6176 * format.c (formatstring_parsers): Add entry for gcc_internal.
6177 * message.c (format_language, format_language_pretty): Likewise.
6178 * x-c.h (SCANNERS_C): Add an entry for GCC-source.
6179 * xgettext.c (usage): Mention GCC-source language.
6180 * Makefile.am (FORMAT_SOURCE): Add format-gcc-internal.c.
6181 * Makefile.msvc (OBJECTS): Add format-gcc-internal.obj.
6182 (format-gcc-internal.obj): New rule.
6183 * Makefile.vms (OBJECTS): Add format-gcc-internal.obj.
6184 (format-gcc-internal.obj): New rule.
6186 2003-08-04 Bruno Haible <bruno@clisp.org>
6188 * x-perl.c (extract_quotelike_pass3): Fix \x handling.
6189 Reported by Guido Flohr.
6191 2003-07-05 Bruno Haible <bruno@clisp.org>
6193 * format-perl-brace.c: Renamed from format-perl-bracket.c. Recognize
6194 braces instead of brackets.
6195 * format.h (formatstring_perl_brace): Renamed from
6196 formatstring_perl_bracket.
6197 * format.c (formatstring_parsers): Add formatstring_perl_brace, remove
6198 formatstring_perl_bracket.
6199 * message.h (enum format_type): Add format_perl_brace, remove
6200 format_perl_bracket.
6201 * message.c (format_language, format_language_pretty): Update.
6202 * x-perl.h (SCANNERS_PERL): Update.
6203 * Makefile.am (FORMAT_SOURCE): Add format-perl-brace.c, remove
6204 format-perl-bracket.c.
6205 * Makefile.msvc (OBJECTS): Add format-perl-brace.obj, remove
6206 format-perl-bracket.obj.
6207 (format-perl-brace.obj): Renamed from format-perl-bracket.obj.
6208 * Makefile.vms (OBJECTS): Add format-perl-brace.obj, remove
6209 format-perl-bracket.obj.
6210 (format-perl-brace.obj): Renamed from format-perl-bracket.obj.
6212 2003-07-03 Bruno Haible <bruno@clisp.org>
6214 Support for PHP >= 4.2.0.
6215 * x-php.c (init_keywords): Add ngettext, dngettext, dcngettext to the
6217 Reported by A. Sopicki <a.sopicki@gmx.de>.
6219 2003-06-27 Bruno Haible <bruno@clisp.org>
6221 * xgettext.h (from_current_source_encoding): New declaraction.
6222 * xgettext.c (from_current_source_encoding): New function.
6223 (CONVERT_STRING): Use it.
6224 * x-perl.c: Include po-charset.h.
6225 (get_here_document): Convert each line to UTF-8.
6226 (phase2_getc): Convert each comment to UTF-8. Tell xgettext_comment_add
6228 (extract_quotelike_pass1_utf8): New function.
6229 (extract_quotelike): Use extract_quotelike_pass1_utf8.
6230 (extract_triple_quotelike): Likewise.
6231 (extract_variable): Tell remember_a_message to not convert the string.
6232 (interpolate_keywords): Likewise.
6233 (extract_balanced): Tell remember_a_message, remember_a_message_plural
6234 to not convert the string.
6236 2003-06-23 Guido Flohr <guido@imperia.net>
6238 * x-perl.c (extract_quotelike_pass3): Fix handling of doubled
6239 backslashes in single-quoted strings.
6241 2003-06-23 Bruno Haible <bruno@clisp.org>
6243 * format-perl-bracket.c (format_check): Allow additional bracketed
6244 items in the msgstr.
6246 2003-06-22 Bruno Haible <bruno@clisp.org>
6248 * write-properties.c: Don't include exit.h and gettext.h.
6250 2003-06-22 Bruno Haible <bruno@clisp.org>
6252 * x-php.c (phase3_ungetc): Comment out unused function.
6254 2003-06-21 Bruno Haible <bruno@clisp.org>
6256 * format-perl.c: Complete rewrite.
6257 * format-perl-bracket.c: New file.
6258 * message.h (format_perl_bracket): New enum value.
6259 (NFORMATS): Increment.
6260 * format.h (formatstring_perl_bracket): New declaration.
6261 * format.c (formatstring_parsers): Add entry for perl_bracket.
6262 * message.c (format_language, format_language_pretty): Likewise.
6263 * x-perl.h (SCANNERS_PERL): Use formatstring_perl and
6264 formatstring_perl_bracket.
6265 * Makefile.am (FORMAT_SOURCE): Add format-perl-bracket.c.
6266 * Makefile.msvc (OBJECTS): Add format-perl.obj,format-perl-bracket.obj.
6267 (xgettext_OBJECTS): Add x-perl.obj.
6268 (format-perl.obj, format-perl-bracket.obj, x-perl.obj): New rules.
6269 * Makefile.vms (OBJECTS): Add format-perl.obj, format-perl-bracket.obj.
6270 (xgettext_OBJECTS): Add x-perl.obj.
6271 (format-perl.obj, format-perl-bracket.obj, x-perl.obj): New rules.
6273 * x-perl.c (extract_quotelike_pass3): Don't give an invalid
6274 interpolation error for a backslashed dollar sign.
6276 2003-06-21 Bruno Haible <bruno@clisp.org>
6278 * x-perl.c (extract_quotelike_pass3): Fix handling of double backslash.
6280 2003-06-19 Bruno Haible <bruno@clisp.org>
6282 * x-perl.c (enum string_type_ty): Remove trailing comma.
6283 (interpolate_keywords::enum parser_state): Likewise.
6284 (extract_quotelike_pass3): Cast first argument of u8_uctomb().
6286 2003-06-15 Bruno Haible <bruno@clisp.org>
6288 * x-awk.c: Reorder definitions.
6289 * x-c.c: Reorder definitions.
6290 * x-perl.c: Reorder definitions.
6291 * x-php.c: Reorder definitions.
6292 * x-python.c: Reorder definitions.
6293 * x-smalltalk.c: Reorder definitions.
6294 * x-ycp.c: Reorder definitions.
6296 2003-06-15 Bruno Haible <bruno@clisp.org>
6298 * x-perl.c (struct stack_entry): Remove type.
6299 (struct stack): Remove type.
6300 (struct token_stack_ty): New type.
6301 (token_stack): Change type to 'struct token_stack_ty'.
6302 (token_stack_dump): Renamed from stack_dump. Update.
6303 (token_stack_push): Renamed from stack_unshift. Rewritten.
6304 (token_stack_pop): Renamed from stack_shift. Rewritten.
6305 (token_stack_peek): Renamed from stack_head. Rewritten.
6306 (token_stack_free): Renamed from stack_free. Rewritten.
6307 (x_perl_lex, x_perl_unlex, extract_perl): Update.
6309 2003-06-15 Bruno Haible <bruno@clisp.org>
6311 * x-perl.c (DEBUG_MEMORY): Remove macro.
6312 (remember_a_message_debug, remember_a_message_plural_debug,
6313 xmalloc_debug, xrealloc_debug, xrealloc_static_debug, xstrdup_debug,
6314 free_debug): Remove functions.
6315 (xrealloc_static): Remove macro. Use xrealloc instead.
6317 2003-06-15 Bruno Haible <bruno@clisp.org>
6319 * x-awk.c (phase2_getc, x_awk_lex): Increase bufmax proportionally.
6320 * x-c.c (comment_add, comment_line_end, phase5_get, phase6_get):
6322 * x-elisp.c (comment_add, comment_line_end): Likewise.
6323 * x-librep.c (comment_add, comment_line_end): Likewise.
6324 * x-lisp.c (comment_add, comment_line_end): Likewise.
6325 * x-php.c (comment_add, comment_line_end, x_php_lex): Likewise.
6326 * x-python.c (comment_add, comment_line_end, phase5_get): Likewise.
6327 * x-rst.c (extract_rst): Likewise.
6328 * x-smalltalk.c (comment_add, comment_line_end, phase2_get): Likewise.
6329 * x-tcl.c (comment_add, comment_line_end): Likewise.
6330 * x-ycp.c (phase2_getc, x_ycp_lex): Likewise.
6332 2003-06-15 Bruno Haible <bruno@clisp.org>
6334 * xgettext.c (current_formatstring_parser1,
6335 current_formatstring_parser2): New variables, replacing
6336 current_formatstring_parser.
6337 (remember_a_message, remember_a_message_plural): Try both
6338 formatstring parsers.
6339 (language_to_extractor): Allow two formatstring parsers per language,
6341 * x-perl.h (SCANNERS_PERL): Add formatstring_c as secondary format
6343 * x-awk.h (SCANNERS_AWK): Update.
6344 * x-c.h (SCANNERS_C): Update.
6345 * x-elisp.h (SCANNERS_ELISP): Update.
6346 * x-glade.h (SCANNERS_GLADE): Update.
6347 * x-java.h (SCANNERS_JAVA): Update.
6348 * x-librep.h (SCANNERS_LIBREP): Update.
6349 * x-lisp.h (SCANNERS_LISP): Update.
6350 * x-php.h (SCANNERS_PHP): Update.
6351 * x-po.h (SCANNERS_PO): Update.
6352 * x-properties.h (SCANNERS_PROPERTIES): Update.
6353 * x-python.h (SCANNERS_PYTHON): Update.
6354 * x-rst.h (SCANNERS_RST): Update.
6355 * x-smalltalk.h (SCANNERS_SMALLTALK): Update.
6356 * x-tcl.h (SCANNERS_TCL): Update.
6357 * x-ycp.h (SCANNERS_YCP): Update.
6359 2003-06-15 Bruno Haible <bruno@clisp.org>
6361 * x-perl.c (case_whitespace): New macro.
6362 (is_whitespace): New function.
6363 (interpolate_keywords): Add lineno argument. Track newlines to update
6364 lineno while processing the string. Use is_whitespace.
6365 (extract_triple_quotelike): Update. Use is_whitespace.
6366 (extract_variable): Simplify: add final NUL byte only when done. Use
6368 (x_perl_prelex): Use is_whitespace. After reading a here document, use
6369 line_number+1, not line_number. Fix buffer overrun in <<XYZ handling.
6370 (collect_message): Use is_whitespace.
6371 (extract_balanced): Call free_token at the end of the loop, not at the
6374 2003-06-14 Bruno Haible <bruno@clisp.org>
6376 * x-perl.c (enum token_type_ty): Reorder, so as to simplify the
6377 function free_token().
6378 (struct token_ty): Fix comments.
6379 (token2string): Add const.
6380 (token_stack): Make static.
6381 (*_debug, stack_dump): Remove all fflushs.
6382 (linebuf, linesize, linepos, linebuf_size, last_token, here_eaten,
6383 end_of_file): Make static.
6384 (last_string, last_string_finished): Remove unused variables.
6385 (phase1_getc, get_here_document, skip_pod): Test getline() result
6386 for being < 0, not == EOF.
6387 (phase1_ungetc): Signal internal error through abort(), not exit().
6388 (get_here_document): Tweak. Increase bufmax proportionally.
6389 (phase2_getc): Increase bufmax proportionally.
6390 (prefer_division_over_regexp): Fix comment.
6391 (extract_hex, extract_oct): Add const. Simplify.
6392 (extract_quotelike): Add a safety check.
6393 (extract_quotelike_pass1): Increase bufmax proportionally. Fix
6394 insufficient memory allocation at "bufpos + len >= bufmax".
6395 (extract_quotelike_pass3): Increase bufmax proportionally. Make crs
6396 const. After \x{ABC} position crs after the closing brace. Simplify \c
6397 code. Reduce memory allocation when \N{ABC} is seen. Fix bug in \l and
6398 \u. Fix error message when $ or @ is seen.
6399 (extract_variable): Increase bufmax proportionally.
6400 (interpolate_keywords): Likewise. Convert c's value to unsigned char.
6401 (x_perl_prelex): Increase bufmax proportionally. Compute 4th argument
6402 to extract_triple_quotelike completely.
6403 (extract_perl): Initialize token_stack correctly.
6405 2003-06-13 Bruno Haible <bruno@clisp.org>
6407 * msgexec.c (process_string): Pass null_stderr=false.
6408 * msgfilter.c (process_string): Likewise.
6409 * msggrep.c (is_string_selected): Likewise.
6410 * read-java.c (execute_and_read_po_output): Likewise.
6411 * read-tcl.c (msgdomain_read_tcl): Likewise.
6412 * msginit.c (project_id, project_id_version, get_user_email,
6413 language_team_address): Return a default value if the subprocess
6414 fails, instead of exiting.
6416 2003-06-12 Bruno Haible <bruno@clisp.org>
6418 * Makefile.am (noinst_HEADERS): Add x-perl.h.
6419 (FORMAT_SOURCE): Add format-perl.c.
6420 (xgettext_SOURCES): Add x-perl.c.
6421 * message.h (enum format_type): Mention perl between tcl and php.
6422 * message.c (format_language, format_language_pretty): Likewise.
6423 * format.h (formatstring_perl): Likewise.
6424 * format.c (formatstring_parsers): Likewise.
6425 * format-perl.c: Use GNU coding style. Prefer xmalloc over xcalloc.
6426 * x-perl.h: Assume ANSI C.
6427 * x-perl.c: Assume ANSI C. Use GNU coding style. Prefer xmalloc over
6429 (token_buf): Remove unused variable.
6430 (xcalloc_debug, stack_push, stack_pop): Remove unused functions.
6431 * xgettext.c: Mention perl between tcl and php.
6433 2003-06-11 Guido Flohr <guido@imperia.net>
6435 * message.h (enum format_type): New enum value 'format_perl'.
6436 (NFORMATS): Increment.
6437 * message.c (format_language, format_language_pretty): Add entry
6439 * format.h (formatstring_perl): New declaration.
6440 * format-perl.c: New file.
6441 * format.c (formatstring_parsers): Add entry for perl.
6442 * x-perl.h: New file.
6443 * x-perl.c: New file.
6444 * xgettext.c: Include x-perl.h.
6445 (main): Call x_perl_extract_all, x_perl_keyword.
6446 (usage): Mention Perl language.
6447 (language_to_extractor): Add Perl rule.
6448 (extension_to_language): Add Perl rule.
6450 2003-06-08 Bruno Haible <bruno@clisp.org>
6452 * Makefile.vms (LDADD): Take options from .opt files.
6453 (libiconv.opt): New rule.
6454 (msgcmp.exe, msgfmt.exe, msgmerge.exe, msgunfmt.exe, xgettext.exe,
6455 msgattrib.exe, msgcat.exe, msgcomm.exe, msgconv.exe, msgen.exe,
6456 msgexec.exe, msgfilter.exe, msggrep.exe, msginit.exe, msguniq.exe):
6458 * plural-eval.c: Include "eval-plural.h" without a path, rely on the
6459 Makefile's -I options instead.
6460 * read-properties.c (conv_from_java): Change type of q to
6462 Reported by Jouk Jansen <joukj@hrem.stm.tudelft.nl>.
6464 2003-05-27 Bruno Haible <bruno@clisp.org>
6466 * plural-table.c (plural_table): Correct entry for Slovak.
6467 Reported by Marcel Telka <marcel@telka.sk>.
6469 2003-05-24 Bruno Haible <bruno@clisp.org>
6471 * x-glade.h (EXTENSIONS_GLADE): Also recognize the .glade2 extension.
6472 * x-glade.c (start_element_handler): Also extract strings according to
6473 Glade 2 conventions.
6475 2003-05-22 Bruno Haible <bruno@clisp.org>
6477 * gettext-0.12.1 released.
6479 2003-05-21 Bruno Haible <bruno@clisp.org>
6481 * msggrep.c (main) [Solaris]: Fix syntax error.
6482 Reported by Valery Beaud <valery.beaud@art.alcatel.fr>.
6484 2003-05-21 Bruno Haible <bruno@clisp.org>
6486 * xgettext.c (output_syntax): New variable.
6488 (finalize_header): If --properties-output was given, set the charset.
6490 2003-05-18 Bruno Haible <bruno@clisp.org>
6492 * Makefile.msvc (DEBUGFLAGS): New variable.
6493 (gettextsrc.lib): Use it.
6494 (msgcmp.exe, msgfmt.exe, msgmerge.exe, msgunfmt.exe, xgettext.exe,
6495 msgattrib.exe, msgcat.exe, msgcomm.exe, msgconv.exe, msgen.exe,
6496 msgexec.exe, msgfilter.exe, msggrep.exe, msginit.exe, msguniq.exe):
6497 Use it, and MFLAGS too.
6499 2003-05-17 Bruno Haible <bruno@clisp.org>
6501 * gettext-0.12 released.
6503 2003-05-17 Bruno Haible <bruno@clisp.org>
6505 * Makefile.msvc (msgcmp.exe, msgfmt.exe, msgmerge.exe, msgunfmt.exe,
6506 msgattrib.exe, msgcat.exe, msgcomm.exe, msgconv.exe, msgen.exe,
6507 msgexec.exe, msgfilter.exe, msggrep.exe, msginit.exe, msguniq.exe):
6508 Link with iconv.lib, needed by intl.lib.
6510 2003-05-12 Bruno Haible <bruno@clisp.org>
6512 * msginit.c (F_OK): Provide a fallback value.
6513 Reported by Perry Rapp.
6515 2003-05-10 Bruno Haible <bruno@clisp.org>
6517 * msgl-iconv.c (iconv_string): Don't return -1 just because the string
6518 is longer than 4 KB.
6519 Reported by Denis Barbier <barbier@linuxfr.org>.
6521 2003-05-04 Bruno Haible <bruno@clisp.org>
6523 * po-lex.h (po_gram_error): Don't use ISO C 99 feature on DEC C.
6524 * po-lex.c (po_gram_error): LIkewise.
6526 2003-05-03 Bruno Haible <bruno@clisp.org>
6528 * msgfilter.c: Include <sys/select.h> also on EMX.
6529 Reported by Andreas Buening <andreas.buening@nexgo.de>.
6531 2003-04-26 Bruno Haible <bruno@clisp.org>
6533 * message.h (msgdomain_list_ty): Add field 'encoding'.
6534 * message.c (msgdomain_list_alloc): Initialize it.
6535 * read-properties.h: New file.
6536 * read-properties.c: New file.
6537 * read-po-abstract.h (abstract_po_reader_class_ty): In
6538 directive_message field, add force_fuzzy argument.
6539 (po_scan_start, po_scan_end): Remove declarations.
6540 (input_syntax_ty): New type.
6541 (po_callback_message): Add force_fuzzy argument.
6542 * read-po-abstract.c (call_directive_message, po_callback_message):
6543 Add force_fuzzy argument.
6544 (po_scan_start, po_scan_end): Make static.
6545 (po_scan): Add support for syntax_properties. Move
6546 error_message_count handling to here.
6547 (po_callback_message): Move po_lex_charset_set invocation away.
6548 * read-po.h (default_po_reader_class_ty): In add_message field, add
6549 force_fuzzy argument.
6550 (default_directive_message, default_add_message): Add force_fuzzy
6552 (inout_syntax): New declaration.
6553 * read-po.c (call_add_message): Add force_fuzzy argument.
6554 (default_directive_message, default_add_message): Likewise.
6555 (input_syntax): New variable.
6556 (read_po): Pass input_syntax to po_scan(). Set mdlp->encoding if
6558 * po-gram-gen.y: Pass force_fuzzy = false.
6559 (do_callback_message): New function. Move po_lex_charset_set
6561 * po-lex.c (lex_end): Move error_message_count handling away.
6562 * write-properties.h: New file.
6563 * write-properties.c: New file.
6564 * write-po.h (message_print_syntax_properties): New declaration.
6565 * write-po.c (use_syntax_properties): New variable.
6566 (message_print_syntax_properties): New function.
6567 (msgdomain_list_print_po): New function, extracted from
6568 msgdomain_list_print.
6569 (msgdomain_list_print): Add check for plural forms. Add support for
6570 writing the .properties format.
6571 (extract_po): Renamed from extract.
6572 * write-java.h (msgdomain_write_java): Add canon_encoding argument.
6573 * write-java.c (msgdomain_write_java): Likewise.
6574 * write-tcl.h (msgdomain_write_tcl): Likewise.
6575 * write-tcl.c (msgdomain_write_tcl): Likewise.
6576 * msgl-cat.c (catenate_msgdomain_list): Use mdlp->encoding if there
6577 is no header entry. Set total_mdlp->encoding if possible.
6578 * msgl-iconv.c (iconv_msgdomain_list): Use mdlp->encoding if there
6579 is no header entry. Set mdlp->encoding.
6580 * msgattrib.c (long_options): Add --properties-input/output.
6581 (main): Handle them.
6582 (usage): Document options -P and -p.
6583 * msgcat.c (long_options): Add --properties-input/output.
6584 (main): Handle them. If option -p is used, convert to UTF-8 and
6586 (usage): Document options -P and -p.
6587 * msgcomm.c (long_options): Add --properties-input/output.
6588 (main): Handle them.
6589 (usage): Document options -P and -p.
6590 * msgconv.c (long_options): Add --properties-input/output.
6591 (main): Handle them. If option -p is used, ignore the to_code.
6592 (usage): Document options -P and -p.
6593 * msgen.c (long_options): Add --properties-input/output.
6594 (main): Handle them.
6595 (usage): Document options -P and -p.
6596 * msgfilter.c (long_options): Add --properties-input/output.
6597 (main): Handle them.
6598 (usage): Document options -P and -p.
6599 * msggrep.c (long_options): Add --properties-input/output.
6600 (main): Handle them.
6601 (usage): Document options -P and -p.
6602 * msginit.c (long_options): Add --properties-input/output.
6603 (main): Handle them.
6604 (usage): Document options -P and -p.
6605 * msgmerge.c (long_options): Add --properties-input/output.
6606 (main): Handle them. In update mode, --properties-input implies
6607 --properties-output.
6608 (usage): Document options -P and -p.
6609 (merge): Set result->encoding if possible.
6610 * msguniq.c (long_options): Add --properties-input/output.
6611 (main): Handle them.
6612 (usage): Document options -P and -p.
6613 * msgcmp.c (long_options): Add --properties-input.
6615 (usage): Document option -P.
6616 * msgexec.c (long_options): Add --properties-input.
6618 (usage): Document option -P.
6619 * msgfmt.c (long_options): Add --properties-input.
6620 (main): Handle it. Pass the known canon_encoding to
6621 msgdomain_write_java and msgdomain_write_tcl.
6622 (usage): Document option -P.
6623 (msgfmt_add_message): Add force_fuzzy argument.
6624 (read_po_file_msgfmt): Pass input_syntax to po_scan().
6625 * msgunfmt.c (long_options): Add --properties-output.
6627 (usage): Document option -p.
6628 * x-properties.h: New file.
6629 * x-po.c (extract_add_message): Add force_fuzzy argument.
6630 (extract): Renamed from extract_po. Pass input_syntax to po_scan().
6631 (extract_po): New function.
6632 (extract_properties): New function.
6633 * xgettext.h: Include read-po.h.
6634 * xgettext.c (long_options): Add --properties-output.
6636 (usage): Document options -L JavaProperties and --properties-output.
6637 (exclude_directive_message): Add force_fuzzy argument.
6638 (read_exclusion_file): Pass input_syntax to po_scan().
6639 (table): Add support for .properties format.
6640 * Makefile.am (noinst_HEADERS): Add read-properties.h,
6641 write-properties.h, x-properties.h.
6642 (COMMON_SOURCE): Add read-properties.c.
6643 (libgettextsrc_la_SOURCES): Add write-properties.c.
6644 * Makefile.msvc (OBJECTS): Add read-properties.obj,
6645 write-properties.obj.
6646 (read-properties.obj, write-properties.obj): New rules.
6647 * Makefile.vms (OBJECTS): Add read-properties.obj,
6648 write-properties.obj.
6649 (read-properties.obj, write-properties.obj): New rules.
6652 2003-04-21 Bruno Haible <bruno@clisp.org>
6654 * read-po-abstract.h (po_scan_file): Remove declaration.
6655 * read-po-abstract.c (po_scan_file): Remove function.
6656 * read-po.c (read_po_file): Call read_po.
6657 * msgfmt.c (read_po_file_msgfmt): Call open_po_file. Invoke po_scan
6658 instead of po_scan_file.
6659 * xgettext.c (read_exclusion_file): Call open_po_file. Invoke po_scan
6660 instead of po_scan_file.
6662 2003-04-20 Bruno Haible <bruno@clisp.org>
6664 * open-po.h (open_po_file): Add argument 'exit_on_error'.
6665 * open-po.c (try_open_po_file): Renamed from open_po_file.
6666 (open_po_file): New function.
6667 * po-lex.h (lex_end): Change return type to void.
6668 (lex_open, lex_close): Remove declarations.
6669 * po-lex.c (lex_end): Change return type to void.
6670 (lex_open, lex_close): Remove functions.
6671 * read-po-abstract.c (po_scan_file): Inline lex_open and lex_close.
6674 2003-04-14 Bruno Haible <bruno@clisp.org>
6676 * hostname.c (usage): Split strings: use one string per option
6678 * msgattrib.c (usage): Likewise.
6679 * msgcat.c (usage): Likewise.
6680 * msgcmp.c (usage): Likewise.
6681 * msgcomm.c (usage): Likewise.
6682 * msgconv.c (usage): Likewise.
6683 * msgen.c (usage): Likewise.
6684 * msgexec.c (usage): Likewise.
6685 * msgfilter.c (usage): Likewise.
6686 * msgfmt.c (usage): Likewise.
6687 * msggrep.c (usage): Likewise.
6688 * msginit.c (usage): Likewise.
6689 * msgmerge.c (usage): Likewise.
6690 * msgunfmt.c (usage): Likewise.
6691 * msguniq.c (usage): Likewise.
6692 * urlget.c (usage): Likewise.
6693 * xgettext.c (usage): Likewise.
6695 2003-04-13 Bruno Haible <bruno@clisp.org>
6697 Unify three PO file parsers.
6698 * read-po-abstract.h: Renamed from po.h.
6699 (abstract_po_reader_class_ty): Renamed from po_method_ty.
6700 (abstract_po_reader_ty): Renamed from po_ty.
6701 (ABSTRACT_PO_READER_TY): Renamed from PO_BASE_TY.
6702 (po_reader_alloc): Renamed from po_alloc.
6703 (po_reader_free): Renamed from po_free.
6704 * read-po-abstract.c: Renamed from po.c.
6705 (po_reader_alloc): Renamed from po_alloc.
6706 (po_reader_free): Renamed from po_free.
6707 (call_parse_brief): Renamed from po_parse_brief.
6708 (call_parse_debrief): Renamed from po_parse_debrief.
6709 (call_directive_domain): Renamed from po_directive_domain.
6710 (call_directive_message): Renamed from po_directive_message.
6711 (call_comment): Renamed from po_comment.
6712 (call_comment_dot): Renamed from po_comment_dot.
6713 (call_comment_filepos): Renamed from po_comment_filepos.
6714 (call_comment_special): Renamed from po_comment_special.
6715 * read-po.h: Include read-po-abstract.h.
6716 (default_po_reader_class_ty, default_po_reader_ty): New types.
6717 (ABSTRACT_PO_READER_TY): New macro.
6718 (default_constructor, default_destructor, default_parse_brief,
6719 default_parse_debrief, default_directive_domain,
6720 default_directive_message, default_comment, default_comment_dot,
6721 default_comment_filepos, default_comment_special, default_set_domain,
6722 default_add_message): New declarations.
6723 (default_po_reader_alloc): New declaration.
6724 * read-po.c (default_po_reader_ty): Renamed from readall_class_ty.
6725 Add fields handle_comments, handle_filepos_comments,
6726 allow_domain_directives, allow_duplicates,
6727 allow_duplicates_if_same_msgstr.
6728 (call_set_domain, call_add_message, call_frob_new_message): New
6730 (default_constructor): Renamed from readall_constructor. Don't set
6731 this->mdlp and this->mlp.
6732 (default_destructor): Renamed from readall_destructor.
6733 (default_parse_brief): Renamed from readall_parse_brief.
6734 (default_parse_debrief): New function.
6735 (default_copy_comment_state, default_reset_comment_state): New
6737 (default_directive_domain): Renamed from readall_directive_domain.
6738 Call set_domain method.
6739 (default_directive_message): Renamed from readall_directive_message.
6740 Call add_message method.
6741 (default_comment): Renamed from readall_comment.
6742 (default_comment_dot): Renamed from readall_comment_dot.
6743 (default_comment_filepos): Renamed from readall_comment_filepos.
6744 (default_comment_special): Renamed from readall_comment_special.
6745 (default_set_domain, default_add_message): New functions.
6746 (default_methods): Renamed from readall_methods.
6747 (default_po_reader_alloc): New function.
6748 (read_po, read_po_file): Update.
6749 * msgfmt.c: Include read-po.h instead of po.h.
6750 (msgfmt_po_reader_ty): Renamed from msgfmt_class_ty. Inherit
6751 from default_po_reader_ty.
6752 (main): Drop po_lex_pass_comments call, done by default_parse_brief.
6753 (msgfmt_constructor): Renamed from format_constructor. Call superclass
6755 (msgfmt_parse_debrief): Renamed from format_debrief. Call superclass
6757 (format_directive_domain): Remove function.
6758 (msgfmt_set_domain): New function.
6759 (format_directive_message): Remove function.
6760 (msgfmt_add_message, msgfmt_frob_new_message): New functions.
6761 (msgfmt_comment_special): Renamed from format_comment_special.
6762 (msgfmt_methods): Renamed from format_methods.
6763 (read_po_file_msgfmt): Renamed from read_po_file.
6764 * x-po.c: Include read-po.h instead of po.h.
6765 (extract_class_ty, extract_constructor, extract_directive_domain,
6766 extract_directive_message, extract_parse_brief, extract_comment,
6767 extract_comment_dot, extract_comment_filepos, extract_comment_special):
6769 (extract_add_message): New function.
6770 (extract_methods): Update.
6771 (extract_po): Update.
6772 * xgettext.c: Include read-po-abstract.h instead of po.h.
6773 (exclude_directive_domain, exclude_directive_message, exclude_methods,
6774 read_exclusion_file): Update.
6775 * msgcmp.c: Don't include po.h.
6776 * msgmerge.c: Likewise.
6777 * po-gram-gen.y: Include read-po-abstract.h instead of po.h.
6778 * po-hash-gen.y: Likewise.
6779 (po_parse_comment_filepos): Renamed from po_hash.
6780 * po-hash.h (po_parse_comment_filepos): Renamed from po_hash.
6781 * Makefile.am (noinst_HEADERS): Remove po.h, add read-po-abstract.h.
6782 (COMMON_SOURCE): Remove po.c, add read-po-abstract.c.
6783 * Makefile.msvc (OBJECTS): Remove po.obj, add read-po-abstract.obj.
6784 (read-po-abstract.obj): Renamed from po.obj.
6785 * Makefile.vms (OBJECTS): Remove po.obj, add read-po-abstract.obj.
6786 (read-po-abstract.obj): Renamed from po.obj.
6788 2003-04-13 Bruno Haible <bruno@clisp.org>
6790 * read-po.c (readall_directive_message): Separate accumulation and
6792 * x-po.c (extract_directive_message): Likewise.
6794 2003-04-13 Bruno Haible <bruno@clisp.org>
6796 * write-po.h (message_print_comment, message_print_comment_dot,
6797 message_print_comment_filepos, message_print_comment_flags): New
6799 * write-po.c: Reorder functions.
6800 (message_print_comment, message_print_comment_dot,
6801 message_print_comment_filepos, message_print_comment_flags): New
6802 functions, extracted from message_print.
6803 (message_print): Use them.
6804 (message_print_obsolete): Use message_print_comment.
6806 2003-04-22 Bruno Haible <bruno@clisp.org>
6808 * plural-table.c (plural_table): Add an entry about Faroese.
6809 Reported by Jacob Sparre Andersen <sparre@crs4.it>.
6811 2003-04-13 Bruno Haible <bruno@clisp.org>
6813 * po.h (po_scan_start, po_scan_end): New declarations.
6814 * po.c: Reorder functions.
6815 (po_scan_start, po_scan_end): New functions.
6816 (po_scan, po_scan_file): Use them.
6818 2003-04-12 Bruno Haible <bruno@clisp.org>
6820 * Makefile.vms: New variables ABIFLAGS, DEFS. Avoid rules with no
6821 lines. Don't use the force target. Correct wildcard syntax.
6822 Suggested by Jouk Jansen <joukj@hrem.stm.tudelft.nl>.
6824 2003-04-13 Bruno Haible <bruno@clisp.org>
6826 * xgettext.c (construct_header): Remove spurious comma.
6828 2003-03-30 Bruno Haible <bruno@clisp.org>
6830 * Makefile.vms: New file.
6831 * Makefile.am (EXTRA_DIST): Add Makefile.vms.
6832 (x-java.c): Prepend a few VMS specific lines.
6833 * po-lex.c (mbfile_getc): Change element type of scatchbuf to
6835 * write-java.c (string_hashcode, write_java_string): Cast argument of
6837 * write-tcl.c (write_tcl_string): Likewise.
6838 * x-python.c (phase7_getuc): Cast argument of unicode_name_character.
6839 * msgfilter.c (write): #undef before redefining it. Needed for VMS.
6842 2003-03-30 Bruno Haible <bruno@clisp.org>
6844 * Makefile.am (noinst_HEADERS): Add po-gram-gen2.h.
6845 (BUILT_SOURCES): Add po-gram-gen2.h.
6846 (DISTCLEANFILES): Remove po-gram-gen2.h.
6847 (po-gram-gen2.h): Simplify rule.
6849 2003-03-17 Bruno Haible <bruno@clisp.org>
6851 Native Woe32/MSVC support.
6852 * Makefile.msvc: New file.
6853 * Makefile.am (EXTRA_DIST): Add it.
6854 * msgfilter.c: Include <sys/time.h> only if it exists.
6855 (process_string): Mark as NYI on Woe32.
6856 * msgfmt.c (sigjmp_buf, sigsetjmp, siglongjmp): Provide fallback
6857 definitions for Woe32.
6858 * msginit.c: Include <fcntl.h>, for F_OK. Include <pwd.h> only if it
6860 (get_user_pwd, get_user_fullname): Adapt for when <pwd.h> is missing.
6861 (project_id, project_id_version, get_user_email,
6862 language_team_address): Use DEV_NULL instead of "/dev/null".
6863 * msggrep.c (is_string_selected): Likewise.
6864 * read-java.c (execute_and_read_po_output): Likewise.
6865 * read-tcl.c (msgdomain_read_tcl): Likewise.
6866 * write-mo.c: Include <sys/param.h> only if it exists.
6868 2003-03-28 Bruno Haible <bruno@clisp.org>
6870 * msgmerge.c (main): Use copy_file_preserving instead of copy_file.
6872 2003-03-16 Bruno Haible <bruno@clisp.org>
6874 * str-list.h (string_list_join): Comment out.
6875 * str-list.c (string_list_join): Comment out.
6877 2003-03-10 Bruno Haible <bruno@clisp.org>
6879 * msggrep.c (no_pass): Mention option -C.
6880 (usage): Document option -C completely.
6881 Reported by Martin Quinson <Martin.Quinson@tuxfamily.org>.
6883 2003-02-28 Bruno Haible <bruno@clisp.org>
6885 Support for relocatable installation.
6886 * msgattrib.c: Include relocatable.h.
6887 (main): Relocate LOCALEDIR value.
6888 * msgcat.c: Include relocatable.h.
6889 (main): Relocate LOCALEDIR value.
6890 * msgcmp.c: Include relocatable.h.
6891 (main): Relocate LOCALEDIR value.
6892 * msgcomm.c: Include relocatable.h.
6893 (main): Relocate LOCALEDIR value.
6894 * msgconv.c: Include relocatable.h.
6895 (main): Relocate LOCALEDIR value.
6896 * msgen.c: Include relocatable.h.
6897 (main): Relocate LOCALEDIR value.
6898 * msgexec.c: Include relocatable.h.
6899 (main): Relocate LOCALEDIR value.
6900 * msgfilter.c: Include relocatable.h.
6901 (main): Relocate LOCALEDIR value.
6902 * msgfmt.c: Include relocatable.h.
6903 (main): Relocate LOCALEDIR value.
6904 * msggrep.c: Include relocatable.h.
6905 (main): Relocate LOCALEDIR value.
6906 * msginit.c: Include relocatable.h.
6907 (main): Relocate LOCALEDIR value.
6908 (project_id, project_id_version, get_user_email): Relocate LIBDIR
6910 (language_team_address): Relocate LIBDIR and PROJECTSDIR values.
6911 * msgmerge.c: Include relocatable.h.
6912 (main): Relocate LOCALEDIR value.
6913 * msgunfmt.c: Include relocatable.h.
6914 (main): Relocate LOCALEDIR value.
6915 * msguniq.c: Include relocatable.h.
6916 (main): Relocate LOCALEDIR value.
6917 * xgettext.c: Include relocatable.h.
6918 (main): Relocate LOCALEDIR value.
6919 * read-java.c: Include relocatable.h.
6920 (msgdomain_read_java): Relocate GETTEXTJEXEDIR value.
6921 * read-tcl.c: Include relocatable.h.
6922 (msgdomain_read_tcl): Relocate GETTEXTDATADIR value.
6923 * hostname.c: Include relocatable.h.
6924 (main): Relocate LOCALEDIR value. Update copyright year.
6925 * urlget.c: Include relocatable.h.
6926 (main): Relocate LOCALEDIR value. Update copyright year.
6927 (fetch): Relocate GETTEXTJEXEDIR value.
6928 * user-email.in: Relocate $libdir.
6929 * Makefile.am (aliaspath): New variable.
6930 (DEFS): Define LOCALE_ALIAS_PATH.
6931 (msginit_SOURCES): Add .../localealias.c.
6932 (msginit_LDADD): Remove .../localealias.lo.
6933 (msgcmp_CFLAGS, msgfmt_CFLAGS, msgmerge_CFLAGS, msgunfmt_CFLAGS,
6934 xgettext_CFLAGS, msgattrib_CFLAGS, msgcat_CFLAGS, msgcomm_CFLAGS,
6935 msgconv_CFLAGS, msgen_CFLAGS, msgexec_CFLAGS, msgfilter_CFLAGS,
6936 msggrep_CFLAGS, msginit_CFLAGS, msguniq_CFLAGS, hostname_CFLAGS,
6937 urlget_CFLAGS): New variables.
6938 (msgcmp_LDFLAGS, msgfmt_LDFLAGS, msgmerge_LDFLAGS, msgunfmt_LDFLAGS,
6939 xgettext_LDFLAGS, msgattrib_LDFLAGS, msgcat_LDFLAGS, msgcomm_LDFLAGS,
6940 msgconv_LDFLAGS, msgen_LDFLAGS, msgexec_LDFLAGS, msgfilter_LDFLAGS,
6941 msggrep_LDFLAGS, msginit_LDFLAGS, msguniq_LDFLAGS, hostname_LDFLAGS,
6942 urlget_LDFLAGS): New variables.
6943 (install-exec-java-yes): Don't ignore INSTALL_PROGRAM_ENV.
6944 (RELOCATABLE_LIBRARY_PATH, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR,
6945 RELOCATABLE_CONFIG_H_DIR): New variables.
6947 2003-03-13 Bruno Haible <bruno@clisp.org>
6949 * msggrep.c (main): On Solaris, prefer /usr/xpg4/bin/grep to
6950 /usr/bin/grep. Needed for Solaris 2.8 and 2.9.
6951 Reported by Sven Utcke <utcke@informatik.uni-hamburg.de>.
6953 2003-03-03 Bruno Haible <bruno@clisp.org>
6955 * msgen.c (usage): Don't say that the entries are marked fuzzy.
6956 Reported by Karl Eichwalder <ke@suse.de>.
6958 2003-02-23 Bruno Haible <bruno@clisp.org>
6960 Improve error messages for invalid format strings.
6961 * format-invalid.h: New file.
6962 * format.h (struct formatstring_parser): Add invalid_reason argument
6964 * format-awk.c: Include c-ctype.h, xerror.h, format-invalid.h.
6965 (format_parse): Add invalid_reason argument.
6966 * format-c.c: Include c-ctype.h, xerror.h, format-invalid.h.
6967 (INVALID_C99_MACRO): New macro.
6968 (format_parse): Add invalid_reason argument.
6969 (get_c99_format_directives): Update.
6970 * format-elisp.c: Include c-ctype.h, xerror.h, format-invalid.h.
6971 (format_parse): Add invalid_reason argument.
6972 * format-java.c: Include xerror.h, format-invalid.h.
6973 (message_format_parse, choice_format_parse, format_parse): Add
6974 invalid_reason argument.
6975 (choice_format_parse): Return false if a choice contains an empty
6977 * format-librep.c: Include c-ctype.h, xerror.h, format-invalid.h.
6978 (format_parse): Add invalid_reason argument.
6979 * format-lisp.c: Include xerror.h, format-invalid.h.
6980 (check_params, nocheck_params): Add directives, invalid_reason
6982 (parse_upto, format_parse): Add invalid_reason argument.
6983 * format-pascal.c: Include xerror.h, format-invalid.h.
6984 (format_parse): Add invalid_reason argument.
6985 * format-php.c: Include c-ctype.h, xerror.h, format-invalid.h.
6986 (format_parse): Add invalid_reason argument.
6987 * format-python.c: Include c-ctype.h, xerror.h, format-invalid.h.
6988 (INVALID_MIXES_NAMED_UNNAMED): New macro.
6989 (format_parse): Add invalid_reason argument.
6990 * format-tcl.c: Include c-ctype.h, xerror.h, format-invalid.h.
6991 (format_parse): Add invalid_reason argument.
6992 * format-ycp.c: Include c-ctype.h, xerror.h, format-invalid.h.
6993 (format_parse): Add invalid_reason argument.
6994 * msgfmt.c (check_pair): Output invalid_reason returned for msgstr.
6995 * msgmerge.c (msgfmt_check_pair_fails): Update.
6996 * xgettext.c (remember_a_message, remember_a_message_plural): Update.
6997 * Makefile.am (FORMAT_SOURCE): Add format-invalid.h.
6999 2003-02-22 Bruno Haible <bruno@clisp.org>
7001 * x-python.c (init_keywords): Add u*gettext variants and plural
7002 handling functions added in Python 2.3.
7004 2003-02-22 Bruno Haible <bruno@clisp.org>
7006 * Makefile.am (installdirs): Remove dependency, redundant with
7009 2003-02-20 Bruno Haible <bruno@clisp.org>
7011 * Makefile.am (libgettextpo_la_DEPENDENCIES): New variable.
7012 Reported by Jim Meyering <jim@meyering.net>.
7014 2003-02-19 Bruno Haible <bruno@clisp.org>
7016 * Makefile.am (xgettext_LDADD): Mention $(LIBUNINAME) before
7017 libgettextsrc.la, not after it. Needed avoid link error on OSF/1 4.0:
7018 libtool produces a link command line that contains "-lc" where a
7019 shared library was used, and on OSF/1 4.0 "-lc" must not be used
7020 before objects that use integer division.
7022 2003-02-18 Bruno Haible <bruno@clisp.org>
7024 * message.c (msgdomain_list_free): Uncomment this function.
7025 * Makefile.am (libgettextpo_la_LDFLAGS): Add ../lib/libgettextlib.la.
7026 Needed for Solaris 2.7.
7028 2003-02-16 Bruno Haible <bruno@clisp.org>
7030 * msgmerge.c (message_merge): Add support for Report-Msgid-Bugs-To
7032 * xgettext.c (msgid_bugs_address): New variable.
7033 (long_options): Add option --msgid-bugs-address.
7034 (main): Handle option --msgid-bugs-address.
7035 (usage): Document option --msgid-bugs-address.
7036 (construct_header): Add 'Report-Msgid-Bugs-To:' field. Warn if
7037 msgid_bugs_address is empty.
7039 2003-02-15 Bruno Haible <bruno@clisp.org>
7041 * user-email.in: Add support for GNOME evolution, OpenOffice and
7042 StarOffice with nonstandard installation directory.
7044 2003-02-15 Bruno Haible <bruno@clisp.org>
7046 * msgattrib.c (main): Update year in --version output.
7047 * msgcat.c (main): Likewise.
7048 * msgcmp.c (main): Likewise.
7049 * msgcomm.c (main): Likewise.
7050 * msgconv.c (main): Likewise.
7051 * msgen.c (main): Likewise.
7052 * msgexec.c (main): Likewise.
7053 * msgfilter.c (main): Likewise.
7054 * msgfmt.c (main): Likewise.
7055 * msgunfmt.c (main): Likewise.
7056 * msguniq.c (main): Likewise.
7057 * xgettext.c (main): Likewise.
7059 2003-02-12 Bruno Haible <bruno@clisp.org>
7062 * gettext.c: Remove file.
7063 * ngettext.c: Remove file.
7064 * Makefile.am (bin_PROGRAMS): Remove gettext, ngettext.
7065 (EXTRA_DIST): Add ChangeLog.0.
7066 (pkgdatadir): Define using 'gettext' instead of @PACKAGE@.
7067 (pkglibdir): Likewise.
7068 (INCLUDES): Refer to intl in gettext-runtime directory.
7069 (gettext_SOURCES, ngettext_SOURCES, gettext_LDADD, ngettext_LDADD):
7071 (install-exec-local, installdirs-local, uninstall-local,
7072 install-exec-java-yes, installdirs-java-yes, uninstall-java-yes): Use
7073 $(pkglibdir) instead of $(libdir)/$(PACKAGE).
7074 * plural.c: Update for changed directory structure.
7075 * user-email.in: Use 'gettext' instead of @PACKAGE@.
7078 See ChangeLog.0 for earlier changes.