1
2010-05-09 Bruno Haible <bruno@clisp.org>
3
* gettext-0.18 released.
5
2010-05-09 Bruno Haible <bruno@clisp.org>
7
* msgattrib.c (main): Update year in --version output.
8
* msgcat.c (main): Likewise.
9
* msgcmp.c (main): Likewise.
10
* msgcomm.c (main): Likewise.
11
* msgconv.c (main): Likewise.
12
* msgen.c (main): Likewise.
13
* msgexec.c (main): Likewise.
14
* msgfilter.c (main): Likewise.
15
* msgfmt.c (main): Likewise.
16
* msggrep.c (main): Likewise.
17
* msginit.c (main): Likewise.
18
* msgmerge.c (main): Likewise.
19
* msgunfmt.c (main): Likewise.
20
* msguniq.c (main): Likewise.
21
* xgettext.c (main): Likewise.
23
2010-04-25 Bruno Haible <bruno@clisp.org>
25
Update support of object-pascal-format strings.
26
* format-pascal.c: Update description of format strings.
27
(enum format_arg_type): Remove FAT_INTEGER64.
28
(format_parse): Accept an empty digit sequence before ':'. Treat 'd',
29
'u', 'x' the same way.
32
2010-04-05 Bruno Haible <bruno@clisp.org>
34
Interoperability with mono versions >= 2009-02-27.
35
* write-csharp.c (write_csharp_code): Emit a TableInitialized field.
36
Change ReadResources so that it may be called multiple times, even
38
Reported by Guido Flohr <guido@imperia.net>
40
2010-03-31 Guido Flohr <guido@imperia.net>
42
Improve how xgettext handles Perl syntax ambiguities.
43
* x-perl.c(enum token_type_ty): New enumeration items
44
token_type_number, token_type_object.
45
(struct token_ty): New field 'last_type'.
46
(token2string): Handle token_type_number, token_type_object.
47
(free_token): Likewise.
48
(prefer_division_over_regexp): Remove variable.
49
(extract_variable): Recognize token of type token_type_object.
50
(prefer_regexp_over_division): New function.
51
(last_token_type): Renamed from last_token.
52
(x_perl_prelex): Assign the token's last_type. Recognize token of type
53
token_type_number. Don't special-case "grep" and "split". Invoke
54
prefer_regexp_over_division for disambiguation.
55
(token_stack_dump): Handle token_type_number, token_type_object.
56
(x_perl_lex): Assign the token's last_type. Update last_token_type
58
(collect_message): Invoke prefer_regexp_over_division for
60
(extract_balanced): Don't set last_token_type here. Handle
61
token_type_number, token_type_object.
62
(extract_perl): Initialize last_token_type here.
63
Reported by Guillem Jover <guillem@debian.org> via Santiago Vila.
65
* x-perl.c (x_perl_prelex): Clarify interpolate_keywords arguments.
67
* x-perl.c (eaten_here): Renamed from here_eaten.
68
(phase1_getc, get_here_document, skip_pod, extract_perl): Update.
70
2010-03-13 Bruno Haible <bruno@clisp.org>
72
New options --color, --style for many programs.
73
* msgattrib.c: Include color.h.
74
(long_options): Add options --color, --style.
75
(main): Implement them.
76
(usage): Document them.
77
* msgcomm.c: Include color.h.
78
(long_options): Add options --color, --style.
79
(main): Implement them.
80
(usage): Document them.
81
* msgconv.c: Include color.h.
82
(long_options): Add options --color, --style.
83
(main): Implement them.
84
(usage): Document them.
85
* msgen.c: Include color.h.
86
(long_options): Add options --color, --style.
87
(main): Implement them.
88
(usage): Document them.
89
* msgfilter.c: Include color.h.
90
(long_options): Add options --color, --style.
91
(main): Implement them.
92
(usage): Document them.
93
* msggrep.c: Include color.h.
94
(long_options): Add options --color, --style.
95
(main): Implement them.
96
(usage): Document them.
97
* msginit.c: Include color.h.
98
(long_options): Add options --color, --style.
99
(main): Implement them.
100
(usage): Document them.
101
* msgmerge.c: Include color.h.
102
(long_options): Add options --color, --style.
103
(main): Implement them.
104
(usage): Document them.
105
* msgunfmt.c: Include color.h.
106
(long_options): Add options --color, --style.
107
(main): Implement them.
108
(usage): Document them.
109
* msguniq.c: Include color.h.
110
(long_options): Add options --color, --style.
111
(main): Implement them.
112
(usage): Document them.
113
* xgettext.c: Include color.h.
114
(long_options): Add options --color, --style.
115
(main): Implement them.
116
(usage): Document them.
117
Reported by Kalle Olavi Niemitalo <kon@iki.fi>
118
via Santiago Vila <sanvila@unex.es>.
120
2010-02-20 Bruno Haible <bruno@clisp.org>
122
* plural-table.c (plural_table): Add Bulgarian.
123
Reported by Roumen Petrov <transl@roumenpetrov.info>.
125
2010-02-20 Bruno Haible <bruno@clisp.org>
127
* plural-table.c (plural_table): Sort in the same order as
130
2010-02-17 Bruno Haible <bruno@clisp.org>
132
Fix error in conversion of large PO file (> 4000 msgs) to Java class.
133
* write-java.c: Include minmax.h.
134
(write_java1_init_statements, write_java2_init_statements): New
135
functions, extracted from write_java_code.
136
(write_java_code): If there are many messages, split the initialization
137
code into several static methods.
138
Reported by sasha <predator@savannah.gnu.org>.
140
2009-12-21 Bruno Haible <bruno@clisp.org>
142
* lang-table.c (language_table): Add Mapudungun, Lower Sorbian,
143
Upper Sorbian, Mohawk, Yakut, Southern Sami, Lule Sami, Inari Sami,
145
* msginit.c (catalogname_for_locale): Add Mapudungun, Lower Sorbian,
146
Upper Sorbian, Yakut, Inari Sami, Skolt Sami.
148
2009-12-12 Bruno Haible <bruno@clisp.org>
150
* *.h, *.c, *.y: Untabify.
152
2009-11-28 Bruno Haible <bruno@clisp.org>
154
* x-perl.c (extract_variable): Fix tp->type when returning at EOF.
155
Reported by Guido Flohr <guido@imperia.bg>.
157
2009-11-15 Bruno Haible <bruno@clisp.org>
159
* x-python.c: Update comments regarding PEP 0263.
161
2009-09-05 Bruno Haible <bruno@clisp.org>
163
* write-po.c (wrap): Remove unused initialization.
164
* x-glade.c (comment_handler): Likewise.
165
* xgettext.c (flag_context_list_table_insert): Add comment.
166
Found by clang's static analyzer.
168
2009-08-30 Bruno Haible <bruno@clisp.org>
170
Accommodate the Solaris iconv_open function, which cannot convert
171
directly between many pairs of encodings.
172
* msgl-iconv.h (convert_string_directly): Renamed from convert_string.
173
* msgl-iconv.c: Include xstriconveh.h.
174
(convert_string_directly): Renamed from convert_string.
175
(convert_string): New function.
176
(convert_string_list, convert_prev_msgid, convert_msgid,
177
iconvable_string_list, iconvable_prev_msgid, iconvable_msgid): Change
178
argument type to 'const iconveh_t *'.
179
(convert_msgstr, iconvable_string, iconvable_msgstr): Likewise. Invoke
180
xmem_cd_iconveh instead of xmem_cd_iconv.
181
(iconv_message_list_internal, is_message_list_iconvable): Invoke
182
iconveh_open, iconveh_close instead of iconv_open, iconv_close.
183
* xgettext.c (from_current_source_encoding): Update.
185
2009-08-16 Bruno Haible <bruno@clisp.org>
187
Reduce dependency on project-id heuristic.
188
* msginit.c (project_id): Add header argument. Return first part of
189
Project-Id-Version field if present.
190
(fill_header): Update.
192
2009-08-13 Bruno Haible <bruno@clisp.org>
194
* msgexec.c: Include msgl-charset.h.
195
(main): Invoke compare_po_locale_charsets.
196
(process_string): Add comment.
197
* msgfilter.c (process_message): Likewise.
199
2009-08-10 Bruno Haible <bruno@clisp.org>
202
* msgfilter.c (sub_argv): Change type to 'const char **'.
205
2009-08-10 Bruno Haible <bruno@clisp.org>
207
Use type 'ucs4_t' more often. Avoids gcc warnings on Cygwin.
208
* po-lex.c (struct mbchar): Change type of 'uc'.
210
* read-properties.c (read_escaped_string): Change type of local
212
* read-stringtable.c (phase2_getc): Likewise.
213
* write-properties.c (conv_to_java, write_escaped_string): Change type
214
of local variables 'uc', 'uc1', 'uc2'.
215
* write-java.c (string_hashcode, write_java_string): Likewise.
216
* write-csharp.c (construct_class_name, write_csharp_string): Change
217
type of local variable 'uc'.
218
* write-tcl.c (write_tcl_string): Likewise.
219
* write-qt.c (conv_to_iso_8859_1, conv_to_utf16): Likewise.
220
* x-python.c (phase2_getc, mixed_string_buffer_append): Likewise.
221
(mixed_string_buffer_append_unicode): Change argument type to 'ucs4_t'.
222
* x-java.c (string_buffer_append): Change type of local variable 'uc'.
223
(string_buffer_append_unicode): Change argument type to 'ucs4_t'.
224
* x-csharp.c (phase2_getc): Change type of local variable 'uc'.
226
2009-08-04 Bruno Haible <bruno@clisp.org>
228
Port msgfilter to Woe32 platforms.
229
* msgfilter.c: Don't include errno.h, fcntl.h, io.h, sys/select.h,
230
pipe.h, wait-process.h. Include pipe-filter.h instead.
231
(HAVE_SELECT): Remove undefine.
232
(nonintr_close, nonintr_read, nonintr_write, nonintr_select): Remove
234
(O_NONBLOCK): Remove fallback.
235
(IS_EAGAIN): Remove macro.
236
(struct locals): New type.
237
(prepare_write, done_write, prepare_read, done_read): New functions.
238
(generic_filter): Implement using pipe_filter_ii_execute.
240
2009-07-27 Часлав Илић (Chusslove Illich) <caslav.ilic@gmx.net>
242
Extend recode-sr-latin to also transform letters with accents.
243
* filter-sr-latin.c (table): Add entries for letters with accents.
244
(IS_UPPERCASE_CYRILLIC): Recognize also U+04E2, U+04EE.
245
(serbian_to_latin): Update.
247
2009-06-06 Bruno Haible <bruno@clisp.org>
249
* x-perl.c (x_perl_prelex): Recognize the perl 5.10 operator '//'.
250
Reported by Kevin Ryde <user42@zip.com.au>.
252
2009-05-29 Bruno Haible <bruno@clisp.org>
254
Improve msgfmt error message about format directive mismatches
256
* format.h (struct formatstring_parser): Add pretty_msgid argument to
258
* format-awk.c (format_check): Add pretty_msgid argument.
259
* format-boost.c (format_check): Likewise.
260
* format-c.c (format_check): Likewise.
261
* format-csharp.c (format_check): Likewise.
262
* format-elisp.c (format_check): Likewise.
263
* format-gcc-internal.c (format_check): Likewise.
264
* format-gfc-internal.c (format_check): Likewise.
265
* format-java.c (format_check): Likewise.
266
* format-kde.c (format_check): Likewise.
267
* format-librep.c (format_check): Likewise.
268
* format-lisp.c (format_check): Likewise.
269
* format-pascal.c (format_check): Likewise.
270
* format-perl-brace.c (format_check): Likewise.
271
* format-perl.c (format_check): Likewise.
272
* format-php.c (format_check): Likewise.
273
* format-python.c (format_check): Likewise.
274
* format-qt.c (format_check): Likewise.
275
* format-qt-plural.c (format_check): Likewise.
276
* format-scheme.c (format_check): Likewise.
277
* format-sh.c (format_check): Likewise.
278
* format-tcl.c (format_check): Likewise.
279
* format-ycp.c (format_check): Likewise.
280
* format.c (check_msgid_msgstr_format_i): Pass either "msgid" or
281
"msgid_plural" as pretty_msgid argument.
283
2009-05-23 Bruno Haible <bruno@clisp.org>
285
* Makefile.am (libgettextsrc_la_LINK, msgattrib_LINK, msgcat_LINK,
286
msgcomm_LINK, msgconv_LINK, msgen_LINK, msgfilter_LINK, msggrep_LINK,
287
msgmerge_LINK, msguniq_LINK, xgettext_LINK): Add $(AM_V_lt) flag.
289
2009-05-16 Bruno Haible <bruno@clisp.org>
291
Extract comments meant for translators from Glade input files.
292
* xgettext.h (remember_a_message): Add 'extracted_comment' argument.
293
* xgettext.c (remember_a_message): Likewise.
294
(arglist_parser_done): Update.
295
* x-glade.c (struct element_state): Add field 'extracted_comment'.
296
(start_element_handler): Fill it.
297
(end_element_handler): Pass it to 'remember_a_message', free it.
298
* x-awk.c (extract_parenthesized): Update.
299
* x-c.c (extract_parenthesized): Update.
300
* x-csharp.c (extract_parenthesized): Update.
301
* x-elisp.c (read_object): Update.
302
* x-java.c (extract_parenthesized): Update.
303
* x-librep.c (read_object): Update.
304
* x-lisp.c (read_object): Update.
305
* x-perl.c (extract_variable, interpolate_keywords, extract_balanced):
307
* x-php.c (extract_balanced): Update.
308
* x-python.c (extract_balanced): Update.
309
* x-rst.c (extract_rst): Update.
310
* x-scheme.c (read_object): Update.
311
* x-sh.c (read_word, read_command): Update.
312
* x-smalltalk.c (extract_smalltalk): Update.
313
* x-tcl.c (read_command): Update.
314
* x-ycp.c (extract_parenthesized): Update.
315
Reported by <sandro.bonazzola@gmail.com>
316
at <https://savannah.gnu.org/bugs/?26570>.
318
2009-03-29 Bruno Haible <bruno@clisp.org>
320
* message.h (format_type): New enum value 'format_gfc_internal'.
321
(NFORMATS): Increment.
322
* message.c (format_language): Add format_gfc_internal entry.
323
(format_language_pretty): Likewise.
324
* format.h (formatstring_gfc_internal): New declaration.
325
* format-gfc-internal.c: New file.
326
* format.c (formatstring_parsers): Add formatstring_gfc_internal.
327
* x-c.h (SCANNERS_C): In language GCC-source, also keep track of
328
gfc-internal-format format strings.
329
* x-c.c (init_flag_table_gcc_internal): Also register flags for
331
* xgettext.c (xgettext_record_flag): Store gfc-internal-format flags in
332
flag_table_gcc_internal.
333
* Makefile.am (FORMAT_SOURCE): Add format-gfc-internal.c.
335
Reported by Göran Uddeborg <goeran@uddeborg.se>.
337
2009-01-27 Bruno Haible <bruno@clisp.org>
339
* message.h (format_type): New enum value 'format_qt_plural'.
340
(NFORMATS): Increment.
341
* message.c (format_language): Add format_qt_plural entry.
342
(format_language_pretty): Likewise.
343
* format.h (formatstring_qt_plural): New declaration.
344
* format-qt-plural.c: New file.
345
* format.c (formatstring_parsers): Add formatstring_qt_plural.
346
* xgettext.h (struct flag_context_ty): Add fields is_format3,
348
* xgettext.c (struct extractor_ty): Add field formatstring_parser3.
349
(inherited_context, flag_context_list_table_insert): Handle the new
350
flag_context_ty fields.
351
(xgettext_record_flag): Handle format_qt_plural.
352
(current_formatstring_parser3): New variable.
353
(extract_from_file): Initialize it.
354
(set_format_flags_from_context): Handle the new flag_context_ty fields.
355
(remember_a_message, remember_a_message_plural): Handle
356
current_formatstring_parser3. Avoid adding a c-format flag to a message
357
already flagged as qt-plural-format.
358
(arglist_parser_remember): Allow argnum1 and argnum2 in the call shape
360
(arglist_parser_done): Add special recognition of qt-plural-format
362
(language_to_extractor): Set the formatstring_parser3 in the result.
363
* Makefile.am (FORMAT_SOURCE): Add format-qt-plural.c.
366
2009-01-27 Bruno Haible <bruno@clisp.org>
368
* plural-table.c (plural_table): Put Turkish under nplurals=2.
369
Reported by Sertaç Ö. Yıldız <sertacyildiz@gmail.com>.
371
2009-01-26 Bruno Haible <bruno@clisp.org>
373
* msgattrib.c (main): Update year in --version output.
374
* msgcat.c (main): Likewise.
375
* msgcmp.c (main): Likewise.
376
* msgcomm.c (main): Likewise.
377
* msgconv.c (main): Likewise.
378
* msgen.c (main): Likewise.
379
* msgexec.c (main): Likewise.
380
* msgfilter.c (main): Likewise.
381
* msgfmt.c (main): Likewise.
382
* msggrep.c (main): Likewise.
383
* msginit.c (main): Likewise.
384
* msgmerge.c (main): Likewise.
385
* msgunfmt.c (main): Likewise.
386
* msguniq.c (main): Likewise.
387
* xgettext.c (main): Likewise.
388
* urlget.c (main): Likewise.
390
2009-01-25 Bruno Haible <bruno@clisp.org>
392
Fix bug introduced on 2005-10-01.
393
* msgl-charset.c (compare_po_locale_charsets): Fix recognition of
396
2009-01-25 Bruno Haible <bruno@clisp.org>
398
Fix bug introduced on 2008-10-04.
399
* read-catalog-abstract.c (po_parse_comment_special): Initialize
401
Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
403
2009-01-18 Bruno Haible <bruno@clisp.org>
405
* msgfmt.c: Include str-list.h.
406
(main): When --statistics and --verbose are both specified, output the
407
input file name in front of the statistics line.
408
Suggested by Vincent Lefevre <vincent@vinc17.org>.
410
2009-01-18 Bruno Haible <bruno@clisp.org>
412
Allow multiple levels of verbosity in 'msgfmt'.
413
* msgfmt.h (verbose): Change from 'bool' to 'int'.
414
* msgfmt.c (verbose): Likewise.
415
(main): Increment 'verbose' for each --verbose option.
416
* write-java.c (msgdomain_write_java): Update.
417
* write-csharp.c (msgdomain_write_csharp): Update.
418
* write-resources.c (msgdomain_write_csharp_resources): Update.
420
2009-01-18 Bruno Haible <bruno@clisp.org>
422
* str-list.h (string_list_join): Change the separator argument,
423
allowing an entire separator string.
424
* str-list.c (string_list_join): Likewise.
426
2009-01-18 Bruno Haible <bruno@clisp.org>
428
Fix a '(null)' in an error message. Bug present since gettext-0.16.
429
* read-catalog.h (DEFAULT_CATALOG_READER_TY): Add a file_name field.
430
* read-catalog.c (read_catalog_stream): Initialize it.
431
* x-po.c (extract): Likewise.
432
* msgfmt.c (read_catalog_file_msgfmt): Likewise.
433
(msgfmt_parse_debrief): Use the file_name field from the catalog reader
434
instead of gram_pos.file_name.
436
2009-01-17 Bruno Haible <bruno@clisp.org>
438
Update after gnulib changed.
439
* Makefile.am (RELOCATABLE_STRIP): New variable.
441
2008-12-07 Bruno Haible <bruno@clisp.org>
443
* write-po.c (message_print_comment_filepos): Use a 'const' pointer
445
* write-stringtable.c (write_message): Likewise.
447
2008-12-07 Bruno Haible <bruno@clisp.org>
449
Avoid gcc -Wredundant-decls warnings.
450
* x-awk.c: Don't include the specification header file twice.
452
* x-csharp.c: Likewise.
453
* x-elisp.c: Likewise.
454
* x-glade.c: Likewise.
455
* x-java.c: Likewise.
456
* x-librep.c: Likewise.
457
* x-lisp.c: Likewise.
458
* x-perl.c: Likewise.
461
* x-python.c: Likewise.
463
* x-scheme.c: Likewise.
465
* x-smalltalk.c: Likewise.
469
2008-11-14 Bruno Haible <bruno@clisp.org>
471
* msgfilter.c: Include xvasprintf.h, xsetenv.h.
472
(process_message): Set the environment variables MSGFILTER_MSGCTXT,
473
MSGFILTER_MSGID, MSGFILTER_LOCATION.
475
2008-10-28 Bruno Haible <bruno@clisp.org>
477
* msgmerge.c (match_domain): Remove space between '#' and 'pragma' for
479
Reported by Lamarque Eric <eric.lamarque@free.fr>.
481
2008-10-04 Bruno Haible <bruno@clisp.org>
483
* plural-distrib.h (struct plural_distribution): New field 'histogram'.
484
* format.h (check_msgid_msgstr_format_i, check_msgid_msgstr_format):
486
* format.c (check_msgid_msgstr_format_i): Add range argument. Set
487
strict_checking to false if, due to the range, the plural forms applies
488
to only one value of n.
489
(check_msgid_msgstr_format): Add range argument.
490
* msgl-check.c (plural_expression_histogram): New function.
491
(check_plural_eval, check_plural): Update.
492
(check_pair): Pass the range to check_msgid_msgstr_format.
493
(check_message_list): Update.
494
* msgmerge.c (message_merge): Pass the range to
495
check_msgid_msgstr_format_i.
496
Reported by Anatoly Techtonik <techtonik@gmail.com>
497
via <https://savannah.gnu.org/bugs/?24433>.
499
2008-10-04 Bruno Haible <bruno@clisp.org>
501
* message.h (struct argument_range): New type.
502
(has_range_p): New macro.
503
(struct message_ty): Add field 'range'.
504
* message.c (message_alloc): Initialize the 'range' field.
505
(message_copy): Copy the 'range' field.
506
* read-catalog-abstract.h (po_parse_comment_special): Add 'rangep'
508
* read-catalog-abstract.c: Include <limits.h>.
509
(po_parse_comment_special): Add 'rangep' argument. Parse the range
511
* read-catalog.h (DEFAULT_CATALOG_READER_TY): Add 'range' field.
512
* read-catalog.c (default_constructor): Initialize the 'range' field.
513
(default_copy_comment_state): Copy the 'range' field into the new
515
(default_reset_comment_state): Clear the 'range' field.
516
(default_comment_special): Update.
517
* write-po.h (make_range_description_string): New declaration.
518
* write-po.c (make_range_description_string): New function.
519
(message_print_comment_flags): Also print the range.
520
* write-stringtable.c (write_message): Likewise.
521
* msgl-cat.c: Include <limits.h>.
522
(catenate_msgdomain_list): Fill in the range of the resulting messages.
523
* msgl-equal.c (message_equal): Compare also the ranges.
524
* msgmerge.c (message_merge): Fill in the range of the resulting
525
message. Set it fuzzy if a range was introduced or extended.
526
* xgettext.c (remember_a_message): Set the range of the new message.
528
2008-10-03 Bruno Haible <bruno@clisp.org>
530
* plural-distrib.h: New file.
531
* format.h: Include plural-distrib.h.
532
(check_msgid_msgstr_format_i, check_msgid_msgstr_format): Replace
533
plural_distribution, plural_distribution_length arguments with a single
534
distribution argument.
535
* format.c (check_msgid_msgstr_format_i, check_msgid_msgstr_format):
537
* msgl-check.h: Include plural-distrib.h.
538
(check_plural_eval, check_message): Replace plural_distribution,
539
plural_distribution_length arguments with a single distribution
541
* msgl-check.c (check_plural_eval): Likewise. Free array in case of
543
(check_plural): Replace plural_distribution, plural_distribution_length
544
arguments with a single distribution argument. Don't store a
545
distribution result when there are errors.
546
(check_pair, check_message): Replace plural_distribution,
547
plural_distribution_length arguments with a single distribution
549
(check_message_list): Update.
550
* msgmerge.c (message_merge: Replace plural_distribution,
551
plural_distribution_length arguments with a single distribution
553
(match_domain): Update.
554
* Makefile.am (noinst_HEADERS): Add plural-distrib.h.
555
* FILES: Mention plural-distrib.h.
557
2008-09-28 Bruno Haible <bruno@clisp.org>
559
* write-catalog.c (msgdomain_list_print): Open the output stream in
560
binary mode, for consistency with the term_styled_ostream or fd_stream
563
2008-09-28 Bruno Haible <bruno@clisp.org>
565
* Makefile.am (msg*_DEPENDENCIES, xgettext_DEPENDENCIES,
566
recode_sr_latin_DEPENDENCIES): Add $(WOE32_LDADD).
568
2008-09-28 Bruno Haible <bruno@clisp.org>
570
* msgexec.c (process_string): Don't die from SIGPIPE if the subprocess
571
does not want our input.
572
Reported by Rainer Tammer <tammer@tammer.net>.
574
2008-09-28 Bruno Haible <bruno@clisp.org>
576
* Makefile.am (msgcmp_LDADD): Add MSGMERGE_LIBM.
577
Reported by Rainer Tammer <tammer@tammer.net>.
579
2008-09-27 Bruno Haible <bruno@clisp.org>
581
* lang-table.c (language_table): Add Asturian, Crimean Tatar, Friulian,
583
* msginit.c (catalogname_for_locale): Add Asturian, Friulian,
586
2008-09-26 Bruno Haible <bruno@clisp.org>
588
* write-catalog.c (cmp_by_msgid, cmp_by_filepos): Compare the msgctxt
589
fields if the msgid fields are the same.
590
Reported by Rainer Tammer <tammer@tammer.net>.
592
2008-09-15 Bruno Haible <bruno@clisp.org>
594
* Makefile.am (msg*_DEPENDENCIES, xgettext_DEPENDENCIES,
595
recode_sr_latin_DEPENDENCIES): New variables.
597
2008-09-15 Bruno Haible <bruno@clisp.org>
599
* msgl-fsearch.h: Include stdbool.h.
600
(message_fuzzy_index_search): Add 'heuristic' argument.
601
* msgl-fsearch.c (message_fuzzy_index_search): Likewise. If !heuristic,
602
consider all messages.
603
* msgmerge.c (struct definitions_ty): Add fields 'curr_findex',
604
'curr_findex_init_lock'.
605
(definitions_init): Initialize them.
606
(definitions_set_current_list): Clear the previous curr_findex.
607
(definitions_init_curr_findex): New function.
608
(definitions_search_fuzzy): Do fuzzy matching by calling
609
message_fuzzy_index_search on a hashed index, rather than through
610
message_list_search_fuzzy.
611
(definitions_destroy): Update.
612
(merge): Determine the definitions' canonical encoding.
613
* msgcmp.c: Include xmalloca.h, po-charset.h, msgl-fsearch.h.
614
(match_domain): Add defmlp_findex, def_canon_charset arguments. Do
615
fuzzy matching by calling message_fuzzy_index_search on a hashed
616
index, rather than through message_list_search_fuzzy.
617
(compare): Determine the definitions' canonical encoding. Prepare room
618
for a lazily allocated hashed index.
619
* Makefile.am (msgcmp_SOURCES): Add msgl-fsearch.c.
621
2008-09-15 Bruno Haible <bruno@clisp.org>
623
* msgcmp.c (use_fuzzy_matching): New variable.
624
(long_options): Add option -N/--no-fuzzy-matching.
625
(main, match_domain): Implement it.
626
(usage): Document it.
628
2008-09-14 Bruno Haible <bruno@clisp.org>
630
* msgl-fsearch.h (message_fuzzy_index_search): Add 'lower_bound'
632
* msgl-fsearch.c (message_fuzzy_index_search): Likewise.
633
* msgmerge.c (definitions_search_fuzzy): Use the result of the fuzzy
634
search in the current list as a lower bound for the fuzzy search in the
637
2008-09-14 Bruno Haible <bruno@clisp.org>
639
* message.h (message_list_search_fuzzy, FUZZY_THRESHOLD): Clarify
642
* msgmerge.c (struct definitions_ty): Rename field 'findex' to
643
'comp_findex', and 'findex_init_lock' to 'comp_findex_init_lock'.
644
(definitions_init): Update.
645
(definitions_init_comp_findex): Renamed from definitions_init_findex.
647
(definitions_search_fuzzy, definitions_destroy): Update.
649
* msgmerge.c (definitions_current_list, definitions_set_current_list):
652
2008-09-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
653
Bruno Haible <bruno@clisp.org>
655
* message.h (fuzzy_search_goal_function): Add 'lower_bound' argument.
656
* message.c (fuzzy_search_goal_function): Likewise. Use fstrcmp_bounded
658
(message_list_search_fuzzy_inner): Pass fuzzy_search_goal_function the
659
best weight known so far, to shortcut computations.
660
* msgl-fsearch.c (message_fuzzy_index_search): Likewise.
661
* msgmerge.c (definitions_search_fuzzy): Update
662
fuzzy_search_goal_function calls.
664
2008-09-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
665
Bruno Haible <bruno@clisp.org>
667
* xgettext.c: Include concat-filename.h.
668
(main, xgettext_open): Use xconcatenated_filename instead of
669
concatenated_filename.
671
2008-09-01 Bruno Haible <bruno@clisp.org>
673
* color.c: Include concat-filename.h.
674
(style_file_lookup, style_file_prepare): Use xconcatenated_filename
675
instead of concatenated_filename.
676
* msginit.c: Include concat-filename.h instead of filename.h.
677
(project_id, project_id_version): Use xconcatenated_filename instead of
678
concatenated_filename.
679
* open-catalog.c: Include concat-filename.h.
680
(try_open_catalog_file): Use xconcatenated_filename instead of
681
concatenated_filename.
682
* read-csharp.c: Include concat-filename.h instead of filename.h.
683
(msgdomain_read_csharp): Use xconcatenated_filename instead of
684
concatenated_filename.
685
* read-resources.c: Include concat-filename.h instead of filename.h.
686
(read_resources_file): Use xconcatenated_filename instead of
687
concatenated_filename.
688
* read-tcl.c: Include concat-filename.h instead of filename.h.
689
(msgdomain_read_tcl): Use xconcatenated_filename instead of
690
concatenated_filename.
691
* write-resources.c: Include concat-filename.h instead of filename.h.
692
(msgdomain_write_csharp_resources): Use xconcatenated_filename instead of
693
concatenated_filename.
694
* write-csharp.c: Include concat-filename.h instead of filename.h.
695
(msgdomain_write_csharp): Use xconcatenated_filename instead of
696
concatenated_filename.
697
* write-java.c: Include concat-filename.h instead of filename.h.
698
(msgdomain_write_java): Use xconcatenated_filename instead of
699
concatenated_filename.
700
* write-tcl.c: Include concat-filename.h instead of filename.h.
701
(msgdomain_write_tcl: Use xconcatenated_filename instead of
702
concatenated_filename.
704
2008-08-31 Bruno Haible <bruno@clisp.org>
706
* msgexec.c: Include <signal.h>.
707
(main): Block SIGPIPE for the duration of the processing.
709
2008-08-23 Bruno Haible <bruno@clisp.org>
711
Fix behaviour of "msgmerge --update" when sorting is requested and
712
obsolete messages are present.
713
* write-catalog.h (struct catalog_output_format): New field
714
'sorts_obsoletes_to_end'.
715
* write-po.c (output_format_po): Initialize it to true.
716
* write-properties.c (output_format_properties): Initialize it to false.
717
* write-stringtable.c (output_format_stringtable): Likewise.
718
* msgmerge.c (msgdomain_list_stablesort_by_obsolete): New function.
719
(main): Before testing whether the result is the same as the old
720
contents, sort the result using msgdomain_list_stablesort_by_obsolete.
721
Reported by Vincent Danjean <vdanjean.abo@free.fr>
722
via <http://savannah.gnu.org/bugs/?24123>.
724
2008-08-16 Bruno Haible <bruno@clisp.org>
726
* x-python.c (enum token_type_ty): New values token_type_lbracket,
728
(phase5_get): Recognize also token_type_lbracket, token_type_rbracket.
729
(extract_balanced): Renamed from extract_parenthesized. Add 'delim'
730
argument. Handle token_type_lbracket and token_type_rbracket.
731
(extract_python): Update.
732
Reported by Claude Paroz <claude@2xlibre.net>
733
via <http://savannah.gnu.org/bugs/?23824>.
735
2008-08-16 Bruno Haible <bruno@clisp.org>
737
* x-php.c (extract_balanced): Fix small bug in 2007-03-17 commit.
739
2008-08-15 Bruno Haible <bruno@clisp.org>
741
* format-python.c (format_parse): For %.0s and %.0r, set the type to
743
(format_check): When strict equality is not desired, compare FORMAT_ANY
744
as matching any type.
745
Reported by Alexander Dupuy <alex.dupuy@mac.com> in
746
<http://savannah.gnu.org/bugs/?24025>.
748
2008-08-14 Bruno Haible <bruno@clisp.org>
750
* format-python.c (format_parse): For '%', set the type to FAT_NONE.
752
2008-08-14 Bruno Haible <bruno@clisp.org>
754
* format-python.c (format_check): Require the same number of unnamed
755
arguments also when !equality.
756
Reported by Alexander Dupuy <alex.dupuy@mac.com> in
757
<http://savannah.gnu.org/bugs/?24025>.
759
2008-08-14 Bruno Haible <bruno@clisp.org>
761
* msgmerge.c: Include "glthread/lock.h" instead of "lock.h".
763
2008-08-03 Bruno Haible <bruno@clisp.org>
765
* x-python.c (mixed_string_buffer_append): Replace a lone high
766
surrogate with U+FFFD.
767
Reported by Yann <asterix@lagaule.org>
768
via Santiago Vila <sanvila@unex.es>.
770
2008-07-19 Bruno Haible <bruno@clisp.org>
772
* gnu/gettext/GetURL.java: Don't output anything to standard error.
773
Instead, set exit code to indicate failure reason.
774
* urlget.c (verbose): New variable.
775
(long_options): Add --quiet, --silent option.
776
(main): Implement --quiet, --silent option.
777
(usage): Document --quiet, --silent option.
778
(java_exitcode): New variable.
779
(execute_it): Set it. Return false also when the exit code is 2.
780
(fetch): Implement verbosity to standard error here.
781
Reported by 宋浩 <baritono.tux@gmail.com>.
783
2008-06-10 Bruno Haible <bruno@clisp.org>
785
* msgexec.c (process_string): Update for changed signature of
787
* msgfilter.c (generic_filter): Likewise.
788
* msginit.c (project_id, project_id_version, get_user_email,
789
language_team_address): Likewise.
790
* read-csharp.c (execute_and_read_po_output): Likewise.
791
* read-java.c (execute_and_read_po_output): Likewise.
792
* read-resources.c (execute_and_read_po_output): Likewise.
793
* read-tcl.c (msgdomain_read_tcl): Likewise.
794
* write-resources.c (execute_writing_input): Likewise.
795
* urlget.c (execute_it, fetch): Update for changed signature of
798
2008-05-26 Bruno Haible <bruno@clisp.org>
800
* msginit.c (get_field, put_field): Recognize a field also if there is
801
no space after the ':'.
802
Reported by Nacho <nacho.resa@gmail.com>.
804
2008-05-16 Bruno Haible <bruno@clisp.org>
806
* msgl-iconv.c (iconvable_prev_msgid): Fix typo.
807
Reported by Karl Eichwalder <ke@novell.com>
808
via Philipp Thomas <pth@novell.com>
809
at <https://bugzilla.novell.com/show_bug.cgi?id=391372>.
811
2008-05-10 Bruno Haible <bruno@clisp.org>
813
* write-po.c: Include unilbrk.h instead of linebreak.h.
815
* po-lex.c: Don't include linebreak.h.
817
2008-04-25 Bruno Haible <bruno@clisp.org>
819
* lang-table.c (language_table): Add Beja. Remove Adangme, Banda,
820
Batak. Update Scottish Gaelic, Central Khmer, Romansh.
821
* msginit.c (catalogname_for_locale: Add Beja. Remove Banda, Batak.
822
Update Scottish Gaelic, Central Khmer, Romansh.
824
2008-04-20 Bruno Haible <bruno@clisp.org>
826
Improve error message.
827
* xgettext.h (lexical_context_ty): New type.
828
(non_ascii_error_message): New declaration.
829
(from_current_source_encoding): Add lcontext argument.
830
* xgettext.c (non_ascii_error_message): New function.
831
(from_current_source_encoding): Add lcontext argument. Use
832
non_ascii_error_message.
833
(CONVERT_STRING): Add lcontext argument.
834
(remember_a_message, remember_a_message_plural): Update.
835
* x-csharp.c (lexical_context): New variable.
836
(phase2_getc): Use non_ascii_error_message.
837
(comment_start, comment_line_end, phase6_get): Set lexical_context.
838
(extract_csharp): Initialize lexical_context.
839
* x-java.c (struct string_buffer): Add lcontext field.
840
(init_string_buffer): Add lcontext argument.
841
(string_buffer_flush_curr_buffer): Update from_current_source_encoding
843
(comment_start): Set lcontext.
844
(phase5_get): Pass lcontext argument.
845
* x-perl.c (get_here_document, phase2_getc,
846
extract_quotelike_pass1_utf8): Pass lcontext argument.
847
* x-python.c (lexical_context): New variable.
848
(phase2_getc): Use non_ascii_error_message.
849
(comment_start, comment_line_end, phase6_get): Set lexical_context.
850
(struct mixed_string_buffer): Add lcontext field.
851
(init_mixed_string_buffer): Add lcontext argument.
852
(mixed_string_buffer_flush_curr_buffer): Update
853
from_current_source_encoding call.
854
(phase5_get): Set lexical_context. Pass lcontext argument.
855
(extract_python): Initialize lexical_context.
856
Reported by Mark Weyer.
858
2008-04-20 Bruno Haible <bruno@clisp.org>
860
* xgettext.c (usage): Clarify single-letter options that take an
861
optional argument: -c, -k, -m, -M.
863
2008-04-16 Bruno Haible <bruno@clisp.org>
865
* msginit.c (catalogname_for_locale): Add entries for Maori, Uighur.
867
2008-02-20 Jakub Jelinek <jakub@redhat.com>
868
Bruno Haible <bruno@clisp.org>
870
* format-gcc-internal.c: Update for GCC 4.3.
871
(FAT_TREE_STATEMENT): New enum item.
872
(format_parse): Recognize %K.
873
(format_print): Update.
875
2008-02-04 Bruno Haible <bruno@clisp.org>
877
* msgmerge.c (match_domain): Remove the prev_msgid fields also from
878
the untranslated messages.
879
Reported by Yukiko Bando <ybando@k6.dion.ne.jp> via
880
Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>.
882
2008-02-04 Bruno Haible <bruno@clisp.org>
884
* msgmerge.c (message_merge): Store the prev_msgid field also if the
885
resulting message is not fuzzy: it might be marked as fuzzy later.
886
(match_domain): Remove the prev_msgid fields from the non-fuzzy
889
2008-01-29 Bruno Haible <bruno@clisp.org>
891
* write-po.c (wrap): Change the severity of the "should not contain
892
escape sequence" message from PO_SEVERITY_ERROR to PO_SEVERITY_WARNING.
893
Reported by Kerb <ykerb2@free.fr>.
895
2008-01-13 Bruno Haible <bruno@clisp.org>
897
* Makefile.am (noinst_headers): Add msgl-header.h.
899
2007-12-24 Bruno Haible <bruno@clisp.org>
901
Introduce 'Language' header field.
902
* xgettext.c (construct_header): Add an empty 'Language' field.
903
* msginit.c (language_value): New function.
904
(fields): Add 'Language'.
905
* msgmerge.c: Include lang-table.h.
906
(catalogname): New variable.
907
(long_options): Add --lang option.
908
(main): Handle --lang option.
909
(usage): Document --lang option.
910
(message_merge): Set the 'Language' field if --lang was specified or
911
if it is missing and can be inferred from the 'Language-Team' field.
912
* msgl-header.h: New file.
913
* msgl-header.c: New file.
914
* msgcat.c: Include msgl-header.h.
915
(long_options): Add --lang option.
916
(main): Handle --lang option.
917
(usage): Document --lang option.
918
* msgen.c: Include msgl-header.h.
919
(long_options): Add --lang option.
920
(main): Handle --lang option.
921
(usage): Document --lang option.
922
* msgl-check.c (plural_help): Look at the 'Language' field before
923
looking at the 'Language-Team' field.
924
(check_header_entry): Fix comparison with default value. When the
925
'Language' field is missing, signal a warning.
926
* Makefile.am (libgettextsrc_la_SOURCES): Add msgl-header.c.
927
(msgmerge_SOURCES): Add lang-table.c.
930
2007-12-22 Bruno Haible <bruno@clisp.org>
932
* write-po.c (wrap): Avoid breaking line in the middle of a format
934
Reported by Dwayne Bailey <dwayne@translate.org.za>.
936
2007-11-07 Jim Meyering <meyering@redhat.com>
937
Bruno Haible <bruno@clisp.org>
939
* write-catalog.c (msgdomain_list_print): Fix open() call.
941
2007-11-07 Bruno Haible <bruno@clisp.org>
943
* gettext-0.17 released.
945
2007-10-28 Bruno Haible <bruno@clisp.org>
947
* color.c (style_file_lookup): New function.
948
(style_file_prepare): Use it.
950
2007-10-21 Bruno Haible <bruno@clisp.org>
952
Normalize the leading space of every comment line during input, not
954
* read-catalog-abstract.c (po_callback_comment_dispatcher): Before
955
calling po_callback_comment or po_callback_comment_dot, drop the
957
* write-po.c (message_print_comment, message_print_comment_dot): Don't
958
remove the leading space of every comment line.
959
* write-stringtable.c (write_message): Likewise.
960
Suggested by Dwayne Bailey <dwayne@translate.org.za>.
962
2007-10-20 Bruno Haible <bruno@clisp.org>
964
* msgmerge.c (message_merge): Set the fuzzy flag if the msgid_plural
966
Suggested by Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>.
968
2007-10-20 Bruno Haible <bruno@clisp.org>
970
Make msgmerge's introduction of fuzzy markers more consistent with
971
msgfmt's --check-format.
972
* format.h (check_msgid_msgstr_format_i): New declaration.
973
* format.c (check_msgid_msgstr_format_i): New function, extracted from
974
check_msgid_msgstr_format.
975
(check_msgid_msgstr_format): Use it.
976
* msgl-check.h: Include plural-eval.h.
977
(check_plural_eval): New declaration.
978
* msgl-check.c (check_plural_eval): Add const to first parameter. Make
980
(check_plural): Update.
981
* msgmerge.c: Include plural-exp.h, msgl-check.h, po-xerror.h.
982
(msgfmt_check_pair_fails): Remove function.
983
(silent_error_logger, silent_xerror): New functions.
984
(message_merge): Add plural_distribution, plural_distribution_length
985
arguments. Call check_msgid_msgstr_format_i instead of
986
msgfmt_check_pair_fails.
987
(match_domain): Extract not only the plural count, but also the
988
plural expression from the header entry. Determine the plural
989
distribution from it. Pass it to message_merge.
990
Reported by Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>.
992
2007-10-20 Bruno Haible <bruno@clisp.org>
994
* msgl-check.c (check_plural): If there is no header entry, or if the
995
header entry does not contain plural= and nplurals=, return a plural
996
distribution corresponding to the Germanic plural.
998
2007-10-20 Bruno Haible <bruno@clisp.org>
1000
* format.h (check_msgid_msgstr_format): Add plural_distribution_length
1002
* format.c (check_msgid_msgstr_format): Likewise.
1003
* msgl-check.h (check_message): Likewise.
1004
* msgl-check.c (check_plural_eval, check_plural, check_pair,
1005
check_message): Likewise.
1006
(check_message_list): Update.
1008
2007-10-18 Bruno Haible <bruno@clisp.org>
1010
* plural-count.c (get_plural_count): Adapt to changed prototype of
1011
extract_plural_expression.
1012
* write-csharp.c (write_csharp_expression): Add const to parameter.
1013
(write_csharp_code): Adapt to changed prototype of
1014
extract_plural_expression.
1015
* write-java.c (write_java_expression): Add const to parameter.
1016
(write_java_code): Adapt to changed prototype of
1017
extract_plural_expression.
1019
2007-10-07 Bruno Haible <bruno@clisp.org>
1021
* hostname.c (main): In the --version output, say GPLv3+.
1022
* msgattrib.c (main): Likewise.
1023
* msgcat.c (main): Likewise.
1024
* msgcmp.c (main): Likewise.
1025
* msgcomm.c (main): Likewise.
1026
* msgconv.c (main): Likewise.
1027
* msgen.c (main): Likewise.
1028
* msgexec.c (main): Likewise.
1029
* msgfilter.c (main): Likewise.
1030
* msgfmt.c (main): Likewise.
1031
* msggrep.c (main): Likewise.
1032
* msginit.c (main): Likewise.
1033
* msgmerge.c (main): Likewise.
1034
* msgunfmt.c (main): Likewise.
1035
* msguniq.c (main): Likewise.
1036
* recode-sr-latin.c (main): Likewise.
1037
* urlget.c (main): Likewise.
1038
* xgettext.c (main): Likewise.
1040
2007-09-30 Bruno Haible <bruno@clisp.org>
1042
* xgettext.c (package_name, package_version): New variables.
1043
(long_options): Add --package-name, --package-version.
1044
(main): Handle options --package-name, --package-version.
1045
(usage): Document them.
1046
(construct_header): Use package_name if present.
1047
* msginit.c (project_id_version): Take a header argument. Return the
1048
old value if already present.
1051
2007-09-30 Bruno Haible <bruno@clisp.org>
1053
* message.h (format_type): New enum value 'format_kde'.
1054
(NFORMATS): Increment.
1055
* message.c (format_language): Add format_kde entry.
1056
(format_language_pretty): Likewise.
1057
* format.h (formatstring_kde): New declaration.
1058
* format-kde.c: New file.
1059
* format.c (formatstring_parsers): Add formatstring_kde.
1060
* x-c.c (init_flag_table_c): Also register flags for qt-format and
1062
* xgettext.c (flag_table_cxx_kde): New variable.
1063
(recognize_format_kde): New variable.
1064
(main): Handle --kde option.
1065
(usage): Document --kde option.
1066
(xgettext_record_flag): Also fill flag_table_cxx_kde.
1067
(remember_a_message, remember_a_message_plural): In the heuristics,
1068
don't mark a string as c-format that is already known to be a
1070
(language_to_extractor): Use a flag_table_cxx_kde that is different
1072
* Makefile.am (FORMAT_SOURCE): Add format-kde.c.
1075
2007-09-09 Bruno Haible <bruno@clisp.org>
1077
Add support for Qt 4 format strings.
1078
* format-qt.c (struct spec): Increase args_used field size to 100.
1080
(format_parse): Update for Qt 4 syntax. Remove error message when the
1081
same format argument is used more than once.
1082
(format_check): Add check: If the msgid is simple, the msgstr must be
1084
Reported by Chusslove Illich <caslav.ilic@gmx.net>.
1086
2007-09-02 Bruno Haible <bruno@clisp.org>
1088
Correct handling of different libexpat ABIs.
1089
* x-glade.c: Include <stdint.h>.
1090
(p_XML_GetCurrentLineNumber, p_XML_GetCurrentColumnNumber): New
1092
(is_XML_LARGE_SIZE_ABI, GetCurrentLineNumber, GetCurrentColumnNumber):
1094
(XML_GetCurrentLineNumber, XML_GetCurrentColumnNumber): Redefine.
1095
(XML_Expat_Version, XML_FeatureEnum, XML_Feature): New types.
1096
(p_XML_ExpatVersionInfo, p_XML_GetFeatureList): New variables.
1097
(p_XML_GetCurrentLineNumber, p_XML_GetCurrentColumnNumber): Change
1099
(XML_ExpatVersionInfo, XML_GetFeatureList): New macros.
1100
(XML_Size_ABI): New type.
1101
(get_XML_Size_ABI): New function.
1102
(XML_GetCurrentLineNumber, XML_GetCurrentColumnNumber): New functions.
1103
(load_libexpat): Try both version 2 and version 1. Initialize
1104
p_XML_ExpatVersionInfo, p_XML_GetFeatureList.
1106
2007-09-02 Bruno Haible <bruno@clisp.org>
1108
Implement msgctxt for C# ResourceManagers.
1109
* x-csharp.c (init_keywords): Also register GetParticularString and
1110
GetParticularPluralString.
1111
(init_flag_table_csharp): Update accordingly.
1112
* write-csharp.c: Include xmalloca.h.
1113
(write_csharp_msgid): New function.
1114
(write_csharp_code): Use it instead of write_csharp_string.
1115
(msgdomain_write_csharp): Remove error message if mlp has entries with
1117
* msgunfmt.cs (DumpResource.DumpMessage): Emit an msgctxt line
1118
if the message contain the context separator.
1120
2007-09-01 Bruno Haible <bruno@clisp.org>
1122
Implement msgctxt for Java ResourceBundles.
1123
* x-java.c (init_keywords): Also register pgettext and npgettext.
1124
(init_flag_table_java): Update accordingly.
1125
* write-java.c (msgid_hashcode): New function.
1126
(compute_hashsize, compute_table_items): Use it instead of
1128
(write_java_msgid): New function.
1129
(write_java_code): Use it instead of write_java_string.
1130
(msgdomain_write_java): Remove error message if mlp has entries with
1132
* gnu/gettext/DumpResource.java (dumpMessage): Emit an msgctxt line
1133
if the message contain the context separator.
1134
Suggested by Felix Berger.
1136
2007-09-01 Bruno Haible <bruno@clisp.org>
1138
* po-lex.c: Include uniwidth.h.
1140
2007-06-19 Bruno Haible <bruno@clisp.org>
1142
* x-c.c (phase8_get): Call free_token, so that the reference to
1143
tmp.comment gets dropped.
1145
2007-08-27 Bruno Haible <bruno@clisp.org>
1147
* x-python.c (phase7_getuc): Interpret octal and hexadecimal escapes
1148
as Unicode code points inside Unicode strings.
1149
Reported and patch by Jakub Wilk <ubanus@users.sf.net>.
1151
2007-08-23 Bruno Haible <bruno@clisp.org>
1153
* file-list.c: Don't include getline.h.
1154
* format-awk.c: Likewise.
1155
* format-boost.c: Likewise.
1156
* format-c.c: Likewise.
1157
* format-csharp.c: Likewise.
1158
* format-elisp.c: Likewise.
1159
* format-gcc-internal.c: Likewise.
1160
* format-java.c: Likewise.
1161
* format-librep.c: Likewise.
1162
* format-lisp.c: Likewise.
1163
* format-pascal.c: Likewise.
1164
* format-perl-brace.c: Likewise.
1165
* format-perl.c: Likewise.
1166
* format-php.c: Likewise.
1167
* format-python.c: Likewise.
1168
* format-qt.c: Likewise.
1169
* format-scheme.c: Likewise.
1170
* format-sh.c: Likewise.
1171
* format-tcl.c: Likewise.
1172
* format-ycp.c: Likewise.
1173
* msginit.c: Likewise.
1174
* x-perl.c: Likewise.
1176
2007-08-18 Bruno Haible <bruno@clisp.org>
1178
* write-csharp.c (msgdomain_write_csharp): Don't recommend to use
1179
--verbose if it is already in use.
1180
* write-java.c (msgdomain_write_java): Likewise.
1181
Reported by Karsten Kousgaard <karsten@f-kousgaard.dk>.
1183
2007-07-07 Bruno Haible <bruno@clisp.org>
1185
* Makefile.am (AM_CPPFLAGS): Remove reference to libuniname directory.
1186
(LIBUNINAME): Remove variable.
1187
(xgettext_LDADD): Update.
1189
2007-07-04 Bruno Haible <bruno@clisp.org>
1191
Recognize the PHP string concatenation operator.
1192
* x-php.c (enum token_type_ty): New elements token_type_dot,
1193
token_type_operator1, token_type_operator2.
1194
(struct token_ty): Add comment field.
1195
(free_token): Drop reference to comment field.
1196
(phase4_pushback, phase4_pushback_length): New variables.
1197
(phase4_get): Renamed from x_php_lex. Return last pushed-back token if
1198
available. Recognize tokens '.', '+', '-', '*', '/', '%', '++', '--',
1199
'!', '~', '@'. Fill in tp->comment.
1200
(phase4_unget): New function.
1201
(phase5_last): New variable.
1202
(x_php_lex): New function.
1203
(extract_balanced): Handle the new token types. Pass token's comment
1204
to remember_a_message.
1205
(extract_php): Initialize phase5_last.
1206
Reported by Jan Engelhardt <jengelh@computergmbh.de>.
1208
2007-06-30 Bruno Haible <bruno@clisp.org>
1210
* hostname.c (main): Use the standard --version output, see
1211
<http://lists.gnu.org/archive/html/bug-gnulib/2007-03/msg00302.html>.
1212
* msgattrib.c (main): Likewise.
1213
* msgcat.c (main): Likewise.
1214
* msgcmp.c (main): Likewise.
1215
* msgcomm.c (main): Likewise.
1216
* msgconv.c (main): Likewise.
1217
* msgen.c (main): Likewise.
1218
* msgexec.c (main): Likewise.
1219
* msgfilter.c (main): Likewise.
1220
* msgfmt.c (main): Likewise.
1221
* msggrep.c (main): Likewise.
1222
* msginit.c (main): Likewise.
1223
* msgmerge.c (main): Likewise.
1224
* msgunfmt.c (main): Likewise.
1225
* msguniq.c (main): Likewise.
1226
* recode-sr-latin.c (main): Likewise.
1227
* urlget.c (main): Likewise.
1228
* xgettext.c (main): Likewise.
1230
2007-06-30 Bruno Haible <bruno@clisp.org>
1232
* lang-table.c (language_table): Fix entry for Javanese.
1234
2007-06-28 Bruno Haible <bruno@clisp.org>
1236
* format-gcc-internal.c (format_parse): Tweak an error message.
1237
Reported by Karl Eichwalder.
1239
2007-06-28 Bruno Haible <bruno@clisp.org>
1241
* lang-table.h (language_variant_table, language_variant_table_size):
1243
* lang-table.c (language_variant_table, language_variant_table_size):
1245
* msginit.c (language_team_englishname): New function.
1246
(language_team): Use it instead of englishname_of_language.
1247
Reported by Li Daobing <lidaobing@gmail.com>.
1249
2007-06-25 Bruno Haible <bruno@clisp.org>
1251
Change boundary of extracted comments.
1252
* x-perl.c (struct token_ty): Add comment field.
1253
(free_token): Release tp->comment.
1254
(extract_quotelike): Fill in tp->comment.
1255
(x_perl_prelex): Set or release tp->comment when constructing tokens.
1256
(x_perl_lex): Likewise.
1257
(extract_balanced): Pass token's comment to remember_a_message.
1259
2007-06-18 Bruno Haible <bruno@clisp.org>
1261
Change boundary of extracted comments.
1262
* x-ycp.c (struct token_ty): Add comment field.
1263
(free_token): New function.
1264
(phase5_get): Fill in tp->comment.
1265
(phase8_get): Use free_token.
1266
(extract_parenthesized): Pass token's comment to remember_a_message.
1268
Reported by Karl Eichwalder <ke@suse.de>.
1270
2007-06-09 Bruno Haible <bruno@clisp.org>
1272
* format-java.c: Include xmalloca.h instead of xallocsa.h.
1273
(message_format_parse): Use xmalloca/freea instead of xallocsa/freesa.
1274
* message.c: Include xmalloca.h instead of xallocsa.h.
1275
(message_list_hash_insert_entry, message_list_search): Use
1276
xmalloca/freea instead of xallocsa/freesa.
1277
* msggrep.c: Include xmalloca.h instead of xallocsa.h.
1278
(is_message_selected_no_invert): Use xmalloca/freea instead of
1280
* msginit.c: Include xmalloca.h instead of xallocsa.h.
1281
(subst_string): Use xmalloca/freea instead of xallocsa/freesa.
1282
* msgl-cat.c: Include xmalloca.h instead of xallocsa.h.
1283
(catenate_msgdomain_list): Use xmalloca/freea instead of
1285
* msgl-charset.c: Include xmalloca.h instead of xallocsa.h.
1286
(compare_po_locale_charsets): Use xmalloca/freea instead of
1288
* msgl-iconv.c: Include xmalloca.h instead of xallocsa.h.
1289
(iconv_message_list_internal, is_message_list_iconvable): Use
1290
xmalloca/freea instead of xallocsa/freesa.
1291
* msgmerge.c: Include xmalloca.h instead of xallocsa.h.
1292
(merge): Use xmalloca/freea instead of xallocsa/freesa.
1293
* po-charset.c: Include xmalloca.h instead of xallocsa.h.
1294
(po_lex_charset_set): Use xmalloca/freea instead of xallocsa/freesa.
1295
* read-tcl.c: Include xmalloca.h instead of xallocsa.h.
1296
(msgdomain_read_tcl): Use xmalloca/freea instead of xallocsa/freesa.
1297
* write-java.c: Include xmalloca.h instead of xallocsa.h.
1298
(compute_hashsize, msgdomain_write_java): Use xmalloca/freea instead of
1300
* write-mo.c: Include xmalloca.h instead of xallocsa.h.
1301
(write_table): Use xmalloca/freea instead of xallocsa/freesa.
1302
* write-po.c: Include xmalloca.h instead of xallocsa.h.
1303
(msgdomain_list_print_po): Use xmalloca/freea instead of
1305
* write-tcl.c: Include xmalloca.h instead of xallocsa.h.
1306
(msgdomain_write_tcl): Use xmalloca/freea instead of xallocsa/freesa.
1307
* xgettext.c: Include xmalloca.h instead of xallocsa.h.
1308
(flag_context_list_table_insert): Use xmalloca/freea instead of
1311
2007-06-08 Bruno Haible <bruno@clisp.org>
1313
* msgattrib.c (main): Update year in --version output.
1314
* msgcat.c (main): Likewise.
1315
* msgcmp.c (main): Likewise.
1316
* msgcomm.c (main): Likewise.
1317
* msgconv.c (main): Likewise.
1318
* msgen.c (main): Likewise.
1319
* msgexec.c (main): Likewise.
1320
* msgfilter.c (main): Likewise.
1321
* msgfmt.c (main): Likewise.
1322
* msggrep.c (main): Likewise.
1323
* msginit.c (main): Likewise.
1324
* msgmerge.c (main): Likewise.
1325
* msgunfmt.c (main): Likewise.
1326
* msguniq.c (main): Likewise.
1327
* xgettext.c (main): Likewise.
1328
* recode-sr-latin.c (main): Likewise.
1329
* hostname.c (main): Likewise.
1330
* urlget.c (main): Likewise.
1332
2007-06-08 Bruno Haible <bruno@clisp.org>
1334
* msginit.c: Include localename.h.
1335
(_nl_locale_name): Remove declaration.
1336
(main): Use gl_locale_name instead of _nl_locale_name.
1337
* Makefile.am (msginit_LDADD): Remove localename object file.
1339
2007-05-28 Bruno Haible <bruno@clisp.org>
1341
* Makefile.am (WOE32_LDADD): New variable.
1342
(LDADD, msgcmp_LDADD, msgfmt_LDADD, msgmerge_LDADD, msgunfmt_LDADD,
1343
xgettext_LDADD, msgattrib_LDADD, msgcat_LDADD, msgcomm_LDADD,
1344
msgconv_LDADD, msgen_LDADD, msgexec_LDADD, msgfilter_LDADD,
1345
msggrep_LDADD, msginit_LDADD, msguniq_LDADD, recode_sr_latin_LDADD):
1347
(gettext.res): New rule.
1348
(MOSTLYCLEANFILES): Add gettext.res.
1350
2007-05-27 Bruno Haible <bruno@clisp.org>
1352
Avoid link error; u16_mbtouc_aux is no longer a public API.
1353
* x-java.c (string_buffer_append): Use u16_mbtouc instead of
1355
* x-python.c (mixed_string_buffer_append): Likewise.
1357
2007-05-13 Bruno Haible <bruno@clisp.org>
1359
* write-java.c (mkdir): Remove definition. Now done by gnulib.
1360
* write-csharp.c (mkdir): Remove definition. Now done by gnulib.
1362
2007-05-13 Bruno Haible <bruno@clisp.org>
1364
* msgl-check.c: Include stdio.h instead of vasprintf.h.
1365
* po-lex.c: Don't include vasprintf.h.
1367
2007-03-27 Bruno Haible <bruno@clisp.org>
1369
* hostname.c (usage): Ask translators to specify a translation bug
1371
* msgattrib.c (usage): Likewise.
1372
* msgcat.c (usage): Likewise.
1373
* msgcmp.c (usage): Likewise.
1374
* msgcomm.c (usage): Likewise.
1375
* msgconv.c (usage): Likewise.
1376
* msgen.c (usage): Likewise.
1377
* msgexec.c (usage): Likewise.
1378
* msgfilter.c (usage): Likewise.
1379
* msgfmt.c (usage): Likewise.
1380
* msggrep.c (usage): Likewise.
1381
* msginit.c (usage): Likewise.
1382
* msgmerge.c (usage): Likewise.
1383
* msgunfmt.c (usage): Likewise.
1384
* msguniq.c (usage): Likewise.
1385
* recode-sr-latin.c (usage): Likewise.
1386
* urlget.c (usage): Likewise.
1387
* xgettext.c (usage): Likewise.
1389
2007-03-24 Bruno Haible <bruno@clisp.org>
1391
* po-lex.c: Include unistr.h instead of utf8-ucs4.h.
1392
* read-properties.c: Include unistr.h instead of utf16-ucs4.h,
1394
* x-java.c: Likewise.
1395
* read-stringtable.c: Include unistr.h instead of utf8-ucs4.h,
1397
* x-csharp.c: Likewise.
1398
* write-csharp.c: Include unistr.h instead of utf8-ucs4.h.
1399
* write-java.c: Likewise.
1400
* write-properties.c: Likewise.
1401
* write-qt.c: Likewise.
1402
* write-tcl.c: Likewise.
1403
* x-perl.c: Likewise.
1404
* x-python.c: Include unistr.h instead of utf8-ucs4.h, utf16-ucs4.h,
1406
* x-tcl.c: Include unistr.h instead of ucs4-utf8.h.
1408
2007-03-17 Bruno Haible <bruno@clisp.org>
1410
* x-php.c (enum token_type_ty): New values token_type_lbracket,
1411
token_type_rbracket.
1412
(x_php_lex): Recognize also token_type_lbracket, token_type_rbracket.
1413
(extract_balanced): Renamed from extract_parenthesized. Add 'delim'
1414
argument. Handle token_type_lbracket and token_type_rbracket.
1415
(extract_php): Update.
1416
Reported by Robert Vock <RobertVock@gmx.de>.
1418
2007-03-10 Bruno Haible <bruno@clisp.org>
1420
* msginit.c (get_user_fullname): Reduce scope of local variables.
1422
2007-03-04 Bruno Haible <bruno@clisp.org>
1424
Moved --enable-relocatable infrastructure to gnulib.
1425
* Makefile.am: Remove SET_RELOCATABLE invocation.
1427
2007-02-25 Bruno Haible <bruno@clisp.org>
1429
* color.c: Include filename.h instead of pathname.h.
1430
(style_file_prepare): Update.
1431
* msginit.c: Include filename.h instead of pathname.h.
1432
(project_id, project_id_version): Update.
1433
* open-catalog.c: Include filename.h instead of pathname.h.
1434
(try_open_catalog_file): Update.
1435
* read-csharp.c: Include filename.h instead of pathname.h.
1436
(msgdomain_read_csharp): Update.
1437
* read-resources.c: Include filename.h instead of pathname.h.
1438
(read_resources_file): Update.
1439
* read-tcl.c: Include filename.h instead of pathname.h.
1440
(msgdomain_read_tcl): Update.
1441
* write-csharp.c: Include filename.h instead of pathname.h.
1442
(msgdomain_write_csharp): Update.
1443
* write-java.c Include filename.h instead of pathname.h.
1444
(msgdomain_write_java): Update.
1445
* write-resources.c: Include filename.h instead of pathname.h.
1446
(msgdomain_write_csharp_resources): Update.
1447
* write-tcl.c: Include filename.h instead of pathname.h.
1448
(msgdomain_write_tcl): Update.
1449
* xgettext.c: Include filename.h instead of pathname.h.
1450
(main, xgettext_open): Update.
1452
2007-02-19 Bruno Haible <bruno@clisp.org>
1454
* file-list.c: Don't include exit.h.
1455
* hostname.c: Likewise.
1456
* msgattrib.c: Likewise.
1457
* msgcat.c: Likewise.
1458
* msgcmp.c: Likewise.
1459
* msgcomm.c: Likewise.
1460
* msgconv.c: Likewise.
1461
* msgen.c: Likewise.
1462
* msgexec.c: Likewise.
1463
* msgfilter.c: Likewise.
1464
* msgfmt.c: Likewise.
1465
* msggrep.c: Likewise.
1466
* msginit.c: Likewise.
1467
* msgl-cat.c: Include <stdlib.h> instead of exit.h.
1468
* msgl-charset.c: Likewise.
1469
* msgl-check.c: Don't include exit.h.
1470
* msgmerge.c: Likewise.
1471
* msgunfmt.c: Likewise.
1472
* msguniq.c: Likewise.
1473
* po-lex.c: Likewise.
1474
* po-xerror.c: Likewise.
1475
* read-csharp.c: Likewise.
1476
* read-java.c: Likewise.
1477
* read-mo.c: Likewise.
1478
* read-resources.c: Likewise.
1479
* read-tcl.c: Likewise.
1480
* recode-sr-latin.c: Likewise.
1481
* urlget.c: Likewise.
1482
* write-mo.c: Likewise.
1483
* write-qt.c: Likewise.
1484
* write-resources.c: Likewise.
1485
* write-tcl.c: Include <stdlib.h> instead of exit.h.
1486
* x-awk.c: Don't include exit.h.
1488
* x-csharp.c: Likewise.
1489
* x-elisp.c: Likewise.
1490
* x-glade.c: Likewise.
1491
* x-java.c: Likewise.
1492
* x-librep.c: Likewise.
1493
* x-lisp.c: Likewise.
1494
* x-perl.c: Likewise.
1495
* x-php.c: Likewise.
1496
* x-python.c: Likewise.
1497
* x-rst.c: Include <stdlib.h> instead of exit.h.
1498
* x-scheme.c: Don't include exit.h.
1500
* x-smalltalk.c: Likewise.
1501
* x-tcl.c: Likewise.
1502
* x-ycp.c: Likewise.
1503
* xgettext.c: Likewise.
1505
2007-01-28 Bruno Haible <bruno@clisp.org>
1507
* x-java.c (string_buffer_append_lone_surrogate): New function.
1508
(string_buffer_flush_utf16_surr, string_buffer_append): Use it.
1510
2007-01-28 Bruno Haible <bruno@clisp.org>
1512
* x-java.c (string_buffer_flush_utf16_surr): Give a warning when
1513
converting a surrogate code point to U+FFFD.
1514
(string_buffer_append): Convert a lone high surrogate code point to
1515
U+FFFD, and give a warning.
1517
2007-01-26 Bruno Haible <bruno@clisp.org>
1519
* msgfilter.c: Include <sys/time.h> unconditionally.
1521
2007-01-26 Bruno Haible <bruno@clisp.org>
1523
* msginit.c: Don't include strpbrk.h, use <string.h> instead.
1525
2007-01-26 Bruno Haible <bruno@clisp.org>
1527
* msgmerge.c: Don't include stpncpy.h, use <string.h> instead.
1529
2007-01-26 Bruno Haible <bruno@clisp.org>
1531
* msgfmt.c: Don't include stpcpy.h, use <string.h> instead.
1532
* msgmerge.c: Likewise.
1534
2007-01-21 Bruno Haible <bruno@clisp.org>
1536
* msgl-iconv.c (convert_string, convert_msgstr, iconvable_string,
1537
iconvable_msgstr): Update for changed calling convention of
1539
* recode-sr-latin.c (process): Likewise.
1541
2007-01-07 Bruno Haible <bruno@clisp.org>
1543
* msgmerge.c (message_merge): Copy the obsolete bit from the ref
1545
Reported by Leonardo Fontenelle <leo.fontenelle@gmail.com>.
1547
2006-12-24 Bruno Haible <bruno@clisp.org>
1549
* Makefile.am (AM_CXXFLAGS): New variable.
1551
2006-12-23 Bruno Haible <bruno@clisp.org>
1553
* color.c (print_color_test): Print labels before the hue/saturation
1554
rectangle. Show also a few lines that mix colors and attributes.
1556
2006-12-03 Bruno Haible <bruno@clisp.org>
1558
* msgcat.c: Include color.h.
1559
(long_options): Add --color, --style options.
1560
(main): Handle them. Invoke print_color_test when --color=test was
1562
(usage): Document --color, --style options.
1564
2006-12-01 Bruno Haible <bruno@clisp.org>
1566
Add styling support to the PO output routines.
1567
* color.h: New file.
1568
* color.c: New file.
1569
* write-catalog.h (struct catalog_output_format): Add field
1571
* write-catalog.c: Include fcntl.h, unistd.h, styled-ostream.h,
1572
term-styled-ostream.h, html-styled-ostream.h, fd-ostream.h, color.h,
1573
po-charset.h, msgl-iconv.h.
1574
(STDOUT_FILENO): New macro.
1575
(ENABLE_COLOR): New macro.
1576
(msgdomain_list_print): Use a styled_ostream_t that uses the
1578
* write-po.c: Include format.h, styled-ostream.h.
1579
(is_stylable, begin_css_class, end_css_class): New functions or macros.
1580
(class_header, class_translated, class_untranslated, class_fuzzy,
1581
class_obsolete, class_comment, class_translator_comment,
1582
class_extracted_comment, class_reference_comment, class_reference,
1583
class_flag_comment, class_flag, class_fuzzy_flag,
1584
class_previous_comment, class_previous, class_msgid, class_msgstr,
1585
class_keyword, class_string, class_text, class_escape_sequence,
1586
class_format_directive, class_invalid_format_directive): New variables.
1587
(ATTR_ESCAPE_SEQUENCE, ATTR_FORMAT_DIRECTIVE,
1588
ATTR_INVALID_FORMAT_DIRECTIVE): New enum items.
1589
(message_print_comment, message_print_comment_dot,
1590
message_print_comment_filepos, message_print_comment_flags): Call
1591
begin/end_css_class.
1592
(memset_small): New function.
1593
(wrap): Add css_class argument. Determine the extent of format
1594
string directives. Call begin/end_css_class.
1595
(print_blank_line): Call begin/end_css_class.
1596
(message_print, message_print_obsolete): Likewise. Pass a css_class
1598
(msgdomain_list_print_po): Call begin/end_css_class.
1599
(output_format_po): Update.
1600
* write-properties.c (output_format_properties): Update.
1601
* write-stringtable.c (output_format_stringtable): Update.
1602
* Makefile.am (noinst_HEADERS): Add color.h.
1603
(libgettextsrc_la_SOURCES): Add color.c.
1605
2006-11-26 Bruno Haible <bruno@clisp.org>
1607
* write-po.c (make_format_description_string,
1608
make_c_width_description_string): Strip off the leading space.
1609
(message_print_comment_flags): Print the space here.
1610
* write-stringtable.c (write_message): Print the space here.
1612
2006-11-26 Bruno Haible <bruno@clisp.org>
1614
* write-po.c: Include write-catalog.h instead of write-properties.h,
1615
write-stringtable.h.
1617
2006-11-26 Bruno Haible <bruno@clisp.org>
1619
* format.h (FMTDIR_START, FMTDIR_END, FMTDIR_ERROR): New enum values.
1620
(FDI_SET): New macro.
1621
(struct formatstring_parser): Add fdi argument to 'parse' method.
1622
* format.c (check_msgid_msgstr_format): Update.
1623
* format-awk.c (format_parse): Add fdi argument. Invoke FDI_SET.
1624
* format-boost.c (format_parse): Likewise.
1625
* format-c.c (format_parse): Add fdi argument. Invoke FDI_SET.
1626
(format_c_parse, format_objc_parse): Add fdi argument.
1627
(get_sysdep_c_format_directives): Update.
1628
* format-csharp.c (format_parse): Add fdi argument. Invoke FDI_SET.
1629
* format-elisp.c (format_parse): Likewise.
1630
* format-gcc-internal.c (format_parse): Likewise.
1631
* format-java.c (message_format_parse): Add fdi argument. Invoke
1633
(choice_format_parse): Update.
1634
(format_parse): Add fdi argument.
1635
* format-librep.c (format_parse): Add fdi argument. Invoke FDI_SET.
1636
* format-lisp.c (parse_upto): Add fdi argument. Invoke FDI_SET.
1637
(format_parse): Add fdi argument.
1638
* format-pascal.c (format_parse): Add fdi argument. Invoke FDI_SET.
1639
* format-perl.c (format_parse): Likewise.
1640
* format-perl-brace.c (format_parse): Likewise.
1641
* format-php.c (format_parse): Likewise.
1642
* format-python.c (format_parse): Add fdi argument. Invoke FDI_SET.
1643
(get_python_format_unnamed_arg_count): Update.
1644
* format-qt.c (format_parse): Add fdi argument. Invoke FDI_SET.
1645
* format-scheme.c (parse_upto): Add fdi argument. Invoke FDI_SET.
1646
(format_parse): Add fdi argument.
1647
* format-sh.c (format_parse): Add fdi argument. Invoke FDI_SET.
1648
* format-tcl.c (format_parse): Likewise.
1649
* format-ycp.c (format_parse): Likewise.
1650
* msgmerge.c (msgfmt_check_pair_fails): Update.
1651
* read-mo.c (read_mo_file): Update.
1652
* xgettext.c (set_format_flags_from_context, remember_a_message,
1653
remember_a_message_plural): Update.
1655
2006-11-25 Bruno Haible <bruno@clisp.org>
1657
* message.h (message_list_copy, msgdomain_list_copy): New declarations.
1658
* message.c (message_list_copy, msgdomain_list_copy): New functions.
1660
2006-11-25 Bruno Haible <bruno@clisp.org>
1662
* msgl-iconv.h (iconv_msgdomain_list): Add update_header argument.
1663
* msgl-iconv.c (iconv_message_list_internal): Renamed from
1664
iconv_msgdomain_list. Add update_header argument.
1665
(iconv_message_list): New function.
1666
(iconv_msgdomain_list): Add update_header argument.
1667
* msgcmp.c (compare): Update iconv_msgdomain_list call.
1668
* msgconv.c (main): Likewise.
1669
* msgfilter.c (main): Likewise.
1670
* msgmerge.c (merge): Likewise.
1671
* xgettext.c (main): Likewise.
1673
2006-11-23 Bruno Haible <bruno@clisp.org>
1675
* write-catalog.h: Include ostream.h. Don't include <stdio.h>.
1676
(struct catalog_output_format): Use ostream_t instead of 'FILE *'.
1677
* write-catalog.c: Include ostream.h, file-ostream.h.
1678
(msgdomain_list_print): Open a temporary file_ostream_t.
1679
* write-po.h: Include ostream.h. Don't include <stdio.h>.
1680
(message_print_comment, message_print_comment_dot,
1681
message_print_comment_filepos, message_print_comment_flags): Replace
1682
'FILE *' argument with an 'ostream_t' argument.
1683
* write-po.c: Include ostream.h.
1684
(message_print_comment, message_print_comment_dot,
1685
message_print_comment_filepos, message_print_comment_flags, wrap,
1686
print_blank_line, message_print, message_print_obsolete,
1687
msgdomain_list_print_po): Replace 'FILE *' argument with an 'ostream_t'
1689
* write-properties.c: Include ostream.h.
1690
(write_escaped_string, write_message, write_properties,
1691
msgdomain_list_print_properties): Replace 'FILE *' argument with an
1692
'ostream_t' argument.
1693
* write-stringtable.c: Include ostream.h, xvasprintf.h. Don't include
1695
(write_escaped_string, write_message, write_stringtable,
1696
msgdomain_list_print_stringtable): Replace 'FILE *' argument with an
1697
'ostream_t' argument.
1699
2006-11-12 Bruno Haible <bruno@clisp.org>
1701
* write-po.c (wrap): Indent by use of spaces, not tabs.
1703
2006-11-03 Bruno Haible <bruno@clisp.org>
1705
Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1706
* filter-sr-latin.c (serbian_to_latin): Use XNMALLOC instead of xmalloc.
1707
* format-awk.c (format_parse): Use XMALLOC instead of xmalloc.
1708
* format-boost.c (format_parse): Likewise.
1709
* format-c.c (format_parse): Use XMALLOC, XNMALLOC instead of xmalloc.
1710
(get_sysdep_c_format_directives): Use XNMALLOC instead of xmalloc.
1711
* format-csharp.c (format_parse): Use XMALLOC instead of xmalloc.
1712
* format-elisp.c (format_parse): Likewise.
1713
* format-gcc-internal.c (format_parse): Likewise.
1714
* format-java.c (format_parse): Likewise.
1715
* format-librep.c (format_parse): Likewise.
1716
* format-lisp.c (copy_list): Use XMALLOC, XNMALLOC instead of xmalloc.
1717
(make_unconstrained_list): Likewise.
1718
(make_empty_list): Use XMALLOC instead of xmalloc.
1719
(rotate_loop): Use XNMALLOC instead of xmalloc.
1720
(make_intersected_list): Use XMALLOC instead of xmalloc.
1721
(make_union_list): Use XMALLOC, XNMALLOC instead of xmalloc.
1722
(make_repeated_list_of_lists): Likewise.
1723
(make_repeated_list): Likewise.
1724
(format_parse): Use XMALLOC instead of xmalloc.
1725
* format-pascal.c (format_parse): Likewise.
1726
* format-perl.c (format_parse): Likewise.
1727
* format-perl-brace.c (format_parse): Use XMALLOC, XNMALLOC instead of
1729
* format-php.c (format_parse): Use XMALLOC instead of xmalloc.
1730
* format-python.c (format_parse): Use XMALLOC, XNMALLOC instead of
1732
* format-qt.c (format_parse): Use XMALLOC instead of xmalloc.
1733
* format-scheme.c (copy_list): Use XMALLOC, XNMALLOC instead of xmalloc.
1734
(make_unconstrained_list): Likewise.
1735
(make_empty_list): Use XMALLOC instead of xmalloc.
1736
(rotate_loop): Use XNMALLOC instead of xmalloc.
1737
(make_intersected_list): Use XMALLOC instead of xmalloc.
1738
(make_union_list): Use XMALLOC, XNMALLOC instead of xmalloc.
1739
(make_repeated_list_of_lists): Likewise.
1740
(make_repeated_list): Likewise.
1741
(format_parse): Use XMALLOC instead of xmalloc.
1742
* format-sh.c (format_parse): Use XMALLOC, XNMALLOC instead of xmalloc.
1743
* format-tcl.c (format_parse): Use XMALLOC instead of xmalloc.
1744
* format-ycp.c (format_parse): Likewise.
1745
* message.c (message_alloc, message_list_list_alloc, msgdomain_alloc):
1746
Use XMALLOC instead of xmalloc.
1747
(msgdomain_list_alloc): Use XMALLOC, XNMALLOC instead of xmalloc.
1748
* msgexec.c (main): Use XNMALLOC instead of xmalloc.
1749
* msgfilter.c (main, generic_filter, process_message): Likewise.
1750
* msgfmt.c (add_mo_suffix): Likewise.
1751
(new_domain): Use XMALLOC instead of xmalloc.
1752
* msginit.c (catalogname_for_locale, language_of_locale,
1753
get_user_fullname, get_field, put_field, subst_string,
1754
update_msgstr_plurals): Use XNMALLOC instead of xmalloc.
1755
* msgl-cat.c (catenate_msgdomain_list): Likewise.
1756
* msgl-check.c (check_plural_eval): Use XCALLOC instead of xcalloc.
1757
* msgl-english.c (msgdomain_list_english): Use XNMALLOC instead of
1759
* msgl-fsearch.c (new_index): Likewise.
1760
(message_fuzzy_index_alloc): Use XMALLOC instead of xmalloc.
1761
(mult_index_list_accumulate): Use XNMALLOC instead of xmalloc.
1762
* msgl-iconv.c (iconv_message_list): Likewise.
1763
* msgmerge.c (message_merge, match_domain): Likewise.
1764
* po-gram-gen.y (plural_form_list): Likewise.
1765
* read-catalog-abstract.c (po_parse_comment_filepos,
1766
po_parse_comment_solaris_filepos): Likewise.
1767
* read-mo.c (get_sysdep_string): Likewise.
1768
* read-properties.c (conv_from_iso_8859_1, read_escaped_string):
1770
* read-stringtable.c (conv_from_ucs4): Likewise.
1771
* str-list.c (string_list_alloc): Use XMALLOC instead of xmalloc.
1772
(string_list_concat, string_list_join): Use XNMALLOC instead of xmalloc.
1773
* write-csharp.c (construct_class_name, msgdomain_write_csharp):
1775
* write-java.c (compute_hashsize, compute_table_items): Likewise.
1776
* write-mo.c: Include xsize.h.
1777
(write_table): Use XNMALLOC instead of xmalloc. Use xsum, xtimes in
1779
* write-po.c (wrap): Use XNMALLOC instead of xmalloc.
1780
* write-properties.c (conv_to_java): Likewise.
1781
* write-qt.c (conv_to_iso_8859_1, conv_to_utf16): Likewise.
1782
* x-elisp.c (init_token, string_of_object): Likewise.
1783
(read_object): Use XMALLOC instead of xmalloc.
1784
* x-librep.c (init_token, string_of_object): Use XNMALLOC instead of
1786
(read_object): Use XMALLOC instead of xmalloc.
1787
* x-lisp.c (x_lisp_keyword, init_token, string_of_object): Use XNMALLOC
1789
(read_object): Use XMALLOC instead of xmalloc.
1790
* x-perl.c (get_here_document, extract_quotelike_pass1,
1791
extract_quotelike_pass3): Use XNMALLOC instead of xmalloc.
1792
(x_perl_lex): Use XMALLOC instead of xmalloc.
1793
* x-po.c (strextract_add_message, extract): Use XNMALLOC instead of
1795
* x-python.c (try_to_extract_coding): Use XNMALLOC instead of xmalloc.
1796
* x-scheme.c (init_token, string_of_object): Use XNMALLOC
1798
(read_object): Use XMALLOC instead of xmalloc.
1799
* x-sh.c (init_token, string_of_token, string_of_word): Use XNMALLOC
1801
(read_word): Use XMALLOC instead of xmalloc.
1802
* x-smalltalk.c (phase2_get): Use XNMALLOC instead of xmalloc.
1803
* x-tcl.c (init_token, string_of_word): Use XNMALLOC instead of xmalloc.
1804
(read_word): Use XMALLOC instead of xmalloc.
1805
* xgettext.c: Include xsize.h.
1806
(split_keywordspec): Use XNMALLOC instead of xmalloc.
1807
(insert_keyword_callshape): Use XMALLOC instead of xmalloc. Use xsum,
1808
xtimes to avoid overflow.
1809
(flag_context_list_table_insert): Use XMALLOC instead of xmalloc.
1810
(savable_comment_add): Likewise.
1811
(remember_a_message_plural): Use XNMALLOC instead of xmalloc.
1812
(arglist_parser_alloc, arglist_parser_clone): Use xsum, xtimes.
1813
(arglist_parser_done): Use XNMALLOC instead of xmalloc.
1814
(finalize_header): Likewise.
1816
2006-10-30 Bruno Haible <bruno@clisp.org>
1818
* plural-eval.h [C++]: Define functions without name mangling.
1820
2006-10-29 Bruno Haible <bruno@clisp.org>
1822
Clean up libgettextpo exports in C++ mode.
1823
* po-gram.h: Wrap declarations in extern "C".
1825
2006-10-29 Bruno Haible <bruno@clisp.org>
1827
Make it compile in C++ mode.
1828
* dir-list.c (dir_list_restore): Add cast.
1829
* format-c.c (format_arg_type_t): New type. Use it instead of
1830
'enum format_arg_type'.
1831
* format-gcc-internal.c (format_arg_type_t): New type. Use it instead of
1832
'enum format_arg_type'.
1833
* format-perl.c (format_arg_type_t): New type. Use it instead of
1834
'enum format_arg_type'.
1835
* format-lisp.c (struct segment): Move out of the scope of struct
1837
* format-scheme.c (struct segment): Likewise.
1838
* message.h (struct altstr): Move out of the scope of struct message_ty.
1839
* msgl-equal.c (msgstr_equal_ignoring_potcdate): Cast memchr results.
1840
* po-lex.c (mb_copy): Rename arguments to new_mbc, old_mbc.
1841
* read-mo.c (enum mo_endianness): Move out of the scope of struct
1843
* read-po.c (this): New macro.
1844
* read-properties.c (this): New macro.
1845
* write-mo.c (write_table): Cast alloca result.
1846
* x-glade.c (load_libexpat): Cast dlsym results.
1847
* x-perl.c (get_here_document): Use xmalloc instead of
1848
xrealloc (NULL...). Cast its result.
1849
* x-po.c (extract_add_message): Limit the scope of variable
1851
* x-smalltalk.c (phase2_get): Cast xmalloc results.
1853
2006-10-29 Bruno Haible <bruno@clisp.org>
1855
* x-awk.h: Make includable without prerequisites.
1857
* x-csharp.h: Likewise.
1858
* x-elisp.h: Likewise.
1859
* x-glade.h: Likewise.
1860
* x-java.h: Likewise.
1861
* x-librep.h: Likewise.
1862
* x-lisp.h: Likewise.
1863
* x-perl.h: Likewise.
1864
* x-php.h: Likewise.
1866
* x-properties.h: Likewise.
1867
* x-python.h: Likewise.
1868
* x-rst.h: Likewise.
1869
* x-scheme.h: Likewise.
1871
* x-smalltalk.h: Likewise.
1872
* x-stringtable.h: Likewise.
1873
* x-tcl.h: Likewise.
1874
* x-ycp.h: Likewise.
1875
* x-awk.c: Include x-awk.h.
1876
* x-c.c: Include x-c.h.
1877
* x-csharp.c: Include x-csharp.h.
1878
* x-elisp.c: Include x-elisp.h.
1879
* x-glade.c: Include x-glade.h.
1880
* x-java.c: Include x-java.h.
1881
* x-librep.c: Include x-librep.h.
1882
* x-lisp.c: Include x-lisp.h.
1883
* x-perl.c: Include x-perl.h.
1884
* x-php.c: Include x-php.h.
1885
* x-po.c: Include x-po.h, x-properties.h, x-stringtable.h.
1886
* x-python.c: Include x-python.h.
1887
* x-rst.c: Include x-rst.h.
1888
* x-scheme.c: Include x-scheme.h.
1889
* x-sh.c: Include x-sh.h.
1890
* x-smalltalk.c: Include x-smalltalk.h.
1891
* x-tcl.c: Include x-tcl.h.
1892
* x-ycp.c: Include x-ycp.h.
1893
* xgettext.c: Remove extern "C" around x-*.h includes.
1895
2006-10-29 Bruno Haible <bruno@clisp.org>
1897
* format-awk.c (format_parse): Fix bug with unnumbered argument in
1900
2006-11-27 Bruno Haible <bruno@clisp.org>
1902
* gettext-0.16.1 released.
1904
2006-10-26 Bruno Haible <bruno@clisp.org>
1906
* gettext-0.16 released.
1908
2006-10-24 Bruno Haible <bruno@clisp.org>
1910
* Makefile.am (AM_CPPFLAGS): Add also $(top_srcdir). Needed so that
1911
woe32dll/export.h is found while compiling gettextsrc-exports.c in a
1913
Reported by Charles Wilson <cygwin@cwilson.fastmail.fm>.
1915
2006-10-24 Bruno Haible <bruno@clisp.org>
1917
* msgmerge.c (struct definitions_ty): Remove semicolon after
1918
gl_lock_define invocation.
1920
2006-10-21 Bruno Haible <bruno@clisp.org>
1922
* po-error.h (po_error, po_error_at_line): Use format attribute only
1925
2006-10-21 Bruno Haible <bruno@clisp.org>
1927
* msgmerge.c (struct definitions_ty): Use gl_lock_define to declare
1928
the findex_init_lock field.
1929
(definitions_init): Use gl_lock_init to initialize it, instead of
1932
2006-10-16 Bruno Haible <bruno@clisp.org>
1934
Work around automake-1.10 problem described in
1935
http://lists.gnu.org/archive/html/bug-automake/2006-08/msg00025.html.
1936
* Makefile.am (CXXLINK): Remove variable.
1937
(msgmerge_CXXFLAGS): New variable.
1938
(libgettextsrc_la_LINK, msgattrib_LINK, msgcat_LINK, msgcomm_LINK,
1939
msgconv_LINK, msgen_LINK, msgfilter_LINK, msggrep_LINK, msgmerge_LINK,
1940
msguniq_LINK, xgettext_LINK): New variables.
1942
2006-10-18 Bruno Haible <bruno@clisp.org>
1944
* read-po.h (input_format_po): Mark as DLL_VARIABLE.
1945
* read-properties.h (input_format_properties): Likewise.
1946
* read-stringtable.h (input_format_stringtable): Likewise.
1947
* write-po.h (output_format_po): Likewise.
1948
* write-properties.h (output_format_properties): Likewise.
1949
* write-stringtable.h (output_format_stringtable): Likewise.
1951
2006-10-16 Bruno Haible <bruno@clisp.org>
1953
* gettext-po.h.in: Move to ../libgettextpo/.
1954
* gettext-po.c: Move to ../libgettextpo/.
1955
* Makefile.am (lib_LTLIBRARIES): Remove libgettextpo.la.
1956
(nodist_include_HEADERS): Remove variable.
1957
(libgettextpo_la_SOURCES, LTV_CURRENT, LTV_REVISION, LTV_AGE,
1958
libgettextpo_la_LDFLAGS, libgettextpo_la_DEPENDENCIES,
1959
libgettextpo_la_LDFLAGS): Remove variables.
1960
(EXTRA_DIST, BUILT_SOURCES, CLEANFILES): Remove gettext-po.h support.
1961
(gettext-po.h): Remove rule.
1963
2006-10-18 Bruno Haible <bruno@clisp.org>
1965
* po-error.h (__attribute__, __format__, __printf__): New macros.
1966
(po_error, po_error_at_line): Declare format string argument.
1967
* po-lex.h (__attribute__, __format__, __printf__): New macros.
1968
(po_gram_error, po_gram_error_at_line): Declare format string argument.
1970
* msgl-cat.c (catenate_msgdomain_list): Avoid "gcc -Wshadow" warning.
1971
* msgl-check.c (formatstring_error_logger): Avoid "gcc
1972
-Wmissing-format-attribute" warning.
1973
(check_pair): Avoid "gcc -Wshadow" warning.
1975
* read-stringtable.c (stringtable_parse): Pass a mutable string as
1976
msgstr to po_callback_message.
1977
* write-po.c (msgdomain_list_print_po): Avoid "gcc -Wwrite-strings"
1979
* xgettext.c (remember_a_message_plural): Free a temporary string
1982
2006-10-17 Bruno Haible <bruno@clisp.org>
1984
* lang-table.c (language_table): Add the most important languages that
1985
have an ISO 639-2 code.
1986
* msginit.c (catalogname_for_locale): Likewise.
1988
2006-10-15 Bruno Haible <bruno@clisp.org>
1990
* read-catalog-abstract.h (input_syntax_ty): Remove type.
1991
(catalog_input_format): New structure type.
1992
(catalog_input_format_ty): New type.
1993
(catalog_reader_parse): Change type of input_syntax argument.
1994
* read-catalog.h (input_syntax): Remove variable.
1995
(read_catalog_stream, read_catalog_file): Add input_syntax argument.
1996
* msgl-cat.h: Include read-catalog-abstract.h.
1997
(catenate_msgdomain_list): Add input_syntax argument.
1998
* read-po.h: New file.
1999
* read-po.c: New file, extracted from read-catalog-abstract.c.
2000
* msgattrib.c: Include read-po.h, read-properties.h, read-stringtable.h.
2001
(main): Change handling of --properties-input, --stringtable-input
2002
options. Update read_catalog_file calls.
2003
* msgcat.c: Include read-po.h, read-properties.h, read-stringtable.h.
2004
(main): Change handling of --properties-input, --stringtable-input
2005
options. Update catenate_msgdomain_list call.
2006
* msgcmp.c: Include read-po.h, read-properties.h, read-stringtable.h.
2007
(main): Change handling of --properties-input, --stringtable-input
2008
options. Update compare call.
2009
(compare): Add input_syntax argument.
2010
* msgcomm.c: Include read-po.h, read-properties.h, read-stringtable.h.
2011
(main): Change handling of --properties-input, --stringtable-input
2012
options. Update catenate_msgdomain_list call.
2013
* msgconv.c: Include read-po.h, read-properties.h, read-stringtable.h.
2014
(main): Change handling of --properties-input, --stringtable-input
2015
options. Update read_catalog_file call.
2016
* msgen.c: Include read-po.h, read-properties.h, read-stringtable.h.
2017
(main): Change handling of --properties-input, --stringtable-input
2018
options. Update read_catalog_file call.
2019
* msgexec.c: Include read-po.h, read-properties.h, read-stringtable.h.
2020
(main): Change handling of --properties-input, --stringtable-input
2021
options. Update read_catalog_file call.
2022
* msgfilter.c: Include read-po.h, read-properties.h, read-stringtable.h.
2023
(main): Change handling of --properties-input, --stringtable-input
2024
options. Update read_catalog_file call.
2025
* msgfmt.c: Include read-po.h, read-properties.h, read-stringtable.h.
2026
(main): Change handling of --properties-input, --stringtable-input
2027
options. Update read_catalog_file_msgfmt call.
2028
(read_catalog_file_msgfmt): Add input_syntax argument.
2029
* msggrep.c: Include read-po.h, read-properties.h, read-stringtable.h.
2030
(main): Change handling of --properties-input, --stringtable-input
2031
options. Update read_catalog_file call.
2032
* msginit.c: Include read-po.h, read-properties.h, read-stringtable.h.
2033
(main): Change handling of --properties-input, --stringtable-input
2034
options. Update read_catalog_file call.
2035
* msgl-cat.c (catenate_msgdomain_list): Add input_syntax argument.
2036
* msgmerge.c: Include read-po.h, read-properties.h, read-stringtable.h.
2037
(main): Change handling of --properties-input, --stringtable-input
2038
options. Update merge call.
2039
(compendium): Read it in PO syntax.
2040
(merge): Add input_syntax argument.
2041
* msguniq.c: Include read-po.h, read-properties.h, read-stringtable.h.
2042
(main): Change handling of --properties-input, --stringtable-input
2043
options. Update catenate_msgdomain_list call.
2044
* read-catalog-abstract.c: Don't include po-gram.h, read-properties.h,
2046
(catalog_reader_parse): Change type of input_syntax argument. Invoke
2047
the parser indirectly.
2048
* read-catalog.c (input_syntax): Remove variable.
2049
(read_catalog_stream, read_catalog_file): Add input_syntax argument.
2050
* read-csharp.c: Include read-po.h.
2051
(execute_and_read_po_output): Update read_catalog_stream call.
2052
* read-java.c: Include read-po.h.
2053
(execute_and_read_po_output): Update read_catalog_stream call.
2054
* read-properties.c (properties_parse): Make static.
2055
(input_format_properties): New variable.
2056
* read-properties.h (properties_parse): Remove declaration.
2057
(input_format_properties): New declaration.
2058
* read-resources.c: Include read-po.h.
2059
(execute_and_read_po_output): Update read_catalog_stream call.
2060
* read-stringtable.c (stringtable_parse): Make static.
2061
(input_format_stringtable): New variable.
2062
* read-stringtable.h (stringtable_parse): Remove declaration.
2063
(input_format_stringtable): New declaration.
2064
* read-tcl.c: Include read-po.h.
2065
(msgdomain_read_tcl): Update read_catalog_stream call.
2066
* x-po.c: Include read-po.h, read-properties.h, read-stringtable.h.
2067
(extract): Change type of input_syntax argument.
2068
(extract_po, extract_properties, extract_stringtable): Update.
2069
* xgettext.c: Include read-po.h.
2070
(read_exclusion_file): Read it in PO syntax.
2071
* gettext-po.c: Include read-po.h.
2072
(po_file_read_v3, po_file_read_v2, po_file_read): Update
2073
read_catalog_stream call.
2074
* Makefile.am (noinst_HEADERS): Add read-po.h.
2075
(COMMON_SOURCE): Add read-po.c.
2077
2006-10-15 Bruno Haible <bruno@clisp.org>
2079
* read-catalog-abstract.h (abstract_catalog_reader_ty): Renamed from
2080
abstract_po_reader_ty.
2081
(abstract_catalog_reader_class_ty): Renamed from
2082
abstract_po_reader_class_ty. Update.
2083
(ABSTRACT_CATALOG_READER_TY): Renamed from ABSTRACT_PO_READER_TY.
2085
(abstract_catalog_reader_ty): Renamed from abstract_po_reader_ty.
2087
(catalog_reader_alloc): Renamed from po_reader_alloc.
2088
(catalog_reader_parse): Renamed from po_scan.
2089
(catalog_reader_free): Renamed from po_reader_free.
2090
* read-catalog.h: Update.
2091
(default_catalog_reader_class_ty): Renamed from
2092
default_po_reader_class_ty.
2093
(DEFAULT_CATALOG_READER_TY): Renamed from DEFAULT_PO_READER_TY. Update.
2094
(default_catalog_reader_ty): Renamed from default_po_reader_ty. Update.
2095
(default_constructor, default_destructor, default_parse_brief,
2096
default_parse_debrief, default_directive_domain,
2097
default_directive_message, default_comment, default_comment_dot,
2098
default_comment_filepos, default_comment_special, default_set_domain,
2099
default_add_message): Update.
2100
(default_catalog_reader_alloc): Renamed from default_po_reader_alloc.
2102
(read_catalog_stream): Renamed from read_po.
2103
(read_catalog_file): Renamed from read_po_file.
2104
* open-catalog.h (open_catalog_file): Renamed from open_po_file.
2105
* msgattrib.c: Update.
2110
* msgcomm.c: Update.
2111
* msgconv.c: Update.
2115
* msgexec.c: Update.
2117
* msgfilter.c: Update.
2120
(read_catalog_file_msgfmt): Renamed from read_po_file_msgfmt. Update.
2122
(msgfmt_catalog_reader_ty): Renamed from msgfmt_po_reader_ty. Update.
2123
(msgfmt_constructor, msgfmt_parse_debrief, msgfmt_set_domain,
2124
msgfmt_add_message, msgfmt_frob_new_message, msgfmt_comment_special,
2125
msgfmt_methods): Update.
2126
(read_catalog_file_msgfmt): Renamed from read_po_file_msgfmt. Update.
2127
* msggrep.c: Update.
2129
* msginit.c: Update.
2131
* msgl-cat.c: Update.
2132
(catenate_msgdomain_list): Update.
2133
* msgmerge.c: Update.
2134
(compendium, merge): Update.
2135
* msguniq.c: Update.
2136
* open-catalog.c: Update.
2137
(try_open_catalog_file): Renamed from try_open_po_file.
2138
(open_catalog_file): Renamed from open_po_file. Update.
2139
* po-gram-gen.y: Update.
2140
* read-catalog-abstract.c: Update.
2141
(callback_arg): Update.
2142
(catalog_reader_alloc): Renamed from po_reader_alloc.
2143
(catalog_reader_free): Renamed from po_reader_free.
2144
(call_parse_brief, call_parse_debrief, call_directive_domain,
2145
call_directive_message, call_comment, call_comment_dot,
2146
call_comment_filepos, call_comment_special): Update.
2147
(parse_start): Renamed from po_scan_start.
2148
(parse_end): Renamed from po_scan_end.
2149
(catalog_reader_parse): Renamed from po_scan.
2150
* read-catalog.c: Update.
2151
(call_set_domain, call_add_message, call_frob_new_message): Update.
2152
(default_constructor, default_destructor, default_parse_brief,
2153
default_parse_debrief, default_copy_comment_state,
2154
default_reset_comment_state, default_directive_domain,
2155
default_directive_message, default_comment, default_comment_dot,
2156
default_comment_filepos, default_comment_special, default_set_domain,
2157
default_add_message, default_methods): Update.
2158
(default_catalog_reader_alloc): Renamed from default_po_reader_alloc.
2159
(read_catalog_stream): Renamed from read_po. Update.
2160
(read_catalog_file): Renamed from read_po_file. Update.
2161
* read-csharp.c: Update.
2162
(execute_and_read_po_output): Update.
2163
* read-java.c: Update.
2164
(execute_and_read_po_output): Update.
2165
* read-properties.c: Update.
2166
(properties_parse): Update.
2167
* read-properties.h: Update.
2168
(properties_parse): Update.
2169
* read-resources.c: Update.
2170
(execute_and_read_po_output): Update.
2171
* read-stringtable.c: Update.
2172
(stringtable_parse): Update.
2173
* read-stringtable.h: Update.
2174
(stringtable_parse): Update.
2175
* read-tcl.c: Update.
2176
(msgdomain_read_tcl): Update.
2178
(extract_add_message, extract_methods, extract): Update.
2179
* xgettext.c: Update.
2180
(exclude_directive_domain, exclude_directive_message, exclude_methods,
2181
read_exclusion_file): Update.
2182
* xgettext.h: Update.
2183
* gettext-po.c: Update.
2184
(po_file_read_v3, po_file_read_v2, po_file_read): Update.
2186
* read-catalog-abstract.h: Renamed from read-po-abstract.h.
2187
* read-catalog-abstract.c: Renamed from read-po-abstract.c.
2188
* read-catalog.h: Renamed from read-po.h.
2189
* read-catalog.c: Renamed from read-po.c.
2190
* open-catalog.h: Renamed from open-po.h.
2191
* open-catalog.c: Renamed from open-po.c.
2192
* Makefile.am (noinst_HEADERS, COMMON_SOURCE, libgettextsrc_la_SOURCES):
2195
2006-10-15 Bruno Haible <bruno@clisp.org>
2197
* write-catalog.h: New file.
2198
* write-catalog.c: New file, mostly extracted from write-po.c.
2199
* write-po.h (message_page_width_set): Move declaration to
2201
(message_print_syntax_properties, message_print_syntax_stringtable):
2202
Remove declarations.
2203
(msgdomain_list_print): Move out to write-catalog.h, adding a
2204
catalog_output_format_ty argument.
2205
(msgdomain_list_sort_by_msgid, msgdomain_list_sort_by_filepos): Move
2206
out to write-catalog.h.
2207
(output_format_po): New declaration.
2208
* write-po.c: Don't include fwriteerror.h, error-progname.h.
2209
(page_width, message_page_width_set): Move out to write-catalog.c.
2210
(use_syntax_properties): Remove variable.
2211
(message_print_syntax_properties): Remove function.
2212
(use_syntax_stringtable): Remove variable.
2213
(message_print_syntax_stringtable): Remove function.
2214
(wrap, message_print, message_print_obsolete, msgdomain_list_print_po):
2215
Add page_width argument.
2216
(msgdomain_list_print): Move out to write-catalog.c, adding a
2217
catalog_output_format_ty argument.
2218
(cmp_by_msgid, msgdomain_list_sort_by_msgid,
2219
cmp_filepos, msgdomain_list_sort_filepos,
2220
cmp_by_filepos, msgdomain_list_sort_by_filepos): Move out to
2222
(output_format_po): New variable.
2223
* write-properties.h (msgdomain_list_print_properties): Remove
2225
(output_format_properties): New declaration.
2226
* write-properties.c (msgdomain_list_print_properties): Make static.
2227
(output_format_properties): New variable.
2228
* write-stringtable.h (msgdomain_list_print_stringtable): Remove
2230
(output_format_stringtable): New declaration.
2231
* write-stringtable.c (msgdomain_list_print_stringtable): Make static.
2232
(output_format_stringtable): New variable.
2233
* msgattrib.c: Include write-catalog.h, write-properties.h,
2234
write-stringtable.h.
2235
(main): Change handling of --properties-output, --stringtable-output
2236
options. Pass the output_syntax to msgdomain_list_print.
2237
* msgcat.c: Include write-catalog.h, write-properties.h,
2238
write-stringtable.h.
2239
(main): Change handling of --properties-output, --stringtable-output
2240
options. Pass the output_syntax to msgdomain_list_print.
2241
* msgcomm.c: Include write-catalog.h, write-properties.h,
2242
write-stringtable.h.
2243
(main): Change handling of --properties-output, --stringtable-output
2244
options. Pass the output_syntax to msgdomain_list_print.
2245
* msgconv.c: Include write-catalog.h, write-properties.h,
2246
write-stringtable.h.
2247
(main): Change handling of --properties-output, --stringtable-output
2248
options. Pass the output_syntax to msgdomain_list_print.
2249
* msgen.c: Include write-catalog.h, write-properties.h,
2250
write-stringtable.h.
2251
(main): Change handling of --properties-output, --stringtable-output
2252
options. Pass the output_syntax to msgdomain_list_print.
2253
* msgfilter.c: Include write-catalog.h, write-properties.h,
2254
write-stringtable.h.
2255
(main): Change handling of --properties-output, --stringtable-output
2256
options. Pass the output_syntax to msgdomain_list_print.
2257
* msggrep.c: Include write-catalog.h, write-properties.h,
2258
write-stringtable.h.
2259
(main): Change handling of --properties-output, --stringtable-output
2260
options. Pass the output_syntax to msgdomain_list_print.
2261
* msginit.c: Include write-catalog.h, write-properties.h,
2262
write-stringtable.h.
2263
(main): Change handling of --properties-output, --stringtable-output
2264
options. Pass the output_syntax to msgdomain_list_print.
2265
* msgmerge.c: Include write-catalog.h, write-properties.h,
2266
write-stringtable.h.
2267
(main): Change handling of --properties-output, --stringtable-output
2268
options. Pass the output_syntax to msgdomain_list_print.
2269
* msgunfmt.c: Include write-catalog.h, write-properties.h,
2270
write-stringtable.h.
2271
(main): Change handling of --properties-output, --stringtable-output
2272
options. Pass the output_syntax to msgdomain_list_print.
2273
* msguniq.c: Include write-catalog.h, write-properties.h,
2274
write-stringtable.h.
2275
(main): Change handling of --properties-output, --stringtable-output
2276
options. Pass the output_syntax to msgdomain_list_print.
2277
* xgettext.c: Include write-catalog.h, write-properties.h,
2278
write-stringtable.h.
2279
(output_syntax): Change type to catalog_output_format_ty.
2280
(main): Update. Pass the output_syntax to msgdomain_list_print.
2281
(finalize_header): Update.
2282
* gettext-po.c: Include write-catalog.h.
2283
(po_file_write): Specify PO syntax.
2284
* Makefile.am (noinst_HEADERS): Add write-catalog.h.
2285
(libgettextsrc_la_SOURCES): Add write.catalog.c.
2287
2006-10-05 Bruno Haible <bruno@clisp.org>
2289
* lang-table.c (language_table): Add Adangme, Kashubian. Fix the
2290
names of Western Frisian, Marshallese, Sinhala.
2291
* msginit.c (catalogname_for_locale): Add entries for Kashubian,
2292
Western Frisian, South Ndebele. Change entry for Serbian from sr_CS to
2295
2006-10-06 Bruno Haible <bruno@clisp.org>
2297
* write-java.c (msgdomain_write_java): Use fopen_temp, fwriteerror_temp
2298
instead of fopen, fwriteerror.
2299
* write-csharp.c (msgdomain_write_csharp): Likewise.
2301
2006-10-06 Bruno Haible <bruno@clisp.org>
2303
* Makefile.am (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 3:0:3.
2305
2006-10-03 Bruno Haible <bruno@clisp.org>
2307
* message.h (struct message_ty): New fields prev_msgctxt, prev_msgid,
2309
* message.c (message_alloc): Initialize the prev_msg* fields.
2310
(message_free): Free the prev_msg* fields.
2311
(message_copy): Copy the prev_msg* fields.
2312
* msgl-ascii.c (is_ascii_message): Consider also the prev_msg* fields.
2313
* msgl-cat.c (catenate_msgdomain_list): Copy the prev_msg* fields if
2314
a message is copied, not merged.
2315
* msgl-equal.c (message_equal): Consider also the prev_msg* fields.
2316
* msgl-iconv.c (convert_prev_msgid): New function.
2317
(iconv_message_list): Call it.
2318
iconvable_prev_msgid): New function.
2319
(is_message_list_iconvable): Call it.
2321
* po-lex.c (po_lex_previous): New variable.
2322
(lex_start, lex_end): Reset it.
2323
(keyword_p): Test it. New return values PREV_MSGID, PREV_MSGID_PLURAL,
2325
(po_gram_lex): Recognize #| and #~| syntax. New return value
2327
* po-gram-gen.y (do_callback_message): Add prev_msgctxt, prev_msgid,
2328
prev_msgid_plural arguments.
2329
(free_message_intro): New macro.
2330
(PREV_MSGCTXT, PREV_MSGID, PREV_MSGID_PLURAL, PREV_STRING): New tokens.
2331
(prev, message_intro): New structures.
2332
(po_file): Renamed from msgfmt.
2333
(message): Pass prev_* fields around. Call free_message_intro.
2334
(message_intro, prev): New rules.
2335
(msg_intro): Renamed from message_intro.
2336
(prev_msg_intro, prev_msgid_pluralform, prev_string_list): New rules.
2337
* read-po-abstract.h (struct abstract_po_reader_class_ty): Add
2338
prev_msgctxt, prev_msgid, prev_msgid_plural arguments to the
2339
'directive_message' method.
2340
(po_callback_message): Add prev_msgctxt, prev_msgid,
2341
prev_msgid_plural arguments.
2342
* read-po-abstract.c (call_directive_message, po_callback_message): Add
2343
prev_msgctxt, prev_msgid, prev_msgid_plural arguments.
2344
* read-po.h (struct default_po_reader_class_ty): Add prev_msgctxt,
2345
prev_msgid, prev_msgid_plural arguments to the 'add_message' method.
2346
(default_directive_message, default_add_message): Add prev_msgctxt,
2347
prev_msgid, prev_msgid_plural arguments.
2348
* read-po.c (call_add_message, default_directive_message,
2349
default_add_message): Add prev_msgctxt, prev_msgid, prev_msgid_plural
2351
* read-properties.c (properties_parse): Update.
2352
* read-stringtable.c (stringtable_parse): Update.
2353
* xgettext.c (exclude_directive_message): Add prev_msgctxt, prev_msgid,
2354
prev_msgid_plural arguments.
2355
* x-po.c (extract_add_message): Add prev_msgctxt, prev_msgid,
2356
prev_msgid_plural arguments.
2358
* write-po.c (wrap): Add extra_indent argument.
2359
(message_print, message_print_obsolete): Print the prev_msgctxt,
2360
prev_msgid, prev_msgid_plural fields. Compute an extra_indent.
2362
* msgmerge.c (keep_previous): New variable.
2363
(long_options): Add --previous option.
2365
(usage): Document --previous option.
2366
(message_merge): Add force_fuzzy argument. Set the new message's
2368
(match_domain): Update.
2369
* msgattrib.c (REMOVE_PREV): New enum item.
2370
(long_options): Add --clear-previous option.
2372
(usage): Document --clear-previous option.
2373
(process_message_list): Handle REMOVE_PREV.
2374
* msgfmt.c (msgfmt_add_message): Add prev_msgctxt, prev_msgid,
2375
prev_msgid_plural arguments.
2376
* gettext-po.c (po_message_prev_msgctxt, po_message_set_prev_msgctxt,
2377
po_message_prev_msgid, po_message_set_prev_msgid,
2378
po_message_prev_msgid_plural, po_message_set_prev_msgid_plural): New
2381
2006-10-03 Bruno Haible <bruno@clisp.org>
2383
* msgmerge.c (definitions_init): Fix initialization of fresh_lock.
2385
2006-10-03 Bruno Haible <bruno@clisp.org>
2387
* msgcmp.c (include_fuzzies, include_untranslated): New variables.
2388
(long_options): Add options --use-fuzzy, --use-untranslated.
2389
(main): Handle them.
2390
(usage): Document them.
2391
(match_domain): Consider include_fuzzies and include_untranslated.
2393
2006-10-02 Bruno Haible <bruno@clisp.org>
2395
* gettext-po.h.in (LIBGETTEXTPO_VERSION): Bump version number.
2396
* Makefile.am (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 2:1:2.
2398
2006-10-01 Bruno Haible <bruno@clisp.org>
2400
* x-perl.c (extract_balanced): Remove state argument.
2402
* x-perl.c (extract_balanced): Remove unused variable prev_last_token.
2404
Fix Perl parsing bug introduced between 0.14.6 and 0.15.
2405
* x-perl.c (extract_balanced): Add eat_delim and comma_delim arguments.
2406
Use recursion to handle the case of a keyword not followed by an
2407
opening parenthesis. When a keyword is seen, set next_argparser
2408
instead of modifying the argparser variable of the current recursion.
2409
When seeing an opening parenthesis, distinguish the case of function
2410
arguments and the case of a subexpression. Don't call collect_message
2411
for unused argument positions.
2412
Reported by Nicolas François <nicolas.francois@centraliens.net>.
2414
* x-perl.c (extract_balanced): Remove unused variable.
2416
2006-09-06 Bruno Haible <bruno@clisp.org>
2418
* msgl-iconv.c: Include xstriconv.h instead of iconvstring.h.
2419
(convert_string, convert_msgstr, iconvable_string, iconvable_msgstr):
2420
Use xmem_cd_iconv instead of iconv_string.
2421
* recode-sr-latin.c: Include xstriconv.h instead of iconvstring.h.
2422
(process): Use xmem_cd_iconv instead of iconv_string.
2424
2006-09-04 Bruno Haible <bruno@clisp.org>
2426
* Makefile.am (msginit_SOURCES): Add ../../gettext-runtime/intl/lock.c.
2427
Reported by Aaron Williams <aaron_williams@net.com>.
2429
2006-08-28 Bruno Haible <bruno@clisp.org>
2431
* x-scheme.c (read_object): Don't call arglist_parser_remember if
2433
* x-elisp.c (read_object): Likewise.
2434
* x-librep.c (read_object): Likewise.
2435
* x-lisp.c (read_object): Likewise.
2436
Reported by Kevin Ryde <user42@zip.com.au>.
2438
2006-08-16 Bruno Haible <bruno@clisp.org>
2440
* plural-table.c (plural_table): Put Hungarian under nplurals=2.
2441
Reported by Arpad Biro <biro_arpad@yahoo.com> and
2442
Gabor Kelemen <kelemeng@gnome.hu>.
2444
2006-08-16 Bruno Haible <bruno@clisp.org>
2446
* read-mo.c: Include stdbool.h, stdlib.h, format.h.
2447
(read_mo_file): Mark messages with system-dependent segments as
2448
"#, c-format" or "#, objc-format", as appropriate.
2449
Reported by Egmont Koblinger <egmont@uhulinux.hu>.
2451
2006-08-07 Bruno Haible <bruno@clisp.org>
2453
* xgettext.c (remember_a_message): Use the position passed as argument
2454
instead of a dummypos.
2455
Reported by Paul Eggert <eggert@cs.ucla.edu>.
2457
2006-08-01 Bruno Haible <bruno@clisp.org>
2459
Fix behaviour of msgmerge when the PO file and the compendium are
2460
in different encodings.
2461
* msgl-iconv.h (is_message_list_iconvable): New declaration.
2462
* msgl-iconv.c (iconvable_string, iconvable_string_list,
2463
iconvable_msgid, iconvable_msgstr, is_message_list_iconvable): New
2465
* msgmerge.c: Include xallocsa.h.
2466
(merge): In the case that the .pot file is ASCII, not UTF-8, convert
2467
the definitions and the compendia contents to a common encoding.
2468
Reported by Stanislav Brabec <sbrabec@suse.cz>.
2470
2006-07-30 Bruno Haible <bruno@clisp.org>
2472
* Makefile.am (AM_CPPFLAGS, LDADD, libgettextsrc_la_LDFLAGS,
2473
libgettextpo_la_LDFLAGS, recode_sr_latin_LDADD, RELOCATABLE_SRC_DIR,
2474
RELOCATABLE_BUILD_DIR): Replace ../lib with ../gnulib-lib.
2475
(JAVACOMP, CSHARPCOMP): Remove lib/ from pathname.
2477
2006-07-30 Bruno Haible <bruno@clisp.org>
2479
* msgl-cat.c: Include c-strstr.h instead of strstr.h.
2480
(catenate_msgdomain_list): Use c_strstr instead of strstr.
2481
* msgl-charset.c: Include c-strstr.h instead of strstr.h.
2482
(compare_po_locale_charsets): Use c_strstr instead of strstr.
2483
* msgl-check.c: Include c-strstr.h instead of strstr.h.
2484
(plural_help, check_plural, check_header_entry): Use c_strstr instead
2486
* msgl-iconv.c: Include c-strstr.h instead of strstr.h.
2487
(iconv_message_list): Use c_strstr instead of strstr.
2488
* po-charset.c: Include c-strstr.h instead of strstr.h.
2489
(po_lex_charset_set): Use c_strstr instead of strstr.
2490
* write-po.c: Include c-strstr.h instead of strstr.h.
2491
(msgdomain_list_print_po): Use c_strstr instead of strstr.
2492
* write-stringtable.c: Include c-strstr.h instead of strstr.h.
2493
(write_message): Use c_strstr instead of strstr.
2494
* msgcmp.c: Include c-strstr.h instead of strstr.h.
2495
(compare): Use c_strstr instead of strstr.
2496
* msginit.c: Include c-strstr.h instead of strstr.h.
2497
(content_type): Use c_strstr instead of strstr.
2498
* msgmerge.c: Include c-strstr.h instead of strstr.h.
2499
(message_merge, merge): Use c_strstr instead of strstr.
2500
* x-python.c: Include c-strstr.h instead of strstr.h.
2501
(try_to_extract_coding): Use c_strstr instead of strstr.
2502
* xgettext.c: Include c-strstr.h instead of strstr.h.
2503
(remember_a_message, finalize_header): Use c_strstr instead of strstr.
2505
2006-07-23 Bruno Haible <bruno@clisp.org>
2507
Exploit CPUs with multiple execution units.
2508
* msgmerge.c: Include lock.h.
2509
(struct definitions_ty): Add 'findex_init_lock' field.
2510
(definitions_init): Initialize it.
2511
(definitions_init_findex): Ensure findex is initialized by the
2512
first thread who attempts so.
2513
(match_domain): Split the main loop into two. Parallelize the first
2514
loop using OpenMP pragmas.
2515
* Makefile.am (msgmerge_CFLAGS): New variable.
2516
(msgmerge_LDADD): Add OPENMP_CFLAGS.
2518
2006-07-25 Bruno Haible <bruno@clisp.org>
2520
* Makefile.msvc: Remove file.
2521
* Makefile.am (EXTRA_DIST): Remove Makefile.msvc.
2523
2006-07-25 Bruno Haible <bruno@clisp.org>
2525
* Makefile.vms: Remove file.
2526
* Makefile.am (EXTRA_DIST): Remove Makefile.vms.
2528
2006-07-24 Bruno Haible <bruno@clisp.org>
2530
* Makefile.am (include_HEADERS): Remove variable.
2531
(nodist_include_HEADERS): New variable.
2532
Suggested by Ralf Corsepius <rc040203@freenet.de>.
2534
2006-07-21 Bruno Haible <bruno@clisp.org>
2536
* gettext-0.15 released.
2538
2006-07-20 Bruno Haible <bruno@clisp.org>
2540
* gettext-po.h.in (LIBGETTEXTPO_VERSION): Bump version number.
2542
2006-07-20 Bruno Haible <bruno@clisp.org>
2544
* Makefile.am (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 2:0:2.
2546
2006-07-14 Bruno Haible <bruno@clisp.org>
2548
* Makefile.am (MOSTLYCLEANFILES): New variable.
2550
2006-07-02 Bruno Haible <bruno@clisp.org>
2552
* write-csharp.c (msgdomain_write_csharp): Update.
2553
* write-java.c (msgdomain_write_java): Update.
2555
2006-06-29 Bruno Haible <bruno@clisp.org>
2557
* write-csharp.c (msgdomain_write_csharp): Update.
2558
* write-java.c (msgdomain_write_java): Likewise.
2560
2006-06-28 Bruno Haible <bruno@clisp.org>
2562
Assume <dirent.h> on all Unix platforms. Assume closedir works.
2563
* msginit.c: Don't include <sys/ndir.h>, <sys/dir.h>, <ndir.h>.
2564
(find_pot): Use closedir directly.
2566
2006-06-27 Bruno Haible <bruno@clisp.org>
2568
Assume correct S_ISDIR macro.
2569
* write-csharp.c: Remove test of STAT_MACROS_BROKEN.
2570
* write-java.c: Likewise.
2572
2006-04-14 Bruno Haible <bruno@clisp.org>
2574
Assume autoconf >= 2.60.
2575
* Makefile.am (localedir): Remove variable.
2577
2006-06-21 Bruno Haible <bruno@clisp.org>
2579
* x-sh.c (read_word): Recognize the Bash process substitution syntax.
2581
2006-06-21 Bruno Haible <bruno@clisp.org>
2583
* x-sh.c (read_word): Recognize $(...) and $((...)) also inside
2584
double-quoted strings.
2585
Reported by Michelle Konzack <linux4michelle@freenet.de>.
2587
2006-06-04 Bruno Haible <bruno@clisp.org>
2589
* msgl-check.c (check_plural_eval): Declare 'distribution' as volatile,
2590
so that it is unaffected by longjmp.
2592
2006-06-04 Bruno Haible <bruno@clisp.org>
2594
* xgettext.c (arglist_parser_done): Cast length argument for format
2597
2006-05-31 Bruno Haible <bruno@clisp.org>
2599
* x-ycp.c (phase5_pushback, phase5_pushback_length): New variables.
2600
(phase5_get): Renamed from x_ycp_lex.
2601
(phase5_unget): New function.
2602
(phase8_get): New function.
2603
(extract_parenthesized): Inside i18n construct, use phase8_get
2604
instead of phase5_get.
2605
Reported by Karl Eichwalder <ke@suse.de>.
2607
2006-05-22 Bruno Haible <bruno@clisp.org>
2609
* msgfilter.c: Include <sys/select.h> also on Minix.
2610
Reported by Leonard den Ottolander <leonard@den.ottolander.nl>.
2612
2006-05-17 Bruno Haible <bruno@clisp.org>
2615
* hostname.c (WIN32_NATIVE): Renamed from WIN32.
2617
2006-05-16 Bruno Haible <bruno@clisp.org>
2619
* Makefile.am (CLEANFILES): Add gettext-po.h.
2621
2006-05-16 Bruno Haible <bruno@clisp.org>
2623
* xgettext.c (main): Use a size_t index variable for looping over the
2625
(arglist_parser_done): Fix a format string.
2627
2006-05-16 Bruno Haible <bruno@clisp.org>
2629
* msgfilter.c (main): Change type of i.
2631
2006-05-15 Bruno Haible <bruno@clisp.org>
2633
* Makefile.am: Test flag WOE32DLL instead of CYGWINDLL.
2635
2006-05-14 Bruno Haible <bruno@clisp.org>
2637
* x-php.c (x_php_lex): Fix handling of here documents.
2638
Reported by Gaëtan Frenoy <gaetan@frenoy.net>.
2640
2006-05-12 Bruno Haible <bruno@clisp.org>
2642
* write-csharp.c [MINGW]: Include <io.h>.
2643
(mkdir): Define using _mkdir.
2644
* write-java.c [MINGW]: Include <io.h>.
2645
(mkdir): Define using _mkdir.
2647
2006-05-11 Bruno Haible <bruno@clisp.org>
2649
* gettext-po.h.in: Renamed from gettext-po.h.
2650
* Makefile.am: Treat condition WOE32DLL like MINGW. Update file names.
2651
(libgettextsrc_la_SOURCES, libgettextsrc_la_LDFLAGS): Modify for
2653
libgettextpo_la_SOURCES, libgettextpo_la_LDFLAGS): Likewise.
2654
(BUILT_SOURCES): Add gettext-po.h.
2655
(EXTRA_DIST): Add gettext-po.h.in.
2656
(gettext-po.h): New rule.
2658
2006-05-11 Bruno Haible <bruno@clisp.org>
2660
* Makefile.am (format_CFLAGS): Remove variable.
2661
(format.lo): Remove variable.
2662
(FORMAT_SOURCE) [MINGW]: Use ../mingw/c++format.cc instead of format.c.
2664
2006-05-09 Bruno Haible <bruno@clisp.org>
2666
* plural-eval.h (USE_SIGINFO): Don't define on Cygwin.
2668
2006-05-02 Charles Wilson <cygwin@cwilson.fastmail.fm>
2670
* write-mo.h: Remove DLL_VARIABLE declarations, not needed since
2671
write-mo.c is not compiled into a shared library.
2672
* lang-table.h: Likewise.
2674
2006-05-02 Charles Wilson <cygwin@cwilson.fastmail.fm>
2676
* filters.h: Add C++ guards.
2678
2006-05-07 Bruno Haible <bruno@clisp.org>
2680
* x-perl.c (extract_variable): Fix syntax error introduced on
2683
2006-05-07 Bruno Haible <bruno@clisp.org>
2685
* format-awk.c: Include xvasprintf.h instead of xerror.h.
2686
* format-elisp.c: Likewise.
2687
* format-librep.c: Likewise.
2688
* format-pascal.c: Likewise.
2689
* format-php.c: Likewise.
2690
* format-tcl.c: Likewise.
2692
2006-04-30 Bruno Haible <bruno@clisp.org>
2694
* write-java.c (msgdomain_write_java): Specify source-version 1.3 and
2695
require target-version 1.1.
2697
2006-04-30 Bruno Haible <bruno@clisp.org>
2699
* msginit.c (main): Simplify by use of xasprintf().
2700
* write-java.c: Include xvasprintf.h.
2701
(msgdomain_write_java): Simplify by use of xasprintf().
2702
* x-c.c: Include xvasprintf.h.
2703
(phase8a_get): Simplify by use of xasprintf().
2704
* xgettext.c: Don't include stpcpy.h.
2705
(remember_a_message, remember_a_message_plural): Simplify by use of
2708
2006-04-30 Bruno Haible <bruno@clisp.org>
2710
* msgfmt.c: Include xvasprintf.h.
2711
* msginit.c: Likewise.
2712
* msgl-cat.c: Likewise.
2713
* msgl-charset.c: Likewise.
2714
* po-xerror.c: Likewise.
2715
* x-csharp.c: Likewise.
2716
* x-glade.c: Likewise.
2717
* x-python.c: Likewise.
2718
* xgettext.c: Likewise.
2719
* format-boost.c: Include xvasprintf.h instead of xerror.h.
2720
* format-c.c: Likewise.
2721
* format-csharp.c: Likewise.
2722
* format-gcc-internal.c: Likewise.
2723
* format-java.c: Likewise.
2724
* format-lisp.c: Likewise.
2725
* format-perl.c: Likewise.
2726
* format-python.c: Likewise.
2727
* format-qt.c: Likewise.
2728
* format-scheme.c: Likewise.
2729
* format-ycp.c: Likewise.
2730
* msgexec.c: Likewise.
2731
* msgl-check.c: Likewise.
2732
* msgl-iconv.c: Likewise.
2733
* open-po.c: Likewise.
2734
* po-charset.c: Likewise.
2735
* po-lex.c: Likewise.
2736
* po-time.c: Likewise.
2737
* read-po-abstract.c: Likewise.
2738
* read-properties.c: Likewise.
2739
* read-stringtable.c: Likewise.
2740
* write-po.c: Likewise.
2742
2006-04-30 Bruno Haible <bruno@clisp.org>
2744
* msginit.c (project_id, project_id_version, get_user_email): Close
2745
the FILE in case of I/O error.
2747
2006-04-30 Bruno Haible <bruno@clisp.org>
2749
* write-java.c (msgdomain_write_java): Don't fclose the FILE after
2750
fwriteerror signalled a failure.
2751
* write-csharp.c (msgdomain_write_csharp): Likewise.
2753
2006-04-23 Bruno Haible <bruno@clisp.org>
2755
* msgexec.c: Include <unistd.h> unconditionally.
2756
* msgfilter.c: Likewise.
2757
* msggrep.c: Likewise.
2758
* msginit.c: Likewise.
2759
* hostname.c: Likewise.
2760
* urlget.c: Likewise.
2762
2006-04-17 Bruno Haible <bruno@clisp.org>
2764
* Makefile.am: Use $(mkdir_p) instead of $(mkinstalldirs).
2766
2006-04-09 Bruno Haible <bruno@clisp.org>
2768
* write-csharp.c: Include clean-temp.h. Don't include unistd.h,
2769
mkdtemp.h, tmpdir.h, pathmax.h, fatal-signal.h, xallocsa.h.
2770
(cleanup_list): Remove variable.
2771
(cleanup): Remove function.
2772
(msgdomain_write_csharp): Simplify handling of temporary directory.
2773
* write-java.c: Include clean-temp.h. Don't include unistd.h,
2774
mkdtemp.h, tmpdir.h, pathmax.h, fatal-signal.h.
2775
(cleanup_list): Remove variable.
2776
(cleanup): Remove function.
2777
(msgdomain_write_java): Simplify handling of temporary directory.
2779
2006-04-03 Bruno Haible <bruno@clisp.org>
2781
* x-glade.c (p_XML_GetCurrentLineNumber, p_XML_GetCurrentColumnNumber):
2782
Declare differently for expat >= 2.0.0.
2783
(load_libexpat): Search for a differently library name for expat >=
2785
(do_extract_glade): Update.
2786
Reported by Mike Frysinger <vapier@gentoo.org>.
2788
2006-04-02 Bruno Haible <bruno@clisp.org>
2790
* hostname.c: Include propername.h.
2791
(main): Call proper_name.
2792
* msgattrib.c: Include propername.h.
2793
(main): Call proper_name.
2794
* msgcat.c: Include propername.h.
2795
(main): Call proper_name.
2796
* msgcmp.c: Include propername.h.
2797
(main): Call proper_name.
2798
* msgcomm.c: Include propername.h.
2799
(main): Call proper_name.
2800
* msgconv.c: Include propername.h.
2801
(main): Call proper_name.
2802
* msgen.c: Include propername.h.
2803
(main): Call proper_name.
2804
* msgexec.c: Include propername.h.
2805
(main): Call proper_name.
2806
* msgfilter.c: Include propername.h.
2807
(main): Call proper_name.
2808
* msgfmt.c: Include propername.h.
2809
(main): Call proper_name.
2810
* msggrep.c: Include propername.h.
2811
(main): Call proper_name.
2812
* msginit.c: Include propername.h.
2813
(main): Call proper_name.
2814
* msgmerge.c: Include propername.h.
2815
(main): Call proper_name.
2816
* msgunfmt.c: Include propername.h.
2817
(main): Call proper_name.
2818
* msguniq.c: Include propername.h.
2819
(main): Call proper_name.
2820
* recode-sr-latin.c: Include propername.h.
2821
(main): Call proper_name and proper_name_utf8.
2822
* urlget.c: Include propername.h.
2823
(main): Call proper_name.
2824
* xgettext.c: Include propername.h.
2825
(main): Call proper_name.
2827
2006-04-01 Bruno Haible <bruno@clisp.org>
2829
* xgettext.c (main): Treat --keyword= like --keyword.
2831
2006-03-28 Bruno Haible <bruno@clisp.org>
2833
* filters.h: New file.
2834
* filter-sr-latin.c: New file, based on code from Danilo Šegan.
2835
* recode-sr-latin.c: New file.
2836
* msgfilter.c: Include filters.h, msgl-iconv.h, po-charset.h.
2837
(filter): New variable.
2838
(main): Recognize recode-sr-latin as built-in.
2839
(generic_filter): New function, extracted from process_string.
2840
(process_string): Call the filter.
2841
* Makefile.am (bin_PROGRAMS): Add recode-sr-latin.
2842
(noinst_HEADERS): Add filters.h.
2843
(msgfilter_SOURCES): Add filter-sr-latin.c.
2844
(recode_sr_latin_SOURCES, recode_sr_latin_LDADD,
2845
recode_sr_latin_CPPFLAGS, recode_sr_latin_LDFLAGS): New variables.
2846
* Makefile.msvc (PROGRAMS): Add recode-sr-latin.exe.
2847
(msgfilter_OBJECTS): Add filter-sr-latin.obj.
2848
(recode_sr_latin_OBJECTS): New variable.
2849
(filter-sr-latin.obj, recode-sr-latin.obj): New rules.
2850
(recode-sr-latin.exe): New rule.
2851
(install): Also install recode-sr-latin.exe.
2852
(uninstall): Also uninstall recode-sr-latin.exe.
2853
* Makefile.vms (PROGRAMS): Add recode-sr-latin.exe.
2854
(msgfilter_OBJECTS): Add filter-sr-latin.obj.
2855
(recode_sr_latin_OBJECTS): New variable.
2856
(filter-sr-latin.obj, recode-sr-latin.obj): New rules.
2857
(recode-sr-latin.exe): New rule.
2858
(install): Also install recode-sr-latin.exe.
2859
(uninstall): Also uninstall recode-sr-latin.exe.
2861
2006-03-28 Bruno Haible <bruno@clisp.org>
2863
* msgl-iconv.c: Include iconvstring.h. Don't include <errno.h>.
2864
(iconv_string): Remove function, moved to ../lib/.
2866
2006-03-19 Bruno Haible <bruno@clisp.org>
2868
* xgettext.h (struct callshape): New field 'xcomments'.
2869
(struct partial_call): New field 'xcomments'.
2870
* xgettext.c (split_keywordspec): Accept the ID:ARGNUM...,"XCOMMENT"
2872
(insert_keyword_callshape): Store the xcomments from the new shape.
2873
(arglist_parser_alloc, arglist_parser_clone): Update.
2874
(arglist_parser_done): After calling remember_a_message, attach the
2875
specified extracted comments.
2876
* x-perl.c (extract_variable): Update.
2877
Suggested by Behdad Esfahbod <behdad@cs.toronto.edu>.
2879
2006-03-19 Bruno Haible <bruno@clisp.org>
2881
* xgettext.c (arglist_parser_done): Use error_at_line instead of error.
2883
2006-03-16 Bruno Haible <bruno@clisp.org>
2885
* msggrep.c (grep_task): Increment size.
2886
(long_options): Add --extracted-comment option.
2887
(main): Handle --extracted-comment option.
2888
(no_pass, usage): Update.
2889
(is_message_selected_no_invert): Implement matching on extracted
2891
Suggested by Behdad Esfahbod <behdad@cs.toronto.edu>.
2893
2006-03-16 Bruno Haible <bruno@clisp.org>
2895
Handle GNOME glib context syntax.
2896
* xgettext.h (struct callshape): Add fields argnum1_glib_context,
2897
argnum2_glib_context.
2898
(struct partial_call): Add fields argnum1_glib_context,
2899
argnum2_glib_context.
2900
* xgettext.c (split_keywordspec): Recognize suffix 'g' and set the
2901
argnum1_glib_context, argnum2_glib_context fields.
2902
(insert_keyword_callshape, arglist_parser_alloc, arglist_parser_clone):
2904
(arglist_parser_done): When suffix 'g' was specified, split off the
2905
context from the msgid and/or msgid_plural.
2906
* x-perl.c (extract_variable): Update.
2907
Suggested by Danilo Šegan <danilo@gnome.org>.
2909
2006-03-16 Bruno Haible <bruno@clisp.org>
2911
* xgettext.c (set_format_flags_from_context): Break long line.
2913
2006-03-11 Bruno Haible <bruno@clisp.org>
2915
* message.c (fuzzy_search_goal_function): Use 'volatile double'.
2917
2006-03-11 Bruno Haible <bruno@clisp.org>
2919
Speed up msgmerge with large compendia.
2920
* message.h (message_list_free): Add keep_messages argument.
2921
(message_list_list_free): Add keep_level argument.
2922
(fuzzy_search_goal_function): New declaration.
2923
(FUZZY_THRESHOLD): New macro.
2924
* message.c (message_list_free): Add keep_messages argument.
2925
(fuzzy_search_goal_function): New function, extracted from
2926
message_list_search_fuzzy_inner.
2927
(message_list_search_fuzzy_inner): Use it.
2928
(message_list_search_fuzzy): Use symbolic value FUZZY_THRESHOLD.
2929
(message_list_list_free): Comment in. Add keep_level argument.
2930
(message_list_list_search_fuzzy): Comment out. Use symbolic value
2932
(msgdomain_free): Update.
2933
(msgdomain_list_search_fuzzy): Use symbolic value FUZZY_THRESHOLD.
2934
* po-charset.h: Include stddef.h.
2935
(character_iterator_t): New type.
2936
(po_charset_character_iterator): New declaration.
2937
* po-charset.c (char_iterator, euc_character_iterator,
2938
euc_jp_character_iterator, euc_tw_character_iterator,
2939
big5_character_iterator, big5hkscs_character_iterator,
2940
gbk_character_iterator, gb18030_character_iterator,
2941
shift_jis_character_iterator, johab_character_iterator,
2942
utf8_character_iterator, po_charset_character_iterator): New functions.
2943
* msgl-fsearch.h: New file.
2944
* msgl-fsearch.c: New file.
2945
* msgmerge.c: Include po-charset.h, msgl-fsearch.h.
2946
(compendium_filenames): New variable.
2947
(compendium): Also put the filename into compendium_filenames.
2948
(definitions_ty): New structure type.
2949
(definitions_init, definitions_init_findex, definitions_current_list,
2950
definitions_set_current_list, definitions_search,
2951
definitions_search_fuzzy, definitions_destroy): New functions.
2952
(match_domain): Change type of 'definitions' argument.
2953
(merge): Also convert the compendium to UTF-8. Use definitions_init,
2954
definitions_set_current_list, definitions_destroy.
2955
* msgfmt.c (main): Update.
2956
* Makefile.am (noinst_HEADERS): Add msgl-fsearch.h.
2957
(msgmerge_SOURCES): Add msgl-fsearch.c.
2958
(msgmerge_LDADD): Link with MSGMERGE_LIBM.
2959
* Makefile.msvc (msgmerge_OBJECTS): Add msgl-fsearch.obj.
2960
(msgl-fsearch.obj): New rule.
2961
* Makefile.vms (msgmerge_OBJECTS): Add msgl-fsearch.obj.
2962
(msgl-fsearch.obj): New rule.
2963
Reported by Clytie Siddall <clytie@riverland.net.au>.
2965
2006-03-09 Bruno Haible <bruno@clisp.org>
2967
* Makefile.am (CXXLINK) [!mingw]: Overwrite automake's value. Fixes
2968
unintended dependency on libstdc++ introduced on 2005-07-05.
2970
2005-10-09 Bruno Haible <bruno@clisp.org>
2972
* lang-table.h: New file.
2973
* lang-table.c: New file, extracted from msginit.c.
2974
* msginit.c: Include lang-table.h.
2975
(englishname_of_language): Use language_table.
2976
* Makefile.am (noinst_HEADERS): Add lang-table.h.
2977
(msginit_SOURCES): Add lang-table.c.
2978
* Makefile.msvc (MSGINIT_OBJECTS): Add lang-table.obj.
2979
(lang-table.obj): New rule.
2980
* Makefile.vms (MSGINIT_OBJECTS): Add lang-table.obj.
2981
(lang-table.obj): New rule.
2983
2006-02-12 Bruno Haible <bruno@clisp.org>
2985
* message.h (format_type): New enum value 'format_boost'.
2986
(NFORMATS): Increment.
2987
* message.c (format_language): Add format_boost entry.
2988
(format_language_pretty): Likewise.
2989
* format.h (formatstring_boost): New declaration.
2990
* format-boost.c: New file, based on format-c.c.
2991
* format.c (formatstring_parsers): Add formatstring_boost.
2992
* x-c.c (init_flag_table_c): Also register flags for boost-format.
2993
* xgettext.c (flag_table_cxx_qt, flag_table_cxx_boost): New variables.
2994
(recognize_format_boost): New variable.
2995
(main): Handle --boost option.
2996
(usage): Document --boost option.
2997
(xgettext_record_flag): Also fill flag_table_cxx_qt,
2998
flag_table_cxx_boost.
2999
(remember_a_message, remember_a_message_plural): In the heuristics,
3000
don't mark a string as c-format that is already known to be a qt-format
3002
(language_to_extractor): Use a flag_table_cxx_qt or
3003
flag_table_cxx_boost that is different from flag_table_c.
3004
* Makefile.am (FORMAT_SOURCE): Add format-boost.c.
3005
* Makefile.msvc (OBJECTS): Add format-boost.obj.
3006
(format-boost.obj): New rule.
3007
* Makefile.vms (OBJECTS): Add format-boost.obj.
3008
(format-boost.obj): New rule.
3011
2006-02-12 Bruno Haible <bruno@clisp.org>
3013
* xgettext.c (xgettext_record_flag): When asked to set "qt-format",
3014
really set "qt-format", not "c-format". Fixes bug introduced on
3017
2006-02-12 Bruno Haible <bruno@clisp.org>
3019
Reduce the number of false positives produced by the c-format guessing
3021
* format.h (struct formatstring_parser): Add 'is_unlikely_intentional'
3023
* format-awk.c (formatstring_awk): Update.
3024
* format-c.c (struct spec): Add 'unlikely_unintentional' field.
3025
(format_parse): Set unlikely_unintentional to true when encountering
3026
a "%...%" directive other than "%%".
3027
(format_is_unlikely_intentional): New function.
3028
(formatstring_c, formatstring_objc): Use it.
3029
* format-csharp.c (formatstring_csharp): Update.
3030
* format-elisp.c (formatstring_elisp): Update.
3031
* format-gcc-internal.c (formatstring_gcc_internal): Update.
3032
* format-java.c (formatstring_java): Update.
3033
* format-librep.c (formatstring_librep): Update.
3034
* format-lisp.c (formatstring_lisp): Update.
3035
* format-pascal.c (formatstring_pascal): Update.
3036
* format-perl.c (formatstring_perl): Update.
3037
* format-perl-brace.c (formatstring_perl_brace): Update.
3038
* format-php.c (format_php): Update.
3039
* format-python.c (formatstring_python): Update.
3040
* format-qt.c (formatstring_qt): Update.
3041
* format-scheme.c (formatstring_scheme): Update
3042
* format-sh.c (formatstring_sh): Update.
3043
* format-tcl.c (formatstring_tcl): Update.
3044
* format-ycp.c (formatstring_ycp, formatstring_smalltalk): Update.
3045
* xgettext.c (remember_a_message, remember_a_message_plural): Don't
3046
mark the message as c-format if the validity as c-format looks
3049
2006-02-12 Bruno Haible <bruno@clisp.org>
3051
* msgattrib.c (main): Update year in --version output.
3052
* msgcat.c (main): Likewise.
3053
* msgcmp.c (main): Likewise.
3054
* msgcomm.c (main): Likewise.
3055
* msgconv.c (main): Likewise.
3056
* msgen.c (main): Likewise.
3057
* msgexec.c (main): Likewise.
3058
* msgfilter.c (main): Likewise.
3059
* msgfmt.c (main): Likewise.
3060
* msggrep.c (main): Likewise.
3061
* msginit.c (main): Likewise.
3062
* msgmerge.c (main): Likewise.
3063
* msgunfmt.c (main): Likewise.
3064
* msguniq.c (main): Likewise.
3065
* xgettext.c (main): Likewise.
3067
2006-01-25 Bruno Haible <bruno@clisp.org>
3069
* x-php.c (x_php_lex): Treat byte values >= 127 like alphabetic.
3070
Reported by Hagen Fritsch <itooktheredpill@gmx.de>.
3072
2005-12-25 Bruno Haible <bruno@clisp.org>
3074
Tell Python developers to use named arguments in format strings.
3075
* format.h (get_python_format_unnamed_arg_count): New declaration.
3076
* format-python.c (get_python_format_unnamed_arg_count): New function.
3077
* xgettext.c (warn_format_string): New function.
3078
(remember_a_message, remember_a_message_plural): Call it.
3079
Suggested by Martin von Löwis.
3081
2005-12-07 Bruno Haible <bruno@clisp.org>
3083
* msgl-iconv.c (iconv_message_list): Fix syntax error.
3084
Reported by Dave Patton <dpatton@confluence.org>.
3086
2005-12-04 Bruno Haible <bruno@clisp.org>
3088
* Makefile.am (CSHARPCOMPFLAGS): Use value set by csharpcomp.m4.
3090
2005-11-29 Colin Watson <cjwatson@ubuntu.com>
3092
* msggrep.c (invert_match): New variable.
3093
(long_options): Add --invert-match option.
3094
(main): Handle --invert-match option.
3095
(usage): Document --invert-match option.
3096
(is_message_selected_no_invert): New function, extracted from
3097
is_message_selected.
3098
(is_message_selected): Call it. Handle match inversion.
3100
2005-11-01 Bruno Haible <bruno@clisp.org>
3102
* write-csharp.c (write_csharp_code): Add culture_name argument.
3103
Emit an AssemblyCulture note for it.
3104
(msgdomain_write_csharp): Update.
3105
Suggested by Pepa <cerna.zelva@seznam.cz>.
3107
2005-10-09 Bruno Haible <bruno@clisp.org>
3109
* plural-eval.h: New file.
3110
* plural-eval.c: Include plural-eval.h.
3111
(sigfpe_exit, sigfpe_code, sigfpe_handler, install_sigfpe_handler,
3112
uninstall_sigfpe_handler): New definitions, moved here from
3114
* msgl-check.c: Include plural.eval.h.
3115
(sigjmp_buf, sigsetjmp, siglongjmp, USE_SIGINFO): Move to plural-eval.h.
3116
(sigfpe_exit, sigfpe_code, sigfpe_handler, install_sigfpe_handler,
3117
uninstall_sigfpe_handler): Move to plural-eval.c.
3118
* Makefile.am (noinst_HEADERS): Add plural-eval.h.
3120
2005-10-09 Bruno Haible <bruno@clisp.org>
3122
* msgl-check.c: Include c-ctype.h instead of ctype.h.
3123
(check_plural): Use c_isspace instead of isspace.
3124
* x-librep.c: Include c-ctype.h instead of ctype.h.
3125
(read_token): Use c_isxdigit instead of isxdigit.
3126
* x-rst.c: Include c-ctype.h instead of ctype.h.
3127
(extract_rst): Use c_isdigit instead of isdigit.
3128
* x-ycp.c: Don't include ctype.h.
3130
2005-10-09 Bruno Haible <bruno@clisp.org>
3132
* plural-exp.c: Renamed from plural.c.
3133
* Makefile.am (libgettextsrc_la_SOURCES): Update.
3135
2005-10-18 Bruno Haible <bruno@clisp.org>
3137
Disambiguate overloaded function calls according to argument count.
3138
* xgettext.h (struct callshape): Add field 'argtotal'.
3139
(struct partial_call): Likewise.
3140
(arglist_parser_done): Add argnum argument.
3141
* xgettext.c (split_keywordspec): Recognize NNt syntax and fill
3143
(insert_keyword_callshape, arglist_parser_alloc, arglist_parser_clone):
3145
(arglist_parser_decidedp): Compare also the argtotal if given.
3146
(arglist_parser_done): Add argnum argument.
3147
* x-awk.c (extract_parenthesized): Pass arg count to
3148
arglist_parser_done.
3149
* x-c.c (extract_parenthesized): Likewise.
3150
* x-csharp.c (extract_parenthesized): Likewise.
3151
* x-elisp.c (read_object): Likewise.
3152
* x-java.c (extract_parenthesized): Likewise.
3153
* x-librep.c (read_object): Likewise.
3154
* x-lisp.c (read_object): Likewise.
3155
* x-perl.c (extract_variable): Update.
3156
(extract_balanced): Pass arg count to arglist_parser_done.
3157
* x-php.c (extract_parenthesized): Likewise.
3158
* x-python.c (extract_parenthesized): Likewise.
3159
* x-scheme.c (read_object): Likewise.
3160
* x-sh.c (read_command): Likewise.
3161
* x-tcl.c (read_command): Likewise.
3162
Stimulated by a patch from
3163
Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>.
3165
2005-10-09 Bruno Haible <bruno@clisp.org>
3167
* msginit.c (catalogname_for_locale, language_of_locale): Drop support
3168
of CEN locale name syntax.
3170
2005-10-05 Bruno Haible <bruno@clisp.org>
3172
* format.h (check_msgid_msgstr_format): Add plural_distribution
3174
* format.c (check_msgid_msgstr_format): Add plural_distribution
3175
argument. Use it for index dependent strictness.
3176
* msgl-check.h (check_message): Add plural_distribution argument.
3177
* msgl-check.c: Include xalloc.h.
3178
(check_plural_eval): Create a plural_distribution array as additional
3180
(check_plural): Return plural_distribution array as additional output
3182
(check_pair, check_message): Add plural_distribution argument.
3183
(check_message_list): Pass the plural_distribution from check_plural
3185
* gettext-po.c (po_message_check_format): Update.
3187
2005-10-04 Bruno Haible <bruno@clisp.org>
3189
Combine all msgfmt checks in a single place.
3190
* format.h (check_msgid_msgstr_format): Change return type to int.
3191
* format.c (check_msgid_msgstr_format): Return the number of errors.
3192
* msgl-check.h (check_plural): Remove declaration.
3193
* msgl-check.c (check_plural): Make static. Return the number of
3195
(check_pair): Return the number of errors.
3196
(check_message_list): Likewise.
3197
* msgfmt.c (main): Perform the message checks here, after all files
3198
were read. Call check_message_list instead of check_plural and
3199
check_message. Emit statistics of fatal errors.
3200
(msgfmt_frob_new_message): Don't call check_message here.
3202
2005-10-04 Bruno Haible <bruno@clisp.org>
3204
* msgl-check.h (check_message_list): New declaration.
3205
* msgl-check.c (check_message_list): New function.
3206
* gettext-po.c (po_file_check_all, po_message_check_all): Call
3207
check_message_list instead of check_message and check_plural.
3209
2005-10-04 Bruno Haible <bruno@clisp.org>
3211
Fix handling of obsolete messages.
3212
* msgl-check.c (check_plural): Ignore obsolete messages.
3213
* gettext-po.c (po_file_check_all, po_message_check_all,
3214
po_message_check_format): Likewise.
3216
2005-10-04 Bruno Haible <bruno@clisp.org>
3218
* msgl-check.h (check_message): Remove msgstr_pos argument.
3219
* msgl-check.c (check_pair, check_message): Remove msgstr_pos argument.
3220
* msgfmt.c (msgfmt_frob_new_message): Update.
3221
* gettext-po.c (po_file_check_all, po_message_check_all,
3222
po_message_check_format): Update.
3224
2005-10-03 Bruno Haible <bruno@clisp.org>
3226
Add support for contexts in xgettext.
3227
* xgettext.h: Include stdbool.h.
3228
(struct callshape): New structure type.
3229
(split_keywordspec): Return a struct callshape, not two integers,
3231
(struct callshapes): New structure type.
3232
(insert_keyword_callshape): New declaration.
3233
(remember_a_message): Add msgctxt argument.
3234
(struct partial_call): New structure type.
3235
(struct arglist_parser): New structure type.
3236
(arglist_parser_alloc, arglist_parser_clone, arglist_parser_remember,
3237
arglist_parser_decidedp, arglist_parser_done): New declarations.
3238
* xgettext.c (split_keywordspec): Return a struct callshape, not two
3239
integers, by reference. Handle the notation Nc for a context argument.
3240
(insert_keyword_callshape): New function.
3241
(remember_a_message): Add msgctxt argument. Free both strings when
3242
the message is excluded.
3243
(arglist_parser_alloc, arglist_parser_clone, arglist_parser_remember,
3244
arglist_parser_decidedp, arglist_parser_done): New functions.
3245
* x-awk.c (x_awk_keyword): Use callshape API: split_keywordspec,
3246
insert_keyword_callshape.
3247
(extract_parenthesized): Replace commas_to_skip, plural_commas
3248
arguments with a single argparser argument. Use arglist_parser_* API.
3249
(extract_awk): Update.
3250
* x-c.c (add_keyword): Use callshape API: split_keywordspec,
3251
insert_keyword_callshape.
3252
(init_keywords): Register the new functions [d[c]][n]pgettext.
3253
(init_flag_table_c, init_flag_table_objc): Likewise.
3254
(struct xgettext_token_ty): Replace argnum1, argnum2 with a callshapes
3257
(extract_parenthesized): Replace commas_to_skip, plural_commas
3258
arguments with a single argparser argument. Use arglist_parser_* API.
3259
(extract_whole_file): Update.
3260
* x-csharp.c (x_csharp_keyword): Use callshape API: split_keywordspec,
3261
insert_keyword_callshape.
3262
(extract_parenthesized): Replace commas_to_skip, plural_commas
3263
arguments with a single argparser argument. Use arglist_parser_* API.
3264
(extract_csharp): Update.
3265
* x-elisp.c (x_elisp_keyword): Use callshape API: split_keywordspec,
3266
insert_keyword_callshape.
3267
(read_object): Use arglist_parser_* API.
3268
* x-glade.c (start_element_handler, end_element_handler): Update.
3269
* x-java.c (x_java_keyword): Use callshape API: split_keywordspec,
3270
insert_keyword_callshape.
3271
(extract_parenthesized): Replace commas_to_skip, plural_commas
3272
arguments with a single argparser argument. Use arglist_parser_* API.
3273
(extract_java): Update.
3274
* x-librep.c (x_librep_keyword): Use callshape API: split_keywordspec,
3275
insert_keyword_callshape.
3276
(read_object): Use arglist_parser_* API.
3277
* x-lisp.c (x_lisp_keyword): Use callshape API: split_keywordspec,
3278
insert_keyword_callshape.
3279
(read_object): Use arglist_parser_* API.
3280
* x-perl.c (x_perl_keyword): Use callshape API: split_keywordspec,
3281
insert_keyword_callshape.
3282
(extract_balanced): Replace arg_sg, arg_pl arguments with arg,
3283
argparser arguments. Use arglist_parser_* API.
3284
(extract_variable, interpolate_keywords, extract_perl): Update.
3285
* x-php.c (x_php_keyword): Use callshape API: split_keywordspec,
3286
insert_keyword_callshape.
3287
(extract_parenthesized): Replace commas_to_skip, plural_commas
3288
arguments with a single argparser argument. Use arglist_parser_* API.
3289
(extract_php): Update.
3290
* x-python.c (x_python_keyword): Use callshape API: split_keywordspec,
3291
insert_keyword_callshape.
3292
(extract_parenthesized): Replace commas_to_skip, plural_commas
3293
arguments with a single argparser argument. Use arglist_parser_* API.
3294
(extract_python): Update.
3295
* x-rst.c (extract_rst): Update.
3296
* x-scheme.c (x_scheme_keyword): Use callshape API: split_keywordspec,
3297
insert_keyword_callshape.
3298
(read_object): Use arglist_parser_* API.
3299
* x-sh.c (x_sh_keyword): Use callshape API: split_keywordspec,
3300
insert_keyword_callshape.
3301
(read_word): Update.
3302
(read_command): Use arglist_parser_* API.
3303
* x-smalltalk.c (extract_smalltalk): Update.
3304
* x-tcl.c (x_tcl_keyword): Use callshape API: split_keywordspec,
3305
insert_keyword_callshape.
3306
(read_command): Use arglist_parser_* API.
3307
* x-ycp.c (extract_parenthesized): Update.
3309
2005-10-03 Bruno Haible <bruno@clisp.org>
3311
* xgettext.h (savable_comment_to_xgettext_comment): Remove
3313
(remember_a_message, remember_a_message_plural): Add a comment
3315
* xgettext.c (savable_comment_to_xgettext_comment): Make static.
3316
(remember_a_message): Add comment argument. Call
3317
savable_comment_to_xgettext_comment and savable_comment_reset at the
3319
(remember_a_message_plural): Add comment argument. Call
3320
savable_comment_to_xgettext_comment and xgettext_comment_reset,
3321
savable_comment_reset at the end.
3322
* x-awk.c (extract_parenthesized): Pass comment to remember_a_message.
3323
* x-c.c (extract_parenthesized): Likewise.
3324
* x-csharp.c (extract_parenthesized): Likewise.
3325
* x-elisp.c (read_object): Likewise.
3326
* x-glade.c (start_element_handler, end_element_handler): Likewise.
3327
* x-java.c (extract_parenthesized): Likewise.
3328
* x-librep.c (read_object): Likewise.
3329
* x-lisp.c (read_object): Likewise.
3330
* x-perl.c (extract_variable, interpolate_keywords, extract_balanced):
3332
* x-php.c (extract_parenthesized): Likewise.
3333
* x-python.c (extract_parenthesized): Likewise.
3334
* x-scheme.c (read_object): Likewise.
3335
* x-sh.c (read_word, read_command): Likewise.
3336
* x-smalltalk.c (extract_smalltalk): Likewise.
3337
* x-tcl.c (read_command): Likewise.
3338
* x-ycp.c (extract_parenthesized): Likewise.
3339
* x-rst.c (extract_rst): Update.
3341
2005-10-03 Bruno Haible <bruno@clisp.org>
3343
* xgettext.h (xgettext_comment_add, xgettext_comment,
3344
xgettext_comment_reset): Remove declarations.
3345
* xgettext.c (xgettext_comment_add, xgettext_comment,
3346
xgettext_comment_reset): Make static.
3348
2005-10-03 Bruno Haible <bruno@clisp.org>
3350
Use savable_comment_* API instead of xgettext_comment_* API.
3351
* x-awk.c (phase2_getc): Call savable_comment_add instead of
3352
xgettext_comment_add.
3353
(x_awk_lex): Call savable_comment_reset instead of
3354
xgettext_comment_reset.
3355
(extract_parenthesized): Call savable_comment_to_xgettext_comment and
3356
savable_comment_reset around remember_a_message.
3357
* x-elisp.c (comment_line_end): Call savable_comment_add instead of
3358
xgettext_comment_add.
3359
(read_object): Call savable_comment_reset instead of
3360
xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3361
savable_comment_reset around remember_a_message.
3362
* x-glade.c (start_element_handler, end_element_handler): Call
3363
savable_comment_to_xgettext_comment and savable_comment_reset around
3364
remember_a_message. Call savable_comment_reset instead of
3365
xgettext_comment_reset.
3366
(comment_handler): Call savable_comment_add instead of
3367
xgettext_comment_add.
3368
* x-librep.c (comment_line_end): Call savable_comment_add instead of
3369
xgettext_comment_add.
3370
(read_object): Call savable_comment_reset instead of
3371
xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3372
savable_comment_reset around remember_a_message.
3373
* x-lisp.c (comment_line_end): Call savable_comment_add instead of
3374
xgettext_comment_add.
3375
(read_object): Call savable_comment_reset instead of
3376
xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3377
savable_comment_reset around remember_a_message.
3378
* x-perl.c (phase2_getc): Call savable_comment_add instead of
3379
xgettext_comment_add.
3380
(extract_variable, interpolate_keywords): Call
3381
savable_comment_to_xgettext_comment and savable_comment_reset around
3383
(x_perl_prelex): Call savable_comment_reset instead of
3384
xgettext_comment_reset.
3385
(extract_balanced): Call savable_comment_to_xgettext_comment and
3386
savable_comment_reset around remember_a_message.
3387
* x-php.c (comment_line_end): Call savable_comment_add instead of
3388
xgettext_comment_add.
3389
(x_php_lex): Call savable_comment_reset instead of
3390
xgettext_comment_reset.
3391
(extract_parenthesized): Call savable_comment_to_xgettext_comment and
3392
savable_comment_reset around remember_a_message.
3393
* x-scheme.c (comment_line_end): Call savable_comment_add instead of
3394
xgettext_comment_add.
3395
(read_object): Call savable_comment_reset instead of
3396
xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3397
savable_comment_reset around remember_a_message.
3398
* x-sh.c (comment_line_end): Call savable_comment_add instead of
3399
xgettext_comment_add.
3400
(read_word): Call savable_comment_reset instead of
3401
xgettext_comment_reset. Call savable_comment_to_xgettext_comment and
3402
savable_comment_reset around remember_a_message.
3403
(read_command): Call savable_comment_to_xgettext_comment and
3404
savable_comment_reset around remember_a_message.
3405
* x-smalltalk.c (comment_line_end): Call savable_comment_add instead of
3406
xgettext_comment_add.
3407
(phase2_get): Call savable_comment_reset instead of
3408
xgettext_comment_reset.
3409
(extract_smalltalk): Call savable_comment_to_xgettext_comment and
3410
savable_comment_reset around remember_a_message.
3411
* x-tcl.c (comment_line_end): Call savable_comment_add instead of
3412
xgettext_comment_add.
3413
(read_word): Call savable_comment_reset instead of
3414
xgettext_comment_reset.
3415
(read_command): Call savable_comment_to_xgettext_comment and
3416
savable_comment_reset around remember_a_message.
3417
* x-ycp.c (phase2_getc): Call savable_comment_add instead of
3418
xgettext_comment_add.
3419
(x_ycp_lex): Call savable_comment_reset instead of
3420
xgettext_comment_reset.
3421
(extract_parenthesized): Call savable_comment_to_xgettext_comment and
3422
savable_comment_reset around remember_a_message.
3424
2005-10-03 Bruno Haible <bruno@clisp.org>
3426
* message.c (message_list_hash_insert_entry): Update.
3428
2005-10-03 Bruno Haible <bruno@clisp.org>
3430
* message.c (message_list_alloc, message_list_free,
3431
message_list_hash_insert_entry, message_list_remove_if_not,
3432
message_list_msgids_changed, message_list_search): Update.
3433
* write-qt.c (write_qm): Update.
3434
* xgettext.c (flag_context_list_table_lookup,
3435
flag_context_list_table_insert): Update.
3436
* x-awk.c (x_awk_keyword, extract_parenthesized): Update.
3437
* x-c.c (add_keyword, x_c_lex): Update.
3438
* x-csharp.c (x_csharp_keyword, extract_parenthesized: Update.
3439
* x-elisp.c (x_elisp_keyword, read_object): Update.
3440
* x-glade.c (x_glade_keyword, start_element_handler): Update.
3441
* x-java.c (x_java_keyword, extract_parenthesized): Update.
3442
* x-librep.c (x_librep_keyword, read_object): Update.
3443
* x-lisp.c (x_lisp_keyword, read_object): Update.
3444
* x-perl.c (x_perl_keyword, extract_variable, interpolate_keywords,
3445
extract_balanced): Update.
3446
* x-php.c (x_php_keyword, extract_parenthesized): Update.
3447
* x-python.c (x_python_keyword, extract_parenthesized): Update.
3448
* x-scheme.c (x_scheme_keyword, read_object): Update.
3449
* x-sh.c (x_sh_keyword, read_command): Update.
3450
* x-tcl.c (x_tcl_keyword, read_command): Update.
3452
2005-10-01 Bruno Haible <bruno@clisp.org>
3454
Support for context dependent translations in PO files.
3455
* message.h (MSGCTXT_SEPARATOR): New macro.
3456
(struct message_ty): Add 'msgctxt' field.
3457
(message_alloc): Add msgctxt argument.
3458
(is_header): New macro.
3459
(message_list_search, message_list_search_fuzzy,
3460
message_list_list_search, message_list_list_search_fuzzy,
3461
msgdomain_list_search, msgdomain_list_search_fuzzy): Add msgctxt
3463
* message.c: Include xallocsa.h.
3464
(message_alloc): Add msgctxt argument.
3465
(message_copy): Update.
3466
(message_list_hash_insert_entry): New function.
3467
(message_list_append, message_list_prepend, message_list_insert_at,
3468
message_list_msgids_changed): Use it.
3469
(message_list_search): Add msgctxt argument.
3470
(message_list_search_fuzzy_inner): Likewise.
3471
(message_list_search_fuzzy): Likewise.
3472
(message_list_list_search): Likewise.
3473
(message_list_list_search_fuzzy): Likewise.
3474
* msgl-ascii.c (is_ascii_message): Also test the msgctxt.
3475
* write-po.c (message_print): Warn if some msgctxt has non-ASCII
3476
characters. Write out the msgctxt.
3477
(message_print_obsolete): Likewise.
3478
(msgdomain_list_print_po): Use is_header macro.
3479
(msgdomain_list_print): Likewise. Bail out if contexts are present and
3480
cannot be stored in the given output format.
3481
* write-properties.c (write_message): Use is_header macro.
3482
* po-lex.c: Include message.h.
3483
(keyword_p): Also recognize 'msgctxt'.
3484
(po_gram_lex): Bail out if a string contains the EOT character.
3485
* read-po-abstract.h (struct abstract_po_reader_class_ty): Add msgctxt
3486
argument to directive_message function pointer.
3487
(po_callback_message): Add msgctxt argument.
3488
* read-po-abstract.c (call_directive_message, po_callback_message): Add
3490
* po-gram-gen.y (do_callback_message): Add msgctxt argument. Use
3492
(MSGCTXT): New token type.
3493
(message_intro, MSGCTXT): Declare return types.
3494
(message): Use message_intro instead of just MSGID.
3495
(message_intro): New nonterminal reduction rules.
3496
* read-properties.c (properties_parse): Update.
3497
* read-stringtable.c (stringtable_parse): Update.
3498
* read-po.h (struct default_po_reader_class_ty): Add msgctxt argument
3499
to add_message field.
3500
(default_directive_message, default_add_message): Likewise.
3501
* read-po.c (call_add_message, default_directive_message,
3502
default_add_message): Add msgctxt argument.
3503
* msgl-iconv.c (convert_msgid): Also convert the msgctxt.
3504
(iconv_message_list): Use is_header macro. Test also the msgctxt for
3506
* msgl-cat.c (is_message_selected, is_message_needed): Use is_header
3508
(catenate_msgdomain_list): Likewise. Update.
3509
* msgl-equal.c (message_equal): Likewise. Also compare the msgctxt.
3510
* msgcmp.c (is_message_selected): Use is_header macro.
3511
(match_domain): Update.
3512
(compare): Use is_header macro.
3513
* msgmerge.c (message_merge, match_domain): Use is_header macro.
3516
* msgattrib.c (is_message_selected): Use is_header macro.
3517
(process_message_list): Likewise. Update.
3518
* msgl-charset.c (compare_po_locale_charsets): Use is_header macro.
3519
* msgexec.c (process_string): Also set or unset MSGEXEC_MSGCTXT
3521
* msgfilter.c (process_message): Use is_header macro.
3522
* msggrep.c (grep_task): Increase size from 3 to 4.
3523
(long_options): Add --msgctxt option.
3524
(main): Accept -J/--msgctxt option. Update grep_pass numbers.
3526
(usage): Mention -J option.
3527
(is_message_selected): Use is_header macro. Perform a new grep pass on
3529
* msginit.c (fill_header): Use is_header macro. Update.
3530
(update_msgstr_plurals): Update.
3531
* read-mo.c (read_mo_file): Split msgid into msgctxt and msgid. Update.
3532
* read-tcl.c (msgdomain_read_tcl): Use is_header macro.
3533
* msgl-check.c (check_plural): Update.
3534
(check_message): Use is_header macro.
3535
* write-mo.c (write_table): Write msgid with msgctxt, instead of just
3537
* write-java.c: Include xerror.h.
3538
(write_java_code): Update.
3539
(msgdomain_write_java): Give error if some entries have a context.
3540
* write-csharp.c: Include xerror.h.
3541
(write_csharp_code): Update.
3542
(msgdomain_write_csharp): Give error if some entries have a context.
3543
* write-resources.c (msgdomain_write_csharp_resources): Bail out if
3544
contexts are present and cannot be stored in the given output format.
3545
* write-tcl.c (write_msg): Use is_header macro.
3546
(msgdomain_write_tcl): Bail out if contexts are present and cannot be
3547
stored in the given output format.
3548
* write-qt.c: Include hash.h.
3549
(write_qm): Use is_header macro. Write out msgctxt if present. Write
3550
a contexts section if appropriate.
3551
* msgfmt.c (msgfmt_add_message): Add msgctxt argument.
3552
(msgfmt_frob_new_message): Use is_header macro.
3553
* xgettext.c (exclude_directive_message): Add msgctxt argument.
3554
(remember_a_message, construct_header, finalize_header): Update.
3555
* x-po.c (extract_add_message): Add msgctxt argument. Update.
3557
* gettext-po.h (po_message_msgctxt, po_message_set_msgctxt): New
3559
* gettext-po.c (po_file_domain_header): Use is_header macro.
3560
(po_message_create): Update.
3561
(po_message_msgctxt, po_message_set_msgctxt): New functions.
3562
(po_message_check_all): Use is_header macro.
3564
2005-10-01 Bruno Haible <bruno@clisp.org>
3566
Avoid a crash when msgcat or msgconv is asked to convert a non-ASCII
3568
* msgl-iconv.h (iconv_message_list): Change return type to boolean.
3569
* msgl-iconv.c (iconv_message_list): Likewise. Return true if some
3571
* msgl-cat.c (catenate_msgdomain_list): Exit with an error message if
3572
the msgids change through charset conversion.
3574
2005-10-04 Bruno Haible <bruno@clisp.org>
3576
* format.c: Include stdbool.h.
3577
(check_msgid_msgstr_format): Enable strict checking also when
3578
msgid_plural is present but nplurals = 1.
3579
Reported by Farzaneh Sarafraz <farzaneh@farsiweb.info>.
3581
2005-10-01 Bruno Haible <bruno@clisp.org>
3583
Change msgattrib to no longer remove extracted comments and file
3584
positions when marking messages obsolete.
3585
* msgmerge.c (merge): When marking a message obsolete, remove the
3586
extracted comments and file positions.
3587
* write-po.c (message_print_obsolete): Also print the extracted
3588
comments and file positions.
3590
2005-09-25 Bruno Haible <bruno@clisp.org>
3592
Support for Python source encodings (PEP 0263).
3593
* x-python.c: Include progname.h, basename.h, xerror.h, strstr.h,
3594
c-ctype.h, utf8-ucs4.h.
3595
(phase1_pushback): Reduce size.
3597
(phase2_pushback, phase2_pushback_length): New variables.
3598
(phase2_getc, phase2_ungetc): New functions.
3599
(struct unicode_string_buffer): New structure type.
3600
(init_unicode_string_buffer, unicode_string_buffer_append_unicode_grow,
3601
unicode_string_buffer_append_unicode, unicode_string_buffer_result,
3602
free_unicode_string_buffer): New functions.
3603
(comment_buffer): New variable.
3604
(buffer, bufmax, buflen): Remove variables.
3605
(comment_start, comment_add, comment_line_end): Rewritten.
3606
(comment_at_start): New function.
3607
(xgettext_current_file_source_encoding): New variable.
3608
(xgettext_current_file_source_iconv): New variable.
3609
(set_current_file_source_encoding, try_to_extract_coding): New
3611
(continuation_or_nonblank_line): New variable.
3612
(phase3_getc): Renamed from phase2_getc. Use phase2_getc instead of
3613
phase1_getc. Return a Unicode character. Call try_to_extract_coding
3614
when seeing a comment among the first two lines.
3615
(phase3_ungetc): Renamed from phase2_ungetc. Use phase2_ungetc instead
3617
(UNICODE, IS_UNICODE, UNICODE_VALUE): New macros.
3618
(struct mixed_string_buffer): New structure type.
3619
(init_mixed_string_buffer, mixed_string_buffer_append_byte,
3620
mixed_string_buffer_append_unicode_grow,
3621
mixed_string_buffer_append_unicode,
3622
mixed_string_buffer_flush_utf16_surr,
3623
mixed_string_buffer_flush_curr_buffer, mixed_string_buffer_append,
3624
mixed_string_buffer_result, free_mixed_string_buffer): New functions.
3625
(phase7_getuc): Use phase2_getc instead of phase1_getc. Return a
3626
Unicode character except for \ooo and \xnn.
3627
(phase5_get): Operate on the level of Unicode characters instead of
3628
at the level of bytes. Use a mixed_string_buffer to accumulate a
3630
(extract_parenthesized): Set xgettext_current_source_encoding to UTF-8
3631
while passing UTF-8 strings to the xgettext main code.
3632
(extract_python): Initialize xgettext_current_file_source_encoding and
3633
xgettext_current_source_encoding.
3635
2005-09-25 Bruno Haible <bruno@clisp.org>
3637
* x-csharp.c (phase2_getc): Fix mis-use of iconv() when the source
3638
encoding is neither ASCII nor UTF-8.
3640
2005-09-20 Bruno Haible <bruno@clisp.org>
3642
* msgattrib.c (main): Invoke bindtextdomain for bison-runtime.
3643
* msgcat.c (main): Likewise.
3644
* msgcmp.c (main): Likewise.
3645
* msgcomm.c (main): Likewise.
3646
* msgconv.c (main): Likewise.
3647
* msgen.c (main): Likewise.
3648
* msgexec.c (main): Likewise.
3649
* msgfilter.c (main): Likewise.
3650
* msggrep.c (main): Likewise.
3651
* msginit.c (main): Likewise.
3652
* msgmerge.c (main): Likewise.
3653
* msgunfmt.c (main): Likewise.
3654
* msguniq.c (main): Likewise.
3655
* xgettext.c (main): Likewise.
3656
* Makefile.am (DEFS): Also define BISON_LOCALEDIR.
3658
2005-09-17 Bruno Haible <bruno@clisp.org>
3660
* msgl-check.h: New file.
3661
* msgl-check.c: New file, mostly extracted from msgfmt.c.
3662
* Makefile.am (noinst_HEADERS): Add msgl-check.h.
3663
(libgettextsrc_la_SOURCES): Add msgl-check.c, plural-eval.c.
3664
(msgfmt_SOURCES): Remove plural-eval.c.
3665
* format.c (check_msgid_msgstr_format): Add const to argument type.
3666
* format.h (check_msgid_msgstr_format): Add const to argument type.
3667
* gettext-po.c: Include msgl-check.h.
3668
(po_file_check_all, po_message_check_all): New functions.
3669
(po_xerror_logger): Remove function.
3670
(po_message_check_format): Use new check_message function.
3671
* gettext-po.h (po_file_check_all, po_message_check_all): New
3673
* msgfmt.c: Include msgl-check.h instead of setjmp.h, signal.h,
3674
stdarg.h, po-xerror.h, format.h, plural-exp.h, plural-table.h,
3676
(SIZEOF, sigjmp_buf, sigsetjmp, siglongjmp, USE_SIGINFO,
3677
sigfpe_exit, sigfpe_code, sigfpe_handler, install_sigfpe_handler,
3678
uninstall_sigfpe_handler, check_plural_eval, plural_help, check_plural,
3679
curr_mp, curr_msgid_pos, formatstring_error_logger, check_pair,
3680
check_header_entry): Move definitions to msgl-check.c.
3682
(msgfmt_frob_new_message): Call check_message instead of
3683
check_header_entry and check_pair.
3685
2005-09-17 Bruno Haible <bruno@clisp.org>
3687
Use new error handlers in libgettextpo.
3688
* gettext-po.h (PO_SEVERITY_WARNING, PO_SEVERITY_ERROR,
3689
PO_SEVERITY_FATAL_ERROR): New macros.
3690
(po_xerror_handler): New structure type.
3691
(po_xerror_handler_t): New type.
3692
(po_file_read): Change signature; version 3.
3693
(po_file_write): Change signature; version 2.
3694
(po_message_check_format): Change signature; version 2.
3695
* gettext-po.c: Include po-xerror.h.
3696
(po_file_read): New implementation. Renamed old implementation to
3698
(po_file_write): New implementation. Keep old implementation.
3699
(po_xerror_logger): New function.
3700
(po_message_check_format): New implementation. Keep old implementation.
3702
2005-09-17 Bruno Haible <bruno@clisp.org>
3704
* msgfmt.c (check_plural): Fix broken determination of max_nplurals.
3706
2005-09-17 Bruno Haible <bruno@clisp.org>
3708
New, higher-level error message output primitives.
3709
* po-xerror.h: New file.
3710
* po-xerror.c: New file.
3711
* open-po.c: Include xerror.h, po-xerror.h, not error.h.
3712
(open_po_file): Use po_xerror instead of error.
3713
* po-charset.c: Include po-xerror.h, not po-error.h.
3714
(po_lex_charset_set): Use po_xerror instead of po_multiline_warning.
3715
* po-lex.c: Include xerror.h, po-error.h, po-xerror.h.
3716
(po_gram_error, po_gram_error_at_line): Use po_xerror instead of
3717
po_error or po_error_at_line. Don't decrement error_message_count;
3718
let the caller do this instead.
3719
(mbfile_getc, lex_getc): Use po_xerror instead of po_error.
3720
* po-lex.h: Don't include po-error.h.
3721
(po_gram_error, po_gram_error_at_line): Remove optimized macros.
3722
* read-po-abstract.c: Include xerror.h, po-xerror.h.
3723
(po_scan): Use po_xerror instead of po_error.
3724
* read-po.c: Include po-xerror.h.
3725
(default_add_message): Use po_xerror2 instead of po_gram_error_at_line
3727
* read-properties.c: Include xerror.h, po-xerror.h, not exit.h.
3728
(phase1_getc, phase4_getuc): Use po_xerror instead of error.
3729
* read-stringtable.c: Include xerror.h, po-xerror.h, not exit.h.
3730
(phase1_getc, read_string, stringtable_parse): Use po_xerror instead of
3732
* write-po.c: Include po-xerror.h, not exit.h, po-error.h.
3733
(wrap): Pass the entire message as argument. Use po_xerror instead of
3735
(message_print, message_print_obsolete): Update. Use po_xerror instead
3736
of po_multiline_warning.
3737
(msgdomain_list_print): Use po_xerror instead of po_error or
3739
* msgl-iconv.h (struct conversion_context): Add 'message' field.
3740
* msgl-iconv.c: Include xerror.h, po-xerror.h, not error.h, exit.h.
3741
(conversion_error): Use po_xerror instead of error.
3742
(iconv_message_list): Likewise. Set the entire message in the
3743
conversion context before calling convert_*.
3744
(iconv_msgdomain_list): Use po_xerror instead of error.
3745
* xgettext.c (from_current_source_encoding): Set context.message.
3746
* msgfmt.c: Include po-xerror.h.
3747
(check_plural_eval): Pass the entire header as argument. Use po_xerror
3748
instead of error_at_line.
3749
(plural_help): New function, extracted from check_plural.
3750
(check_plural): Change type of local variables has_plural, min_pos,
3751
max_pos. Use po_xerror2 instead of error_at_line pairs. Use po_xerror
3752
instead of error_at_line.
3753
(curr_mp): New variable.
3754
(formatstring_error_logger): Use po_xerror instead of vfprintf.
3755
(check_pair): Take the entire message as argument. Use po_xerror
3756
instead of error_at_line. Set curr_mp before calling
3757
check_msgid_msgstr_format.
3758
(check_header_entry): Take the entire header message as argument. Use
3759
po_xerror instead of multiline_error.
3760
(msgfmt_frob_new_message): Update.
3761
* msgcmp.c (match_domain): Decrement error_message_count between two
3762
error messages that belong together.
3763
* msgmerge.c (match_domain): Decrement error_message_count between two
3764
error messages that belong together.
3765
* Makefile.am (noinst_HEADERS): Add po-xerror.h.
3766
(COMMON_SOURCE): Add po-xerror.c.
3768
2005-09-16 Bruno Haible <bruno@clisp.org>
3770
* gettext-po.c (po_file_read): Set gram_max_allowed_errors to a large
3771
integer, so that po_gram_error doesn't cause the program to exit().
3773
2005-09-14 Bruno Haible <bruno@clisp.org>
3775
* x-csharp.c: Include xerror.h.
3777
2005-09-11 Bruno Haible <bruno@clisp.org>
3779
* user-email.sh.in: Add support for Mozilla Thunderbird and GNOME
3780
Evolution 2. Improve mutt support.
3782
2005-08-26 Bruno Haible <bruno@clisp.org>
3784
* plural-table.c (plural_table): Add an entry about Romanian.
3785
Explanations by Eddy Petrişor <eddy.petrisor@gmail.com>.
3787
2005-08-23 Bruno Haible <bruno@clisp.org>
3789
* write-mo.h (byteswap): New variable.
3790
* write-mo.c: Include byteswap.h.
3791
(byteswap): New variable.
3792
(BSWAP32): New macro.
3793
(write_table): If requested, byteswap all 32-bit values before writing
3795
* msgfmt.c (long_options): Add --endianness.
3796
(main): Accept --endianness argument and set byteswap.
3798
2005-08-08 Bruno Haible <bruno@clisp.org>
3800
* msginit.c (catalogname_for_locale): Add support for Old English,
3801
Hyam, Jju, Tyap, Maithili, Nahuatl, Low Saxon, Northern Sotho, Páez,
3803
(englishname_of_language): Add support for Old English, Hyam, Jju,
3804
Tyap, Kagoma, Maithili, Mayan, Nahuatl, Low Saxon, Northern Sotho,
3805
Páez, Tetum, Zapotec.
3807
2005-05-21 Bruno Haible <bruno@clisp.org>
3809
New undocumented option, used by glocale PO files.
3810
* msgfmt.c (include_fuzzies): Renamed from include_all.
3811
(include_untranslated): New variable.
3812
(long_options): Add --use-untranslated.
3813
(main): Handle --use-untranslated.
3814
(msgfmt_frob_new_message): Test include_untranslated.
3815
(msgfmt_comment_special): Update.
3817
2005-07-26 Bruno Haible <bruno@clisp.org>
3819
* user-email.sh.in (datarootdir): New variable.
3821
2005-07-26 Bruno Haible <bruno@clisp.org>
3823
Fix compilation error on systems without iconv().
3824
* xgettext.c (convert_string): Remove fallback macro definition.
3825
(from_current_source_encoding) [!HAVE_ICONV]: Just abort here.
3827
2005-07-17 Bruno Haible <bruno@clisp.org>
3829
* po-lex.c (mb_width): Remove gcc warnings on platform with unsigned
3830
'char' type (e.g. Linux/PowerPC).
3831
Reported by Jeff Rizzo <riz@netbsd.org>.
3833
2005-07-05 Bruno Haible <bruno@clisp.org>
3835
* Makefile.am (msgmerge_SOURCES, xgettext_SOURCES, msgattrib_SOURCES,
3836
msgcat_SOURCES, msgcomm_SOURCES, msgconv_SOURCES, msgen_SOURCES,
3837
msgfilter_SOURCES, msggrep_SOURCES, msguniq_SOURCES): On mingw, use
3839
(libgettextsrc_la_LDFLAGS, libgettextpo_la_LDFLAGS): Use LTNOUNDEF.
3840
(format_CFLAGS): New variable.
3841
(format.lo): New rule.
3842
(msg*_CFLAGS, xgettext_CFLAGS): Remove variables.
3843
(msg*_CPPFLAGS, xgettext_CPPFLAGS): New variables.
3845
2005-05-27 Bruno Haible <bruno@clisp.org>
3847
* write-po.c (wrap): Output \a and \v as an escape sequence, like
3849
Suggested by Asgeir Frimannsson <asgeirf@redhat.com>.
3851
2005-05-05 Bruno Haible <bruno@clisp.org>
3853
* Makefile.am (msgfmt_SOURCES): Add hash-string.c.
3854
* Makefile.msvc (msgfmt_OBJECTS): Add hash-string.obj.
3855
(hash-string.obj): New rule.
3856
* Makefile.vms (msgfmt_OBJECTS): Add hash-string.obj.
3857
(hash-string.obj): New rule.
3859
2005-05-01 Bruno Haible <bruno@clisp.org>
3861
* x-sh.c (open_singlequote_terminator): New variable.
3862
(saw_opening_singlequote): Set it.
3863
(phase2_getc): Handle the case of open_singlequote_terminator == '"'.
3864
(read_word): Likewise. Treat i18n quotes like single quotes with
3866
Reported by Jakub Bogusz <qboosh@pld-linux.org>.
3868
2005-05-01 Bruno Haible <bruno@clisp.org>
3870
Improved error message.
3871
* msgl-iconv.h (struct conversion_context): New type.
3872
(convert_string): Add context argument.
3873
* msgl-iconv.c (conversion_error): New function.
3874
(convert_string, convert_string_list, convert_msgid, convert_msgstr):
3875
Add context argument.
3876
(iconv_message_list): Construct context for them.
3877
* xgettext.c (convert_string): Add context argument.
3878
(from_current_source_encoding): Construct context for convert_string.
3879
Reported by Hans Ulrich Niedermann <debian@n-dimensional.de>.
3881
2005-04-18 Bruno Haible <bruno@clisp.org>
3883
* po-lex.h (po_gram_error, po_gram_error_at_line): Test for
3884
__APPLE_CC__ > 1. Needed because gcc-4.0 defines __APPLE_CC__ and
3885
implements __VA_ARGS__ correctly.
3886
* po-lex.c (po_gram_error, po_gram_error_at_line): Likewise.
3887
* read-stringtable.c (phase2_getc): Optimize UTF-8 code. Avoids
3890
2006-06-21 Bruno Haible <bruno@clisp.org>
3892
* gettext-0.14.6 released.
3894
2006-06-21 Bruno Haible <bruno@clisp.org>
3896
* Makefile.am (CLEANFILES): Add msgfmt.net.exe.mdb,
3897
msgunfmt.net.exe.mdb.
3899
2006-06-21 Bruno Haible <bruno@clisp.org>
3901
* gettext-po.h (LIBGETTEXTPO_VERSION): Bump version number.
3903
2006-06-20 Bruno Haible <bruno@clisp.org>
3905
* format-gcc-internal.c (struct unnumbered_arg): Remove type.
3906
(struct numbered_arg): New type.
3907
(struct spec): Use it.
3908
(isdigit): New macro.
3909
(numbered_arg_compare): New function.
3910
(format_parse, format_free, format_check, format_print): Update to
3911
GCC 4.1 internal format strings.
3912
Reported by Göran Uddeborg <goeran@uddeborg.se>.
3914
2005-05-23 Bruno Haible <bruno@clisp.org>
3916
* gettext-0.14.5 released.
3918
2005-05-23 Bruno Haible <bruno@clisp.org>
3920
* gettext-po.h (LIBGETTEXTPO_VERSION): Bump version number.
3922
2005-05-21 Bruno Haible <bruno@clisp.org>
3924
* format-gcc-internal.c: Update for GCC 4.0.
3925
(FAT_POINTER, FAT_SIZE_LONGLONG, FAT_SIZE_WIDE, FAT_SIZE_MASK): New
3928
(struct spec): Add uses_err_no field.
3929
(format_parse): Initialize uses_err_no field. Handle %q flag. Handle
3930
'll', 'w' size specifiers. Handle %<, %>, %', %m, %p, %J directives.
3931
(format_check): Also check that the use of err_no is the same.
3932
Based on a patch by Jakub Jelinek <jakub@redhat.com>.
3934
2005-04-11 Bruno Haible <bruno@clisp.org>
3936
* gettext-0.14.4 released.
3938
2005-04-11 Bruno Haible <bruno@clisp.org>
3940
* gettext-po.h (LIBGETTEXTPO_VERSION): Bump version number.
3942
2005-03-14 Bruno Haible <bruno@clisp.org>
3944
* gettext-0.14.3 released.
3946
2005-03-08 Bruno Haible <bruno@clisp.org>
3948
* gettext-po.h (LIBGETTEXTPO_VERSION): Bump version number.
3950
2005-02-26 Bruno Haible <bruno@clisp.org>
3952
* format-scheme.c (format_arg_type): Add FAT_COMPLEX. Remove
3954
(make_intersected_element): Simplify also the intersection with
3956
(make_union_element): Simplify also the union with FAT_COMPLEX.
3958
(nocheck_params): Remove function.
3959
(parse_upto): Remove handling of ~W, ~<, ~>.
3960
Implement non-CL handling of ~C, ~I, ~_, ~/, ~T.
3961
Implement handling of ~Y, ~!, ~Q, ~K.
3963
2005-02-26 Bruno Haible <bruno@clisp.org>
3965
* format-scheme.c (parse_upto): Remove support for ~!.
3966
Reported by Kevin Ryde <user42@zip.com.au>.
3968
2005-02-24 Bruno Haible <bruno@clisp.org>
3970
* gettext-0.14.2 released.
3972
2005-02-12 Bruno Haible <bruno@clisp.org>
3974
* Makefile.msvc (gettextpo.lib): Link with intl.lib as well.
3976
2005-02-12 Bruno Haible <bruno@clisp.org>
3978
* Makefile.msvc (msginit_OBJECTS): Add plural-count.obj.
3979
* Makefile.vms (msginit_OBJECTS): Add plural-count.obj.
3981
2005-02-10 Bruno Haible <bruno@clisp.org>
3983
* gettext-po.h (po_header_set_field): New declaration.
3984
* gettext-po.c (po_header_set_field): New function.
3985
Suggested by Ross Golder <ross@golder.org>.
3987
2005-02-10 Bruno Haible <bruno@clisp.org>
3989
* gettext-po.h (LIBGETTEXTPO_VERSION): New macro.
3990
(libgettextpo_version): New declaration.
3991
* gettext-po.c (libgettextpo_version): New variable.
3993
2005-02-10 Bruno Haible <bruno@clisp.org>
3995
* gettext-po.h (po_message_remove_filepos, po_message_add_filepos): New
3997
* gettext-po.c (po_message_remove_filepos, po_message_add_filepos): New
3999
Suggested by Asgeir Frimannsson <asgeirf@redhat.com>.
4001
2005-02-10 Bruno Haible <bruno@clisp.org>
4003
* gettext-po.h (po_message_set_extracted_comments): New declaration.
4004
* gettext-po.c (po_message_set_extracted_comments): New function.
4005
Suggested by Asgeir Frimannsson <asgeirf@redhat.com>.
4007
2005-02-08 Bruno Haible <bruno@clisp.org>
4009
* msginit.c (get_user_email): Cast _() to 'char *', to avoid compiler
4012
2005-02-07 Bruno Haible <bruno@clisp.org>
4014
Make the tools work in the tr_TR locale.
4015
* po-charset.c: Include c-strcase.h instead of strcase.h.
4016
(po_charset_canonicalize): Use c_strcasecmp.
4017
* msgcmp.c: Include c-strcase.h instead of strcase.h.
4018
(compare): Use c_strncasecmp.
4019
* msginit.c: Include c-strcase.h instead of strcase.h.
4020
(content_type): Use c_strcasecmp.
4021
* msgmerge.c: Include c-strcase.h instead of strcase.h.
4022
(message_merge, merge): Use c_strncasecmp.
4023
* xgettext.c: Include c-strcase.h instead of strcase.h.
4024
(language_to_extractor): Use c_strcasecmp.
4025
Reported by Recai Oktaş <roktas@omu.edu.tr>.
4027
2005-02-07 Bruno Haible <bruno@clisp.org>
4029
* project-id: Use LC_ALL=C to protect range expression against
4032
2005-02-06 Bruno Haible <bruno@clisp.org>
4034
Leave #: lines with unknown syntax alone instead of turning them into
4036
* po-hash.h: Remove file.
4037
* po-hash-gen.y: Remove file.
4038
* read-po-abstract.c: Don't include po-hash.h.
4039
(po_parse_comment_filepos, po_parse_comment_solaris_filepos): New
4041
(po_callback_comment_dispatcher): Call them instead of the old
4042
po_parse_comment_filepos.
4043
* read-stringtable.c: Don't include po-hash.h.
4044
* Makefile.am (noinst_HEADERS): Remove po-hash.h, po-hash-gen.h.
4045
(COMMON_SOURCE): Remove po-hash-gen.y.
4046
(BUILT_SOURCES): Remove po-hash-gen.c, po-hash-gen.h.
4047
* Makefile.msvc (OBJECTS): Remove po-hash-gen.obj.
4048
(po-hash-gen.obj): Remove rule.
4049
* Makefile.vms (OBJECTS): Remove po-hash-gen.obj.
4050
(po-hash-gen.obj): Remove rule.
4052
Reported by David Fraser <davidf@sjsoft.com>.
4054
2005-02-04 Bruno Haible <bruno@clisp.org>
4056
* plural-table.c (plural_table): Add an entry about Vietnamese.
4057
Explanations by Clytie Siddall <clytie@riverland.net.au>.
4059
2005-01-29 Bruno Haible <bruno@clisp.org>
4061
* Makefile.am (msgcmp_LDADD, msgfmt_LDADD, msgmerge_LDADD,
4062
msgunfmt_LDADD, xgettext_LDADD, msgattrib_LDADD, msgcat_LDADD,
4063
msgcomm_LDADD, msgconv_LDADD, msgen_LDADD, msgexec_LDADD,
4064
msgfilter_LDADD, msggrep_LDADD, msguniq_LDADD): Add INTL_MACOSX_LIBS.
4066
2005-01-27 Bruno Haible <bruno@clisp.org>
4068
* msgfmt.c (formatstring_error_logger): Cast the fprrintf argument,
4069
to make it work on big-endian 64-bit machines.
4071
2005-01-16 Bruno Haible <bruno@clisp.org>
4074
* message.h (format_type): New enum value 'format_scheme'.
4075
(NFORMATS): Increment.
4076
* message.c (format_language): Add format_scheme entry.
4077
(format_language_pretty): Likewise.
4078
* format.h (formatstring_scheme): New declaration.
4079
* format-scheme.c: New file, based on format-lisp.c.
4080
* format.c (formatstring_parsers): Add formatstring_scheme.
4081
* x-scheme.h: New file.
4082
* x-scheme.c: New file.
4083
* xgettext.c: Include x-scheme.h.
4084
(flag_table_scheme): New variable.
4085
(main): Invoke init_flag_table_scheme, x_scheme_extract_all,
4087
(usage): Mention Scheme source language.
4088
(xgettext_record_flag): Handle format_scheme.
4089
(language_to_extractor): Add Scheme rule.
4090
(extension_to_language): Add Scheme rule.
4091
* Makefile.am (noinst_HEADERS): Add x-scheme.h.
4092
(FORMAT_SOURCE): Add format-scheme.c.
4093
(xgettext_SOURCES): Add x-scheme.c.
4094
* Makefile.msvc (OBJECTS): Add format-scheme.obj.
4095
(xgettext_OBJECTS): Add x-scheme.obj.
4096
(format-scheme.obj, x-scheme.obj): New rules.
4097
* Makefile.vms (OBJECTS): Add format-scheme.obj.
4098
(xgettext_OBJECTS): Add x-scheme.obj.
4099
(format-scheme.obj, x-scheme.obj): New rules.
4102
2005-01-08 Bruno Haible <bruno@clisp.org>
4104
* msggrep.c (grep_args, grep_path, grep_argv): Remove variables.
4105
(struct grep_task): New type.
4106
(grep_task): New variable.
4107
(main): Initialize grep_task instead of grep_args. Change processing
4108
of options 'E', 'F' to set a matcher, of 'e', 'f' to append to the
4109
pattern string, and of 'i' to set a boolean. Compile the patterns.
4110
(is_string_selected): Execute a compiled pattern instead of calling
4112
(is_message_selected): Update.
4113
* Makefile.am (AM_CPPFLAGS): Add -I option for libgrep.
4114
(LIBGREP): New variable.
4115
(msggrep_LDADD): Add $(LIBGREP).
4116
* Makefile.msvc (INCLUDES): Add libgrep directory.
4117
(msggrep.exe): Link with libgrep.
4118
* Makefile.vms (INCLUDES): Add libgrep directory.
4119
(msggrep.exe): Link with libgrep.
4121
2005-01-09 Bruno Haible <bruno@clisp.org>
4123
* msgl-ascii.h (is_ascii_msgdomain_list): New declaration.
4124
* msgl-ascii.c (is_ascii_msgdomain_list): New function.
4125
* x-po.c (header_charset): New variable.
4126
(extract_add_message): When seeing the header entry, store the charset
4128
(extract): Store the value of header_charset in the new constructed
4130
* xgettext.c (main): Convert the existing PO file to UTF-8 if it was
4132
Reported by Jörg Schilling <schilling@fokus.fraunhofer.de>.
4134
2005-01-08 Bruno Haible <bruno@clisp.org>
4136
* msggrep.c (usage): Explain COMMENT-PATTERN syntax as well.
4138
2005-01-06 Bruno Haible <bruno@clisp.org>
4140
* x-tcl.c (read_word): Ignore non-space whitespace at the beginning.
4141
Reported by William J Poser <wjposer@ldc.upenn.edu>.
4143
2005-01-06 Bruno Haible <bruno@clisp.org>
4145
* write-csharp.c (msgdomain_write_csharp): Don't call fclose after
4147
* write-java.c (msgdomain_write_java): Likewise.
4148
* write-mo.c (msgdomain_write_mo): Likewise.
4149
* write-po.c (msgdomain_list_print): Likewise.
4150
* write-qt.c (msgdomain_write_qt): Likewise.
4151
* write-resources.c (execute_writing_input): Likewise.
4152
* write-tcl.c (msgdomain_write_tcl): Likewise.
4154
2005-01-05 Bruno Haible <bruno@clisp.org>
4156
* msgattrib.c (main): Update year in --version output.
4157
* msgcat.c (main): Likewise.
4158
* msgcmp.c (main): Likewise.
4159
* msgcomm.c (main): Likewise.
4160
* msgconv.c (main): Likewise.
4161
* msgen.c (main): Likewise.
4162
* msgexec.c (main): Likewise.
4163
* msgfilter.c (main): Likewise.
4164
* msgfmt.c (main): Likewise.
4165
* msggrep.c (main): Likewise.
4166
* msginit.c (main): Likewise.
4167
* msgmerge.c (main): Likewise.
4168
* msgunfmt.c (main): Likewise.
4169
* msguniq.c (main): Likewise.
4170
* xgettext.c (main): Likewise.
4172
2005-01-07 Bruno Haible <bruno@clisp.org>
4174
* gettext-po.c (po_file_read): Interpret "-" and "/dev/stdin" as
4176
Suggested by Asgeir Frimannsson <asgeirf@redhat.com>.
4178
2004-11-29 Bruno Haible <bruno@clisp.org>
4180
* Makefile.am (libgettextpo_la_LDFLAGS): Add @LTLIBINTL@ @LTLIBICONV@.
4181
Reported by Sam Steingold <sds@gnu.org>.
4183
2004-10-01 Guido Flohr <guido@imperia.net>
4185
* x-perl.c (x_perl_prelex): Recognize function names starting with '-'.
4186
Reported by Ryan Anderson <ryan@autoweb.net>.
4188
2004-09-16 Bruno Haible <bruno@clisp.org>
4190
* format.h (formatstring_error_logger_t): Modify decl for GCC <= 3.0.
4191
Reported by Jens A. Tkotz <jens@peino.de>.
4193
2004-09-11 Bruno Haible <bruno@clisp.org>
4195
* Makefile.am (msginit_SOURCES): Add plural-count.c.
4196
* msginit.c (update_msgstr_plurals): New function.
4198
* msgmerge.c (match_domain): Provide the appropriate number of plural
4199
forms for messages that don't occur in the Def.po file.
4200
Reported by Jens A. Tkotz <jens@peino.de>.
4202
2004-09-06 Bruno Haible <bruno@clisp.org>
4204
* format.h (formatstring_error_logger_t): New type.
4205
(struct formatstring_parser): Change calling convention of 'check'
4207
(check_msgid_msgstr_format): New declaration.
4208
* format-awk.c (format_check): Use error_logger argument instead of
4209
noisy and error_at_line.
4210
* format-c.c (format_check): Likewise.
4211
* format-csharp.c (format_check): Likewise.
4212
* format-elisp.c (format_check): Likewise.
4213
* format-gcc-internal.c (format_check): Likewise.
4214
* format-java.c (format_check): Likewise.
4215
* format-librep.c (format_check): Likewise.
4216
* format-lisp.c (format_check): Likewise.
4217
* format-pascal.c (format_check): Likewise.
4218
* format-perl.c (format_check): Likewise.
4219
* format-perl-brace.c (format_check): Likewise.
4220
* format-php.c (format_check): Likewise.
4221
* format-python.c (format_check): Likewise.
4222
* format-qt.c (format_check): Likewise.
4223
* format-sh.c (format_check): Likewise.
4224
* format-tcl.c (format_check): Likewise.
4225
* format-ycp.c (format_check): Likewise.
4226
* format.c (check_msgid_msgstr_format): New function, extracted from
4228
* msgfmt.c (curr_msgid_pos): New variable.
4229
(formatstring_error_logger): New function.
4230
(check_pair): Use check_msgid_msgstr_format, formatstring_error_logger.
4231
* msgmerge.c (msgfmt_check_pair_fails): Update.
4232
* gettext-po.h (po_message_check_format): New declaration.
4233
* gettext-po.c (po_error_logger, po_message_check_format): New
4236
2004-09-05 Bruno Haible <bruno@clisp.org>
4238
* po-error.h: New file.
4239
* po-error.c: New file.
4240
* po-charset.c: Include po-error.h.
4241
(po_lex_charset_set): Use po_multiline_warning instead of
4243
* po-lex.h: Include po-error.h.
4244
(po_gram_error): Use po_error instead of error.
4245
(po_gram_error_at_line): Use po_error_at_line instead of error_at_line.
4246
* po-lex.c (po_gram_error): Use po_error instead of error.
4247
(po_gram_error_at_line): Use po_error_at_line instead of error_at_line.
4248
(mbfile_getc, lex_getc): Use po_error instead of error.
4249
* read-po-abstract.c (po_scan): Likewise.
4250
* write-po.c: Include po-error.h instead of error.h.
4251
(wrap): Use po_error instead of error.
4252
(message_print, message_print_obsolete): Use po_multiline_warning
4253
instead of multiline_warning.
4254
(msgdomain_list_print): Use po_error instead of error, po_error_at_line
4255
instead of error_at_line.
4256
* str-list.h (string_list_join): New declaration.
4257
* str-list.c (string_list_join): New function.
4258
* message.h (message_list_insert_at): New declaration.
4259
* message.c (message_list_insert_at): New function.
4260
* gettext-po.h (po_filepos_t): New type.
4261
(struct po_error_handler, po_error_handler_t): New types.
4262
(po_file_create): New declaration.
4263
(po_file_read): Add handler argument.
4264
(po_file_write, po_message_insert, po_message_create,
4265
po_message_set_msgid, po_message_set_msgid_plural,
4266
po_message_set_msgstr, po_message_set_msgstr_plural,
4267
po_message_comments, po_message_set_comments,
4268
po_message_extracted_comments, po_message_filepos,
4269
po_message_set_obsolete, po_message_set_fuzzy, po_message_set_format,
4270
po_filepos_file, po_filepos_start_line): New declarations.
4271
* gettext-po.c (po_file_create): New function.
4272
(po_file_read): Add handler argument. Keep an old version for backward
4274
(po_file_write): New function.
4275
(po_message_iterator): Store more information, to make
4276
po_message_insert possible.
4277
(po_message_iterator_free): Update.
4278
(po_next_message): Don't crash if iterator->mlp is NULL.
4279
(po_message_insert): New function.
4280
(po_message_create): New function.
4281
(po_message_set_msgid, po_message_set_msgid_plural,
4282
po_message_set_msgstr, po_message_set_msgstr_plural,
4283
po_message_comments, po_message_set_comments,
4284
po_message_extracted_comments, po_message_filepos,
4285
po_message_set_obsolete, po_message_set_fuzzy, po_message_set_format,
4286
po_filepos_file, po_filepos_start_line): New functions.
4287
* Makefile.am (noinst_HEADERS): Add po-error.h.
4288
(COMMON_SOURCE): Add po-error.c.
4289
* Makefile.msvc (OBJECTS): Add po-error.obj.
4290
(po-error.obj): New rule.
4291
* Makefile.vms (OBJECTS): Add po-error.obj.
4292
(po-error.obj): New rule.
4295
2004-09-03 Bruno Haible <bruno@clisp.org>
4297
* Makefile.am (msginit_LDADD): Use the INTL_MACOSX_LDFLAGS.
4299
2004-08-30 Bruno Haible <bruno@clisp.org>
4301
* plural-table.c (plural_table): Czech is now like Slovak.
4302
Reported by Stepan Kasal <kasal@ucw.cz>.
4304
2004-06-23 Bruno Haible <bruno@clisp.org>
4306
* x-c.c (phase1_getc): Fix phase0_getc invocation.
4307
Reported by Matt Dreezer <matthew.dreezer@edl.uk.eds.com>.
4309
2004-05-14 Bruno Haible <bruno@clisp.org>
4311
* format-java.c (message_format_parse): Fix argument of freesa() calls.
4313
2004-03-19 Bruno Haible <bruno@clisp.org>
4315
* Makefile.am (install-exec-clean): Don't remove libgettextsrc.a on
4317
Reported by Kouichi Hashikawa <z01a7ksy@cs.ecip.tohoku.ac.jp>.
4319
2004-03-14 Bruno Haible <bruno@clisp.org>
4321
* format-lisp.c (parse_upto): Add integer restriction for the dispatch
4322
argument in ~[...~].
4324
2004-03-02 Bruno Haible <bruno@clisp.org>
4326
* read-csharp.c (msgdomain_read_csharp): Extend the lang -> frobbedlang
4327
mapping so as to support Serbian and Uzbek locales.
4328
* write-csharp.c (msgdomain_write_csharp): Likewise.
4329
Reported by Jorn Baayen <jbaayen@dds.nl>.
4331
2004-02-27 Bruno Haible <bruno@clisp.org>
4333
* plural-table.c (plural_table): Add an entry about Serbian.
4334
Reported by Danilo Segan <danilo@gnome.org>.
4336
2004-01-29 Bruno Haible <bruno@clisp.org>
4338
* gettext-0.14.1 released.
4340
2004-01-28 Bruno Haible <bruno@clisp.org>
4342
* gettext-0.14 released.
4344
2004-01-18 Bruno Haible <bruno@clisp.org>
4346
* msginit.c (catalogname_for_locale): Add entries for Akan, Avaric,
4347
Bambara, Cree, Divehi (Maldivian), Éwé, Igbo, Kongo, Kanuri, Ganda,
4348
Luba-Katanga, Ojibwa, Venda.
4349
(englishname_of_language): Likewise, and also for Fulah (Fulfulde).
4351
2004-01-09 Bruno Haible <bruno@clisp.org>
4353
* format.h (struct formatstring_parser): Add 'translated' argument to
4355
(get_sysdep_c_format_directives): Renamed from
4356
get_c99_format_directives. Add 'translated' argument. Change meaning
4357
of endpos in returned array.
4358
* format-c.c (struct spec): Rename field c99_directives to
4359
sysdep_directives, and c99_directives_count to sysdep_directives_count.
4360
(format_parse): Add 'translated' argument. Handle 'I' flag. Store the
4361
pointer past the '>' character instead of the pointer to the '>'.
4362
(format_c_parse, format_objc_parse): Add 'translated' argument.
4363
(get_sysdep_c_format_directives): Renamed from
4364
get_c99_format_directives. Add 'translated' argument.
4365
* format-awk.c (format_parse): Add 'translated' argument.
4366
* format-csharp.c (format_parse): Likewise.
4367
* format-elisp.c (format_parse): Likewise.
4368
* format-gcc-internal.c (format_parse): Likewise.
4369
* format-java.c (format_parse): Likewise.
4370
* format-librep.c (format_parse): Likewise.
4371
* format-lisp.c (format_parse): Likewise.
4372
* format-pascal.c (format_parse): Likewise.
4373
* format-perl-brace.c (format_parse): Likewise.
4374
* format-perl.c (format_parse): Likewise.
4375
* format-php.c (format_parse): Likewise.
4376
* format-python.c (format_parse): Likewise.
4377
* format-qt.c (format_parse): Likewise.
4378
* format-sh.c (format_parse): Likewise.
4379
* format-tcl.c (format_parse): Likewise.
4380
* format-ycp.c (format_parse): Likewise.
4381
* msgfmt.c (check_pair): Update.
4382
* msgmerge.c (msgfmt_check_pair_fails): Likewise.
4383
* read-mo.c (get_sysdep_string): Don't add '<'...'>' around segments
4385
(read_mo_file): Treat major revision 1 like major revision 0.
4386
* write-mo.c (write_table): Update. Use major revision 1 if "I" occurs
4387
among the sysdep segments.
4388
* xgettext.c (set_format_flags_from_context, remember_a_message,
4389
remember_a_message_plural): Update.
4391
2004-01-14 Bruno Haible <bruno@clisp.org>
4393
* msginit.c (fill_header): Avoid a NULL pointer access when the header
4394
has no comment attached to it.
4395
Reported by Josep Puigdemont <baldrick@terra.es>.
4397
2004-01-09 Bruno Haible <bruno@clisp.org>
4399
* msgattrib.c (main): Update year in --version output.
4400
* msgcat.c (main): Likewise.
4401
* msgcmp.c (main): Likewise.
4402
* msgcomm.c (main): Likewise.
4403
* msgconv.c (main): Likewise.
4404
* msgen.c (main): Likewise.
4405
* msgexec.c (main): Likewise.
4406
* msgfilter.c (main): Likewise.
4407
* msgfmt.c (main): Likewise.
4408
* msggrep.c (main): Likewise.
4409
* msginit.c (main): Likewise.
4410
* msgmerge.c (main): Likewise.
4411
* msgunfmt.c (main): Likewise.
4412
* msguniq.c (main): Likewise.
4413
* xgettext.c (main): Likewise.
4415
2003-12-29 Bruno Haible <bruno@clisp.org>
4417
* xgettext.h: Include stdlib.h, str-list.h.
4418
(struct refcounted_string_list_ty): New type.
4419
(add_reference, drop_reference): New functions.
4420
(savable_comment, savable_comment_add, savable_comment_reset,
4421
savable_comment_to_xgettext_comment): New declarations.
4422
* xgettext.c (savable_comment): New variable.
4423
(savable_comment_add, savable_comment_reset,
4424
savable_comment_to_xgettext_comment): New functions.
4425
* x-java.c (struct refcounted_string_list_ty, comment, add_reference,
4426
drop_reference, x_java_comment_add, x_java_comment_reset,
4427
x_java_comment_to_xgettext_comment): Remove. Use replacement from
4428
xgettext.{h,c} instead.
4429
* x-csharp.c (struct refcounted_string_list_ty, comment, add_reference,
4430
drop_reference, x_csharp_comment_add, x_csharp_comment_reset,
4431
x_csharp_comment_to_xgettext_comment): Remove. Use replacement from
4432
xgettext.{h,c} instead.
4433
* x-c.c (comment_line_end): Call savable_comment_add instead of
4434
xgettext_comment_add.
4435
(struct token_ty): Add 'comment' field.
4436
(free_token): Free it.
4437
(phase5_get): Initialize token's 'comment' field.
4438
(phase6_get): Call savable_comment_reset instead of
4439
xgettext_comment_reset.
4440
(phase8a_get): Initialize token's 'comment' field.
4441
(phase8b_get): Call savable_comment_reset instead of
4442
xgettext_comment_reset.
4443
(phase8c_get): In @"...", use the comment of the first token, not of
4445
(struct xgettext_token_ty): Add 'comment' field.
4446
(x_c_lex): Deal with the token's comment.
4447
(extract_parenthesized): Call savable_comment_to_xgettext_comment and
4448
savable_comment_reset. Free the token's comment field.
4449
* x-python.c (comment_line_end): Call savable_comment_add instead of
4450
xgettext_comment_add.
4451
(struct token_ty): Add 'comment' field.
4452
(phase5_get): Call savable_comment_reset instead of
4453
xgettext_comment_reset. Initialize token's 'comment' field.
4454
(extract_parenthesized): Call savable_comment_to_xgettext_comment and
4455
savable_comment_reset. Free the token's comment field.
4457
2003-12-28 Bruno Haible <bruno@clisp.org>
4459
* read-mo.h (read_mo_file): Change 'fn' into 'filename'.
4460
* read-mo.c (read_mo_file): Likewise.
4462
2003-12-28 Bruno Haible <bruno@clisp.org>
4464
* write-resources.h: New file.
4465
* write-resources.c: New file.
4466
* msgfmt.cs: New file.
4467
* msgfmt.c: Include write-resources.h.
4468
(csharp_resources_mode): New variable.
4469
(long_options): Add --csharp-resources.
4470
(main): Handle --csharp-resources. More generic code for detection of
4471
contradicting modes. Invoke msgdomain_write_csharp_resources.
4472
(usage): Document --csharp-resources option.
4473
(msgfmt_set_domain): Update.
4474
* read-resources.h: New file.
4475
* read-resources.c: New file.
4476
* msgunfmt.cs (DumpResource): Add a constructor that dumps a .resources
4478
(Main): Invoke it when only one argument is given.
4479
* msgunfmt.c: Include read-resources.h.
4480
(csharp_resources_mode): New variable.
4481
(long_options): Add --csharp-resources.
4482
(main): Handle --csharp-resources. More generic code for detection of
4483
contradicting modes. Invoke read_one_file instead of read_mo_file.
4484
(usage): Document --csharp-resources option.
4485
(read_one_file): New function.
4486
* Makefile.am (noinst_HEADERS): Add read-resources.h and
4488
(msgfmt_SOURCES): Add write-resources.c.
4489
(msgunfmt_SOURCES): Add read-resources.c.
4490
(EXTRA_DIST): Add msgfmt.cs.
4491
(CLEANFILES): Add msgfmt.net.exe.
4492
(msgfmt.net.exe): New rule.
4493
(all-csharp-yes): Depend on it.
4494
(install-exec-csharp-yes): Also install msgfmt.net.exe.
4495
(uninstall-csharp-yes): Also uninstall msgfmt.net.exe.
4496
* Makefile.msvc (msgfmt_OBJECTS): Add write-resources.obj.
4497
(msgunfmt_OBJECTS): Add read-resources.obj.
4498
(write-resources.obj, read-resources.obj): New rules.
4499
* Makefile.vms (msgfmt_OBJECTS): Add write-resources.obj.
4500
(msgunfmt_OBJECTS): Add read-resources.obj.
4501
(write-resources.obj, read-resources.obj): New rules.
4504
2003-12-26 Bruno Haible <bruno@clisp.org>
4507
* write-csharp.h: New file.
4508
* write-csharp.c: New file.
4509
* msgfmt.c: Include write-csharp.h.
4510
(csharp_mode, csharp_resource_name, csharp_locale_name,
4511
csharp_base_directory): New variables.
4512
(long_options): Add option --csharp.
4513
(main): Handle option --csharp. Initialize csharp_resource_name,
4514
csharp_locale_name, csharp_base_directory. Perform checks for C# mode.
4515
Invoke msgdomain_write_csharp.
4516
(usage): Document --csharp option and C# mode.
4517
(msgfmt_set_domain): Ignore in C# mode.
4518
* read-csharp.h: New file.
4519
* read-csharp.c: New file.
4520
* msgunfmt.cs: New file.
4521
* msgunfmt.c: Include read-csharp.h.
4522
(csharp_mode, csharp_resource_name, csharp_locale_name,
4523
csharp_base_directory): New variables.
4524
(long_options): Add option --csharp.
4525
(main): Handle option --csharp. Initialize csharp_resource_name,
4526
csharp_locale_name, csharp_base_directory. Perform checks for C# mode.
4527
Invoke msgdomain_read_csharp.
4528
(usage): Document --csharp option and C# mode.
4529
* Makefile.am (noinst_HEADERS): Add read-csharp.h, write-csharp.h.
4530
(CSHARPCOMP, CSHARPCOMPFLAGS): New variables.
4531
(msgfmt_SOURCES): Add write-csharp.c.
4532
(msgunfmt_SOURCES): Add read-csharp.c.
4533
(EXTRA_DIST): Add msgunfmt.cs.
4534
(CLEANFILES): Add msgunfmt.net.exe.
4535
(all-csharp-yes, all-csharp-no): New rules.
4536
(all-local): Depend on them.
4537
(msgunfmt.net.exe): New rule.
4538
(install-exec-csharp-yes, install-exec-csharp-no): New rules.
4539
(install-exec-local): Depend on them.
4540
(installdirs-csharp): New rule.
4541
(installdirs-local): Depend on it.
4542
(uninstall-csharp-yes, uninstall-csharp-no): New rules.
4543
(uninstall-local): Depend on it.
4544
* Makefile.msvc (msgfmt_OBJECTS): Add write-csharp.obj.
4545
(msgunfmt_OBJECTS): Add read-csharp.obj.
4546
(write-csharp.obj, read-csharp.obj): New rules.
4547
* Makefile.vms (msgfmt_OBJECTS): Add write-csharp.obj.
4548
(msgunfmt_OBJECTS): Add read-csharp.obj.
4549
(write-csharp.obj, read-csharp.obj): New rules.
4552
2003-12-26 Bruno Haible <bruno@clisp.org>
4554
* read-java.c (msgdomain_read_java): Relocate also the GETTEXTJAR
4556
* urlget.c (fetch): Likewise.
4558
2003-12-26 Bruno Haible <bruno@clisp.org>
4560
* write-java.c (write_java_code): Emit a static method
4561
'get_msgid_plural_table' instead of a static field 'plural'.
4562
* gnu/gettext/DumpResource.java (DumpResource.dump): Exploit a
4563
'get_msgid_plural_table' method if it exists.
4565
2003-12-14 Bruno Haible <bruno@clisp.org>
4567
* message.h (format_type): New enum value 'format_csharp'.
4568
(NFORMATS): Increment.
4569
* message.c (format_language): Add format_csharp entry.
4570
(format_language_pretty): Likewise.
4571
* format.h (formatstring_csharp): New declaration.
4572
* format-csharp.c: New file.
4573
* format.c (formatstring_parsers): Add formatstring_csharp.
4574
* x-csharp.h: New file.
4575
* x-csharp.c: New file.
4576
* xgettext.c: Include x-csharp.h.
4577
(flag_table_csharp): New variable.
4578
(main): Invoke init_flag_table_csharp, x_csharp_extract_all,
4580
(usage): Mention C# source language.
4581
(xgettext_record_flag): Handle format_csharp.
4582
(language_to_extractor): Add C# rule.
4583
(extension_to_language): Add C# rule.
4584
* Makefile.am (noinst_HEADERS): Add x-csharp.h.
4585
(FORMAT_SOURCE): Add format-csharp.c.
4586
(xgettext_SOURCES): Add x-csharp.c.
4587
* Makefile.msvc (OBJECTS): Add format-csharp.obj.
4588
(xgettext_OBJECTS): Add x-csharp.obj.
4589
(format-csharp.obj, x-csharp.obj): New rules.
4590
* Makefile.vms (OBJECTS): Add format-csharp.obj.
4591
(xgettext_OBJECTS): Add x-csharp.obj.
4592
(format-csharp.obj, x-csharp.obj): New rules.
4595
2003-12-28 Bruno Haible <bruno@clisp.org>
4597
* msgexec.c (process_string): Pass ignore_sigpipe = false.
4598
* msgfilter.c (process_string): Likewise.
4599
* msggrep.c (is_string_selected): Likewise.
4600
* msginit.c (project_id, project_id_version, get_user_email,
4601
language_team_address): Likewise.
4602
* read-java.c (execute_and_read_po_output): Likewise.
4603
* read-tcl.c (msgdomain_read_tcl): Likewise.
4604
* urlget.c (execute_it): Pass ignore_sigpipe = true.
4605
(fetch): Pass ignore_sigpipe = true when fetching the file, = false
4608
2003-12-14 Bruno Haible <bruno@clisp.org>
4610
* x-c.c (SIZEOF): New macro.
4611
(phase1_ungetc): Verify that the pushback buffer's size is sufficient.
4612
(phase2_ungetc): Likewise.
4613
(phase3_ungetc): Likewise.
4614
(phase5_unget): Likewise.
4615
(phase6_unget): Likewise.
4616
* x-java.c (SIZEOF): New macro.
4617
(phase1_ungetc): Verify that the pushback buffer's size is sufficient.
4618
(phase2_ungetc): Likewise.
4619
(phase3_ungetc): Likewise.
4620
(phase5_unget): Likewise.
4621
(phase6_unget): Likewise.
4622
* x-php.c (SIZEOF): New macro.
4623
(phase1_ungetc): Verify that the pushback buffer's size is sufficient.
4624
(phase2_ungetc): Likewise.
4625
(phase3_ungetc): Likewise.
4626
* x-python.c (SIZEOF): New macro.
4627
(phase1_ungetc): Verify that the pushback buffer's size is sufficient.
4628
(phase5_unget): Likewise.
4629
* x-sh.c (SIZEOF): New macro.
4630
(phase1_ungetc): Verify that the pushback buffer's size is sufficient.
4631
(phase2_ungetc): Likewise.
4632
* x-smalltalk.c (SIZEOF): New macro.
4633
(phase2_unget): Verify that the pushback buffer's size is sufficient.
4634
* x-tcl.c (SIZEOF): New macro.
4635
(phase1_ungetc): Verify that the pushback buffer's size is sufficient.
4636
(phase2_ungetc): Likewise.
4637
* x-ycp.c (SIZEOF): New macro.
4638
(phase2_unget): Verify that the pushback buffer's size is sufficient.
4640
2003-12-14 Bruno Haible <bruno@clisp.org>
4642
* x-c.c (phase1_pushback): Reduce size to 2.
4643
(phase2_pushback): Reduce size to 1.
4644
(phase3_pushback): Reduce size to 2.
4645
(phase5_pushback): Reduce size to 1.
4646
(phase6_pushback): Reduce size to 2.
4647
* x-java.c (phase2_pushback): Reduce size to 1.
4648
(phase3_pushback): Reduce size to 2.
4649
(phase5_pushback): Reduce size to 3.
4650
(phase6_pushback): Reduce size to 2.
4651
* x-php.c (phase1_pushback): Reduce size to 2.
4652
* x-python.c (max): New macro.
4653
(phase1_pushback): Reduce size to UNINAME_MAX + 3.
4654
(phase5_pushback): Reduce size to 1.
4655
* x-sh.c (phase1_pushback): Reduce size to 1.
4656
(phase2_pushback): Reduce size to 2.
4657
* x-smalltalk.c (phase2_pushback): Reduce size to 1.
4658
* x-tcl.c (phase1_pushback): Reduce size to 1.
4659
(phase2_pushback): Reduce size to 2.
4661
2003-12-12 Bruno Haible <bruno@clisp.org>
4663
Assume automake-1.8.
4664
* Makefile.am (install-exec-local): Renamed from install-exec-am.
4666
2003-11-30 Bruno Haible <bruno@clisp.org>
4668
* format-java.c: Include xallocsa.h.
4669
(message_format_parse): Use xallocsa instead of alloca.
4670
(choice_format_parse): Likewise.
4671
* msgl-cat.c: Include xallocsa.h.
4672
(catenate_msgdomain_list): Use xallocsa instead of alloca.
4673
* msgl-charset.c: Include xallocsa.h.
4674
(compare_po_locale_charsets): Use xallocsa instead of alloca.
4675
* msgl-iconv.c: Include xallocsa.h.
4676
(iconv_message_list): Use xallocsa instead of alloca.
4677
* po-charset.c: Include xallocsa.h.
4678
(po_lex_charset_set): Use xallocsa instead of alloca.
4679
* read-tcl.c: Include xallocsa.h.
4680
(msgdomain_read_tcl): Use xallocsa instead of alloca.
4681
* write-java.c: Include xallocsa.h.
4682
(compute_hashsize, msgdomain_write_java): Use xallocsa instead of
4684
* write-mo.c: Include xallocsa.h.
4685
(write_table): Use xallocsa instead of alloca.
4686
* write-po.c: Include xallocsa.h.
4687
(msgdomain_list_print_po): Use xallocsa instead of alloca.
4688
* write-tcl.c: Include xallocsa.h.
4689
(msgdomain_write_tcl): Use xallocsa instead of alloca.
4690
* msggrep.c: Include xallocsa.h.
4691
(is_message_selected): Use xallocsa instead of alloca.
4692
* msginit.c: Include xallocsa.h.
4693
(subst_string): Use xallocsa instead of alloca.
4694
* msgmerge.c: Include obstack.h.
4695
(obstack_chunk_alloc, obstack_chunk_free): New macros.
4696
(message_merge): Use obstack_alloc instead of alloca.
4697
* xgettext.c: Include xallocsa.h.
4698
(flag_context_list_table_insert): Use xallocsa instead of alloca.
4700
2003-12-17 Bruno Haible <bruno@clisp.org>
4702
* gettext-0.13.1 released.
4704
2003-12-14 Bruno Haible <bruno@clisp.org>
4706
* x-sh.c (phase2_getc): Call phase1_ungetc instead of phase2_ungetc:
4707
The next phase2_getc invocation must return QUOTED('"'), not '"'.
4709
2003-12-14 Bruno Haible <bruno@clisp.org>
4711
* x-c.c (phase7_getc): Remove dead code.
4712
* x-java.c (accumulate_escaped): More precise error message.
4714
2003-12-02 Bruno Haible <bruno@clisp.org>
4716
* msginit.c (catalogname_for_locale): Treat sr_CS like sr_YU.
4718
2003-11-30 Bruno Haible <bruno@clisp.org>
4720
* gettext-0.13 released.
4722
2003-11-28 Bruno Haible <bruno@clisp.org>
4724
* xgettext.c (set_format_flags_from_context): Add casts, to make it
4725
compile in C++ mode.
4727
2003-11-22 Bruno Haible <bruno@clisp.org>
4729
* x-c.c (phase4_getc): Skip leading whitespace in C++ style comments
4731
* x-sh.c (read_word): Skip leading whitespace in comments.
4732
* x-lisp.c (read_object): Skip leading whitespace in single-line
4734
* x-elisp.c (read_object): Skip leading whitespace in comments.
4735
* x-librep.c (read_object): Skip leading whitespace in single-line
4737
* x-java.c (phase4_getc): Skip leading whitespace in C++ style comments
4739
* x-awk.c (phase2_getc): Skip leading whitespace in comments.
4740
* x-ycp.c (phase2_getc): Skip leading whitespace in single-line
4742
* x-tcl.c (read_command): Skip leading whitespace in comments.
4744
2003-11-24 Bruno Haible <bruno@clisp.org>
4746
* format-lisp.c (check_params): Use ngettext for one of the messages.
4747
Reported by Rafał Maszkowski <rzm@icm.edu.pl>.
4749
2003-11-15 Bruno Haible <bruno@clisp.org>
4751
* Makefile.am (AM_CPPFLAGS): Renamed from INCLUDES.
4753
2003-11-09 Bruno Haible <bruno@clisp.org>
4755
* msginit.c (main): Drop the blank line in --no-translator mode.
4757
2003-11-07 Bruno Haible <bruno@clisp.org>
4759
* xgettext.c (remember_a_message): Omit the programmer comments of a
4760
duplicated msgid only if they are redundant.
4761
Reported by Christian Neumair <chris@gnome-de.org>.
4763
2003-11-05 Bruno Haible <bruno@clisp.org>
4765
* user-email.sh.in: Renamed from user-email.in. Internationalize, use
4766
localedir and gettext.
4769
2003-10-23 Bruno Haible <bruno@clisp.org>
4771
* read-stringtable.c (read_string, stringtable_parse): Cast
4772
gram_pos.line_number to 'unsigned long'.
4773
* x-sh.c (read_word): Case line_number to 'unsigned long'.
4775
2003-10-21 Bruno Haible <bruno@clisp.org>
4777
* message.h (message_list_msgids_changed): New declaration.
4778
* message.c (message_list_msgids_changed): New function.
4779
* msgl-iconv.c (iconv_message_list): Update the message list's hash
4780
table if it happens to contain non-ASCII msgids.
4782
2003-10-19 Bruno Haible <bruno@clisp.org>
4784
* message.h (format_type): New enum value 'format_qt'.
4785
(NFORMATS): Increment.
4786
* message.c (format_language): Add format_qt entry.
4787
(format_language_pretty): Likewise.
4788
* format.h (formatstring_qt): New declaration.
4789
* format-qt.c: New file.
4790
* format.c (formatstring_parsers): Add formatstring_qt.
4791
* xgettext.c (recognize_format_qt): New variable.
4792
(long_options): Add option "--qt".
4793
(main): Handle --qt option. Determine the extractor only after option
4794
processing is complete.
4795
(usage): Document --qt option.
4796
(xgettext_record_flag): Handle format_qt.
4797
(language_to_extractor): For C++, return a different extractor when
4799
* write-qt.h: New file.
4800
* write-qt.c: New file.
4801
* msgfmt.c: Include write-qt.h.
4802
(qt_mode): New variable.
4803
(long_options): Add option "--qt".
4804
(main): Handle --qt option. More checks for contradicting options.
4805
Call msgdomain_write_qt.
4806
(usage): Mention Qt mode.
4807
(format_directive_domain): Ignore domain directive if in Qt mode.
4808
* Makefile.am (noinst_HEADERS): Add write-qt.h.
4809
(FORMAT_SOURCE): Add format-qt.c.
4810
(msgfmt_SOURCES): Add write-qt.c.
4811
* Makefile.msvc (OBJECTS): Add format-qt.obj.
4812
(msgfmt_OBJECTS): Add write-qt.obj.
4813
(format-qt.obj, write-qt.obj): New rules.
4814
* Makefile.vms (OBJECTS): Add format-qt.obj.
4815
(msgfmt_OBJECTS): Add write-qt.obj.
4816
(format-qt.obj, write-qt.obj): New rules.
4819
2003-10-14 Bruno Haible <bruno@clisp.org>
4821
Fix compilation errors in C++ mode.
4822
* msgfilter.c (process_string): Cast the xrealloc expression.
4823
* xgettext.c (language_to_extractor, extension_to_language): Move the
4824
typedef after the struct definition.
4826
2003-10-13 Bruno Haible <bruno@clisp.org>
4828
Support CR/LF line terminators in C sources even on Unix.
4829
* x-c.c (phase0_getc, phase0_ungetc): New functions.
4830
(phase1_getc): Use them instead of calling getc/ungetc directly.
4831
Reported by Christoph Thielecke <u15119@hs-harz.de>.
4833
2003-10-13 Bruno Haible <bruno@clisp.org>
4835
Support and recognize Objective C specific format strings.
4836
* message.h (enum format_type): New item format_objc.
4837
(NFORMATS): Increment.
4838
* message.c (format_language): Add an entry for format_objc.
4839
(format_language_pretty): Likewise.
4840
* format.h (formatstring_objc): New declaration.
4841
* format-c.c (enum format_arg_type): New item FAT_OBJC_OBJECT.
4842
(format_parse): Add objc_extensions argument. Handle %@ in ObjC mode.
4843
(format_c_parse, format_objc_parse): New functions.
4844
(formatstring_c): Use format_c_parse instead of format_parse.
4845
(formatstring_objc): New variable.
4846
(get_c99_format_directives): Update.
4847
* format.c (formatstring_parsers): Add an entry for format_objc.
4848
* write-mo.c (write_table): Look for system dependent strings also in
4849
ObjectiveC format strings.
4850
* x-c.h (SCANNERS_C): Use separate flag_table for ObjectiveC.
4851
(x_objc_keyword, init_flag_table_objc): New declarations.
4852
(x_c_any_keywords): Remove declaration.
4853
* x-c.c (c_keywords): Renamed from keywords.
4854
(objc_keywords): New variable.
4855
(add_keyword): Renamed from x_c_keyword. Add keywords table argument.
4856
(x_c_keyword, x_objc_keyword): New functions.
4857
(x_c_any_keywords): Remove function.
4858
(init_keywords): Also initialize ObjectiveC keyword table.
4859
(init_flag_table_objc): New function.
4860
(enum token_type_ty): New item token_type_colon.
4861
(phase5_get): Recognize colon.
4862
(enum xgettext_token_type_ty): New item xgettext_token_type_colon.
4863
(x_c_lex): Use keywords table depending on objc_extensions. Handle
4865
(extract_parenthesized): Change the context_iter and inner_context
4866
after a keyword/symbol followed by a colon was seen.
4867
* xgettext.c (flag_table_objc): New variable.
4868
(main): Invoke init_flag_table_objc, x_objc_keyword. Watch out for
4869
keywords arguments, instead of calling x_c_any_keywords().
4870
(flag_context_list_table_insert): New function, extracted from
4871
xgettext_record_flag.
4872
(xgettext_record_flag): Call it. For format_c, insert the flags also
4873
in the flag_table_objc. Handle format_objc.
4874
(remember_a_message): Don't add a heuristic c-format flag to an entry
4875
that already carries objc-format.
4876
(remember_a_message_plural): Likewise.
4878
2003-10-18 Bruno Haible <bruno@clisp.org>
4880
Support for GNUstep .strings format.
4881
* read-stringtable.h: New file.
4882
* read-stringtable.c: New file.
4883
* read-po-abstract.h (enum input_syntax_ty): New item
4885
(po_callback_comment_dispatcher): Renamed from po_callback_comment.
4886
(po_callback_comment, po_callback_comment_special): New declarations.
4887
* read-po-abstract.c: Include read-stringtable.h.
4888
(po_scan): Add support for syntax_stringtable.
4889
(po_callback_comment_dispatcher): Renamed from po_callback_comment.
4890
(po_callback_comment, po_callback_comment_dot): New functions.
4891
(po_callback_comment_special): New function.
4892
* read-po.c (read_po): Set mdlp->encoding for syntax_stringtable too.
4893
* po-gram-gen.y: Update po_callback_comment_dispatcher call.
4894
* read-properties.c (properties_parse): Likewise.
4895
* write-stringtable.h: New file.
4896
* write-stringtable.c: New file.
4897
* write-po.h (make_format_description_string, significant_format_p):
4899
(message_print_syntax_stringtable): New declaration.
4900
* write-po.c: Include write-stringtable.h.
4901
(make_format_description_string, significant_format_p): Make
4903
(use_syntax_stringtable): New variable.
4904
(message_print_syntax_stringtable): New function.
4905
(msgdomain_list_print): Add check for plural forms for
4906
syntax_stringtable too. Add support for writing the .strings format.
4907
* msgattrib.c (long_options): Add --stringtable-input/output.
4908
(main): Handle them.
4909
(usage): Document options --stringtable-input/output.
4910
* msgcat.c (long_options): Add --stringtable-input/output.
4911
(main): Handle them. If option --stringtable-output is used, convert to
4912
UTF-8 and ignore the to_code.
4913
(usage): Document options --stringtable-input/output.
4914
* msgcmp.c (long_options): Add --stringtable-input.
4916
(usage): Document option --stringtable-input.
4917
* msgcomm.c (long_options): Add --stringtable-input/output.
4918
(main): Handle them.
4919
(usage): Document options --stringtable-input/output.
4920
* msgconv.c (long_options): Add --stringtable-input/output.
4921
(main): Handle them. If option --stringtable-output is used, ignore the
4923
(usage): Document options --stringtable-input/output.
4924
* msgen.c (long_options): Add --stringtable-input/output.
4925
(main): Handle them.
4926
(usage): Document options --stringtable-input/output.
4927
* msgexec.c: Include limits.h.
4928
(long_options): Add --stringtable-input.
4930
(usage): Document option --stringtable-input.
4931
* msgfilter.c (long_options): Add --stringtable-input/output.
4932
(main): Handle them.
4933
(usage): Document options --stringtable-input/output.
4934
* msgfmt.c (long_options): Add --stringtable-input.
4936
(usage): Document option --stringtable-input.
4937
* msggrep.c (long_options): Add --stringtable-input/output.
4938
(main): Handle them.
4939
(usage): Document options --stringtable-input/output.
4940
* msginit.c (long_options): Add --stringtable-input/output.
4941
(main): Handle them.
4942
(usage): Document options --stringtable-input/output.
4943
* msgmerge.c (long_options): Add --stringtable-input/output.
4944
(main): Handle them. In update mode, --stringtable-input implies
4945
--stringtable-output.
4946
(usage): Document options --stringtable-input/output.
4947
* msgunfmt.c (long_options): Add --stringtable-output.
4949
(usage): Document option --stringtable-output.
4950
* msguniq.c (long_options): Add --stringtable-input/output.
4951
(main): Handle them.
4952
(usage): Document options --stringtable-input/output.
4953
* x-stringtable.h: New file.
4954
* x-po.c: Include x-stringtable.h.
4955
(extract_stringtable): New function.
4956
* xgettext.c: Include x-stringtable.h.
4957
(long_options): Add --stringtable-output.
4959
(usage): Document options -L NXStringTable and --stringtable-output.
4960
(finalize_header): If --stringtable-output was given, set the charset.
4961
(language_to_extractor): Add support for .strings format.
4962
(extension_to_language): Likewise.
4963
* Makefile.am (noinst_HEADERS): Add read-stringtable.h,
4964
write-stringtable.h, x-stringtable.h.
4965
(COMMON_SOURCE): Add read-stringtable.c.
4966
(libgettextsrc_la_SOURCES): Add write-stringtable.c.
4967
* Makefile.msvc (OBJECTS): Add read-stringtable.obj,
4968
write-stringtable.obj.
4969
(read-stringtable.obj, write-stringtable.obj): New rules.
4970
* Makefile.vms (OBJECTS): Add read-stringtable.obj,
4971
write-stringtable.obj.
4972
(read-stringtable.obj, write-stringtable.obj): New rules.
4975
2003-10-21 Bruno Haible <bruno@clisp.org>
4977
* hostname.c (xgethostname): Add support for native Woe32 API.
4979
2003-10-21 Bruno Haible <bruno@clisp.org>
4981
* message.c (message_list_search): Avoid casting a pointer to a local
4982
variable; it violated strict aliasing.
4984
2003-10-21 Bruno Haible <bruno@clisp.org>
4986
* write-java.c (mkdir): Redefine on mingw.
4988
2003-10-12 Bruno Haible <bruno@clisp.org>
4990
Improved ObjectiveC support.
4991
* x-c.h (extract_objc): New declaration.
4992
(SCANNERS_C): For ObjectiveC, use extract_objc.
4993
* x-c.c (objc_extensions): New variable.
4994
(enum token_type_ty): New item token_type_objc_special.
4995
(phase5_get): Recognize '@' for ObjectiveC.
4996
(phase8b_get, phase8b_unget): New functions. Handle
4997
token_type_white_space and token_type_eoln here instead of in x_c_lex.
4998
(phase8c_get, phase8c_unget): New functions.
4999
(phase8_get): Rely on phase8c, not phase8a. No more need to care about
5000
token_type_white_space and token_type_eoln.
5001
(x_c_lex): Drop handling of token_type_white_space and token_type_eoln.
5002
(extract_whole_file): Renamed from extract_c.
5003
(extract_c, extract_objc): New functions.
5005
2003-10-20 Bruno Haible <bruno@clisp.org>
5007
* x-java.c (phase3_getc): Fix typo: Use phase2_ungetc, not phase2_getc.
5009
2003-10-20 Bruno Haible <bruno@clisp.org>
5011
Portability to AIX with cc.
5012
* xgettext.h (struct flag_context_ty): Define the bitfields of type
5015
2003-10-20 Bruno Haible <bruno@clisp.org>
5017
Portability to Solaris with cc.
5018
* x-java.c (string_buffer_append): Avoid aggregate initializer
5019
containing non-constant expressions.
5020
* xgettext.c (flag_context_list_iterator): Likewise.
5021
(language_to_extractor): Likewise.
5023
2003-10-11 Bruno Haible <bruno@clisp.org>
5025
* xgettext.c (main): Drop suffix ".in" from input file name, if
5026
present, before looking at the file extension.
5028
2003-10-09 Bruno Haible <bruno@clisp.org>
5030
* format-awk.c: Include xalloc.h instead of xmalloc.h.
5031
* format-c.c: Likewise.
5032
* format-elisp.c: Likewise.
5033
* format-gcc-internal.c: Likewise.
5034
* format-java.c: Likewise.
5035
* format-librep.c: Likewise.
5036
* format-lisp.c: Likewise.
5037
* format-pascal.c: Likewise.
5038
* format-perl.c: Likewise.
5039
* format-perl-brace.c: Likewise.
5040
* format-php.c: Likewise.
5041
* format-python.c: Likewise.
5042
* format-sh.c: Likewise.
5043
* format-tcl.c: Likewise.
5044
* format-ycp.c: Likewise.
5045
* gettext-po.c: Likewise.
5046
* hostname.c: Likewise.
5047
* message.c: Likewise.
5048
* msgexec.c: Likewise.
5049
* msgfilter.c: Likewise.
5050
* msgfmt.c: Likewise.
5051
* msggrep.c: Likewise.
5052
* msginit.c: Likewise.
5053
* msgl-cat.c: Likewise.
5054
* msgl-english.c: Likewise.
5055
* msgl-iconv.c: Likewise.
5056
* msgmerge.c: Likewise.
5057
* open-po.c: Likewise.
5058
* po-gram-gen.y: Likewise.
5059
* po-hash-gen.y: Likewise.
5060
* po-lex.c: Likewise.
5061
* read-mo.c: Likewise.
5062
* read-po-abstract.c: Likewise.
5063
* read-po.c: Likewise.
5064
* read-properties.c: Likewise.
5065
* str-list.c: Likewise.
5066
* write-java.c: Likewise.
5067
* write-mo.c: Likewise.
5068
* write-po.c: Likewise.
5069
* write-properties.c: Likewise.
5070
* write-tcl.c: Likewise.
5071
* x-awk.c: Likewise.
5073
* x-elisp.c: Likewise.
5074
* x-glade.c: Likewise.
5075
* x-java.c: Likewise.
5076
* x-librep.c: Likewise.
5077
* x-lisp.c: Likewise.
5078
* x-perl.c: Likewise.
5079
* x-php.c: Likewise.
5081
* x-python.c: Likewise.
5082
* x-rst.c: Likewise.
5084
* x-smalltalk.c: Likewise.
5085
* x-tcl.c: Likewise.
5086
* x-ycp.c: Likewise.
5087
* xgettext.c: Likewise.
5089
2003-10-07 Bruno Haible <bruno@clisp.org>
5091
More reliable subprocess cleanup.
5092
* msgexec.c (process_string): Pass slave_process = true to
5093
create_pipe_out() and wait_subprocess().
5094
* msgfilter.c (process_string): Pass slave_process = true to
5095
create_pipe_bidi() and wait_subprocess().
5096
* msggrep.c (is_string_selected): Pass slave_process = true to
5097
create_pipe_out() and wait_subprocess().
5098
* msginit.c (project_id, project_id_version, get_user_email,
5099
language_team_address): Pass slave_process = true to create_pipe_in()
5100
and wait_subprocess().
5101
* read-java.c (execute_and_read_po_output): Likewise.
5102
* read-tcl.c (msgdomain_read_tcl): Likewise.
5103
* urlget.c (execute_it, fetch): Pass slave_process = true to execute().
5105
2003-10-05 Bruno Haible <bruno@clisp.org>
5107
* write-java.c: Include fatal-signal.h, not signal.h.
5108
(uninstall_handlers): Remove function.
5109
(cleanup): Remove signal argument. Don't execute the signal's default
5110
action; leave that to the caller.
5111
(install_handlers, init_signal_set, block, unblock): Remove functions.
5112
(msgdomain_write_java): Invoke at_fatal_signal instead of
5113
install_handlers/uninstall_handlers. Invoke [un]block_fatal_signals
5114
instead of [un]block.
5116
2003-10-05 Bruno Haible <bruno@clisp.org>
5118
* xgettext.c (substring_match): Remove variable.
5119
(long_options): Remove --keyword-substring option.
5120
(main): Remove handling of --keyword-substring option.
5122
2003-10-05 Bruno Haible <bruno@clisp.org>
5124
* message.h (enum is_format): New item yes_according_to_context.
5125
* message.c (possible_format_p): Handle also yes_according_to_context.
5126
* write-po.c (make_format_description_string): Likewise.
5128
* xgettext.h (struct flag_context_ty): New type.
5129
(null_context, passthrough_context): New declarations.
5130
(inherited_context): New declaration.
5131
(struct flag_context_list_ty): New type.
5132
(struct flag_context_list_iterator_ty): New type.
5133
(null_context_list_iterator, passthrough_context_list_iterator): New
5135
(flag_context_list_iterator): New declaration.
5136
(flag_context_list_iterator_advance): New declaration.
5137
(flag_context_list_table_ty): New type.
5138
(flag_context_list_table_lookup): New declaration.
5139
(xgettext_record_flag): New declaration.
5140
(remember_a_message, remember_a_message_plural): Add context argument.
5141
* xgettext.c: Include alloca.h.
5142
(flag_table_c, flag_table_gcc_internal, flag_table_sh,
5143
flag_table_python, flag_table_lisp, flag_table_elisp,
5144
flag_table_librep, flag_table_java, flag_table_awk, flag_table_ycp,
5145
flag_table_tcl, flag_table_perl, flag_table_php): New variables.
5146
(long_options): Add option --flag.
5147
(extractor_func): Add argument flag_table.
5148
(struct extractor_ty): New type.
5149
(main): Use type 'extractor_ty' instead of 'extractor_func'.
5150
Invoke init_flag_table_c(), init_flag_table_gcc_internal(),
5151
init_flag_table_sh(), init_flag_table_python(), init_flag_table_lisp(),
5152
init_flag_table_elisp(), init_flag_table_librep(),
5153
init_flag_table_java(), init_flag_table_awk(), init_flag_table_ycp(),
5154
init_flag_table_tcl(), init_flag_table_perl(), init_flag_table_php().
5155
Implement option --flag.
5156
(usage): Rename a section to "Language specific options". Document
5157
the languages to which --extract-all, --keyword, --trigraphs are
5158
applicable. Document option --flag.
5159
(null_context): New variable.
5160
(passthrough_context): New variable.
5161
(inherited_context): New function.
5162
(null_context_list_iterator): New variable.
5163
(passthrough_context_circular_list, passthrough_context_list_iterator):
5165
(flag_context_list_iterator): New function.
5166
(flag_context_list_iterator_advance): New function.
5167
(flag_context_list_table_lookup): New function.
5168
(xgettext_record_flag): New function.
5169
(extract_from_file): Change argument type to 'extractor_ty' instead of
5170
'extractor_func'. Set current_formatstring_parser{1,2} before invoking
5172
(set_format_flags_from_context): New function.
5173
(remember_a_message): Add context argument. Set some *-format flag if
5174
the context specifies it.
5175
(remember_a_message_plural): Likewise.
5176
(language_to_extractor): Change return type to 'extractor_ty' instead
5177
of 'extractor_func'.
5179
* x-awk.h (SCANNERS_AWK): Refer to flag_table_awk.
5180
(extract_awk): Add argument flag_table.
5181
(init_flag_table_awk): New declaration.
5182
* x-awk.c (init_flag_table_awk): New function.
5183
(enum token_type_ty): New enum item token_type_semicolon.
5184
(x_awk_lex): Recognize semicolon.
5185
(flag_context_list_table): New variable.
5186
(extract_parenthesized): Add arguments outer_context, context_iter.
5187
Implement context handling depending on symbol before '('. Also
5188
recognize argument lists that start without '(', but only up to the
5190
(extract_awk): Add argument flag_table. Initialize
5191
flag_context_list_table.
5193
* x-c.h (SCANNERS_C): Refer to flag_table_c, flag_table_gcc_internal.
5194
(extract_c): Add argument flag_table.
5195
(init_flag_table_c): New declaration.
5196
(init_flag_table_gcc_internal): New declaration.
5197
* x-c.c (init_flag_table_c): New function.
5198
(init_flag_table_gcc_internal): New function.
5199
(enum xgettext_token_type_ty): New item xgettext_token_type_other.
5200
(x_c_lex): For token_type_name, put the string into the resulting
5201
token instead of freeing it. Return token type
5202
xgettext_token_type_other instead of xgettext_token_type_symbol in
5204
(flag_context_list_table): New variable.
5205
(extract_parenthesized): Add arguments outer_context, context_iter.
5206
Implement context handling depending on symbol before '('.
5207
(extract_c): Add argument flag_table. Initialize
5208
flag_context_list_table.
5210
* x-elisp.h (SCANNERS_ELISP): Refer to flag_table_elisp.
5211
(extract_elisp): Add argument flag_table.
5212
(init_flag_table_elisp): New declaration.
5213
* x-elisp.c (init_flag_table_elisp): New function.
5214
(flag_context_list_table): New variable.
5215
(read_object): Add argument outer_context. Implement context handling
5216
depending on first symbol after '('.
5217
(extract_elisp): Add argument flag_table. Initialize
5218
flag_context_list_table.
5220
* x-glade.h (SCANNERS_GLADE): Update.
5221
(extract_glade): Add argument flag_table.
5222
* x-glade.c (start_element_handler, end_element_handler): Pass null
5223
context to remember_a_message.
5224
(extract_glade): Add argument flag_table.
5226
* x-java.h (SCANNERS_JAVA): Refer to flag_table_java.
5227
(extract_java): Add argument flag_table.
5228
(init_flag_table_java): New declaration.
5229
* x-java.c (init_flag_table_java): New function.
5230
(flag_context_list_table): New variable.
5231
(extract_parenthesized): Add arguments outer_context, context_iter.
5232
Implement context handling depending on symbol before '('.
5233
(extract_java): Add argument flag_table. Initialize
5234
flag_context_list_table.
5236
* x-librep.h (SCANNERS_ELISP): Refer to flag_table_librep.
5237
(extract_librep): Add argument flag_table.
5238
(init_flag_table_librep): New declaration.
5239
* x-librep.c (init_flag_table_librep): New function.
5240
(flag_context_list_table): New variable.
5241
(read_object): Add argument outer_context. Implement context handling
5242
depending on first symbol after '('.
5243
(extract_librep): Add argument flag_table. Initialize
5244
flag_context_list_table.
5246
* x-lisp.h (SCANNERS_LISP): Refer to flag_table_lisp.
5247
(extract_lisp): Add argument flag_table.
5248
(init_flag_table_lisp): New declaration.
5249
* x-lisp.c (init_flag_table_lisp): New function.
5250
(flag_context_list_table): New variable.
5251
(read_object): Add argument outer_context. Implement context handling
5252
depending on first symbol after '('.
5253
(extract_lisp): Add argument flag_table. Initialize
5254
flag_context_list_table.
5256
* x-perl.h (SCANNERS_PERL): Refer to flag_table_perl.
5257
(extract_perl): Add argument flag_table.
5258
(init_flag_table_perl): New declaration.
5259
* x-perl.c (init_flag_table_java): New function.
5260
(flag_context_list_table): New variable.
5261
(extract_variable): Update. Implement context handling depending on
5262
symbol before '{'...'}'.
5263
(interpolate_keywords): Implement context handling depending on symbol
5264
before '->' or '{'...'}'.
5265
(extract_balanced): Add arguments outer_context, context_iter.
5266
Implement context handling depending on symbol before '('. Also
5267
recognize argument lists that start without '('.
5268
(extract_perl): Add argument flag_table. Initialize
5269
flag_context_list_table.
5271
* x-php.h (SCANNERS_PHP): Refer to flag_table_php.
5272
(extract_php): Add argument flag_table.
5273
(init_flag_table_php): New declaration.
5274
* x-php.c (init_flag_table_php): New function.
5275
(flag_context_list_table): New variable.
5276
(extract_parenthesized): Add arguments outer_context, context_iter.
5277
Implement context handling depending on symbol before '('.
5278
(extract_php): Add argument flag_table. Initialize
5279
flag_context_list_table.
5281
* x-po.h (SCANNERS_PO): Update.
5282
(extract_po): Add argument flag_table.
5283
* x-properties.h (SCANNERS_PROPERTIES): Update.
5284
(extract_properties): Add argument flag_table.
5285
* x-po.c (extract_po): Add argument flag_table.
5286
(extract_properties): Add argument flag_table.
5288
* x-python.h (SCANNERS_PYTHON): Refer to flag_table_python.
5289
(extract_python): Add argument flag_table.
5290
(init_flag_table_python): New declaration.
5291
* x-python.c (init_flag_table_python): New function.
5292
(flag_context_list_table): New variable.
5293
(extract_parenthesized): Add arguments outer_context, context_iter.
5294
Implement context handling depending on symbol before '('.
5295
(extract_python): Add argument flag_table. Initialize
5296
flag_context_list_table.
5298
* x-rst.h (SCANNERS_RST): Update.
5299
(extract_rst): Add argument flag_table.
5300
* x-rst.c (extract_rst): Add argument flag_table.
5302
* x-sh.h (SCANNERS_SH): Refer to flag_table_sh.
5303
(extract_sh): Add argument flag_table.
5304
(init_flag_table_sh): New declaration.
5305
* x-sh.c (init_flag_table_sh): New function.
5306
(flag_context_list_table): New variable.
5307
(read_word): Add context argument.
5308
(read_command): Add outer_context argument. Implement context handling
5309
depending on first symbol of command.
5310
(read_command_list): Add outer_context argument.
5311
(extract_sh): Add argument flag_table. Initialize
5312
flag_context_list_table.
5314
* x-smalltalk.h (SCANNERS_SMALLTALK): Update.
5315
(extract_smalltalk): Add argument flag_table.
5316
* x-smalltalk.c (extract_smalltalk): Add argument flag_table.
5318
* x-tcl.h (SCANNERS_TCL): Refer to flag_table_tcl.
5319
(extract_tcl): Add argument flag_table.
5320
(init_flag_table_tcl): New declaration.
5321
* x-tcl.c (init_flag_table_tcl): New function.
5322
(flag_context_list_table): New variable.
5323
(accumulate_word): Add context argument.
5324
(read_word): Add context argument.
5325
(read_command): Add outer_context argument. Implement context handling
5326
depending on first symbol of command.
5327
(read_command_list): Add outer_context argument.
5328
(extract_tcl): Add argument flag_table. Initialize
5329
flag_context_list_table.
5331
* x-ycp.h (SCANNERS_YCP): Refer to flag_table_ycp.
5332
(extract_ycp): Add argument flag_table.
5333
(init_flag_table_ycp): New declaration.
5334
* x-ycp.c (init_flag_table_ycp): New function.
5335
(flag_context_list_table): New variable.
5336
(extract_parenthesized): New function, split off from extract_ycp.
5337
Implement context handling depending on symbol before '('.
5338
(extract_ycp): Add argument flag_table. Initialize
5339
flag_context_list_table. Call extract_parenthesized to do the work.
5341
* po-lex.c (mbfile_getc, control_sequence): Remove explicit marking of
5342
strings as c-format, now done by xgettext.
5344
2003-09-23 Bruno Haible <bruno@clisp.org>
5346
* x-awk.c (extract_parenthesized): Remove optimization of the
5348
* x-c.c (extract_parenthesized): Likewise.
5349
* x-elisp.c (read_object): Likewise.
5350
* x-librep.c (read_object): Likewise.
5351
* x-lisp.c (read_object): Likewise.
5352
* x-perl.c (x_perl_prelex, extract_balanced): Likewise.
5353
* x-php.c (extract_parenthesized): Likewise.
5354
* x-python.c (extract_parenthesized): Likewise.
5355
* x-sh.c (read_command): Likewise.
5357
2003-10-08 Bruno Haible <bruno@clisp.org>
5359
* msgmerge.c (main): Make option -N work.
5360
Reported by Liu Garfield <jackliu9999@hotmail.com>.
5362
2003-10-04 Bruno Haible <bruno@clisp.org>
5365
* x-java.c: New file.
5366
* x-java.l: Remove file.
5367
* Makefile.am (xgettext_SOURCES): Add x-java.c, remove x-java.l.
5368
(x-java.c): Remove rule.
5371
2003-09-22 Bruno Haible <bruno@clisp.org>
5373
* x-glade.c (start_element_handler): Implement extract_all behaviour.
5375
2003-10-04 Bruno Haible <bruno@clisp.org>
5377
* x-glade.c (do_extract_glade): Initialize stack_depth.
5378
* x-perl.c (extract_perl): Initialize linesize and linepos.
5380
* x-python.c (phase2_getc): Set last_comment_line.
5381
(phase5_get): Set last_non_comment_line.
5383
2003-10-04 Bruno Haible <bruno@clisp.org>
5385
* x-glade.c: Don't include msgl-ascii.h and msgl-iconv.h.
5386
* x-python.c: Likewise.
5387
* x-tcl.c: Likewise.
5389
2003-10-06 Guido Flohr <guido@imperia.net>
5390
Bruno Haible <bruno@clisp.org>
5392
* x-perl.c (enum symbol_type_ty): New enum.
5393
(struct token_ty): Rename field string_type to sub_type and change its
5395
(extract_quotelike_pass3, interpolate_keywords): Update.
5396
(x_perl_prelex): Set sub_type also for symbol tokens.
5397
(x_perl_lex): Special handling of prototype argument lists.
5398
Reported by Crispin Flowerday <cflowerday@zeus.com>.
5400
2003-09-22 Bruno Haible <bruno@clisp.org>
5402
* x-sh.c (read_word): Warn about $"...".
5404
2003-09-18 Bruno Haible <bruno@clisp.org>
5406
* gettext-po.h (po_file_domain_header, po_header_field,
5407
po_message_is_obsolete, po_message_is_fuzzy, po_message_is_format): New
5409
* gettext-po.c (po_file_domain_header, po_header_field,
5410
po_message_is_obsolete, po_message_is_fuzzy, po_message_is_format): New
5412
* Makefile.am (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 1:0:1.
5414
2003-09-14 Bruno Haible <bruno@clisp.org>
5416
* plural-count.c: Include plural-count.h.
5417
* x-po.c: Include x-properties.h.
5418
* x-java.l (append_strings): Change argument type to 'const char *'.
5420
2003-09-14 Bruno Haible <bruno@clisp.org>
5422
* msgfmt.c (check_plural_eval): Mark some strings as c-format.
5423
(msgfmt_add_message): Make static.
5424
* po-lex.c (mbfile_getc, control_sequence): Mark some strings as
5427
2003-09-18 Bruno Haible <bruno@clisp.org>
5431
2003-09-14 Bruno Haible <bruno@clisp.org>
5433
More reliable checking for read errors.
5434
* po-lex.c (mbfile_getc): Diagnose read errors also in the middle of
5435
multibyte characters.
5436
(lex_getc): Diagnose read errors also right after backslash.
5437
* x-rst.c (extract_rst): Diagnose read errors also inside ConstName
5438
and immediately after #.
5440
2003-09-14 Bruno Haible <bruno@clisp.org>
5442
* write-mo.c: Include fwriterror.h.
5443
(msgdomain_write_mo): Use fwriteerror, to get right errno value in
5444
error message about write error.
5445
* write-po.c: Include fwriterror.h.
5446
(msgdomain_list_print): Use fwriteerror, to get right errno value in
5447
error message about write error.
5448
* write-java.c: Include fwriterror.h.
5449
(msgdomain_write_java): Use fwriteerror, to get right errno value in
5450
error message about write error.
5451
* write-tcl.c: Include fwriterror.h.
5452
(msgdomain_write_tcl): Use fwriteerror, to get right errno value in
5453
error message about write error.
5455
2003-09-18 Bruno Haible <bruno@clisp.org>
5457
* xgettext.c (from_current_source_encoding): Use multiline_error,
5458
for a prettier error message.
5460
* x-perl.c (extract_quotelike_pass1): Store counter_delim instead of
5461
EOF as delimiter, to avoid error during from_current_source_encoding.
5462
Reported by Crispin Flowerday <cflowerday@zeus.com>.
5464
2003-09-13 Bruno Haible <bruno@clisp.org>
5466
* format-sh.c (INVALID_SHELL_SYNTAX,
5467
INVALID_CONTEXT_DEPENDENT_VARIABLE): New macros.
5468
(format_parse): Reject constructs like ${variable-default} and $?.
5470
2003-09-13 Bruno Haible <bruno@clisp.org>
5472
Fix behaviour of "<program> --help > /dev/full".
5473
* hostname.c: Include closeout.h.
5474
(main): Register close_stdout for execution at program exit.
5475
* msgattrib.c: Include closeout.h.
5476
(main): Register close_stdout for execution at program exit.
5477
* msgcat.c: Include closeout.h.
5478
(main): Register close_stdout for execution at program exit.
5479
* msgcmp.c: Include closeout.h.
5480
(main): Register close_stdout for execution at program exit.
5481
* msgcomm.c: Include closeout.h.
5482
(main): Register close_stdout for execution at program exit.
5483
* msgconv.c: Include closeout.h.
5484
(main): Register close_stdout for execution at program exit.
5485
* msgen.c: Include closeout.h.
5486
(main): Register close_stdout for execution at program exit.
5487
* msgexec.c: Include closeout.h.
5488
(main): Register close_stdout for execution at program exit.
5489
* msgfilter.c: Include closeout.h.
5490
(main): Register close_stdout for execution at program exit.
5491
* msgfmt.c: Include closeout.h.
5492
(main): Register close_stdout for execution at program exit.
5493
* msggrep.c: Include closeout.h.
5494
(main): Register close_stdout for execution at program exit.
5495
* msginit.c: Include closeout.h.
5496
(main): Register close_stdout for execution at program exit.
5497
* msgmerge.c: Include closeout.h.
5498
(main): Register close_stdout for execution at program exit.
5499
* msgunfmt.c: Include closeout.h.
5500
(main): Register close_stdout for execution at program exit.
5501
* msguniq.c: Include closeout.h.
5502
(main): Register close_stdout for execution at program exit.
5503
* urlget.c: Include closeout.h.
5504
(main): Register close_stdout for execution at program exit.
5505
* xgettext.c: Include closeout.h.
5506
(main): Register close_stdout for execution at program exit.
5507
* write-po.c (msgdomain_list_print): Don't fclose (stdout) here.
5509
2003-09-11 Bruno Haible <bruno@clisp.org>
5511
* po-lex.c (mbfile_getc): Handle unexpected return value of
5512
u8_mbtouc(). Reported by Jochen Hein <jochen@jochen.org>.
5514
2003-09-09 Bruno Haible <bruno@clisp.org>
5516
* read-properties.c (phase4_getuc): Cast line_number to 'unsigned long'
5517
before outputting it.
5519
2003-09-09 Bruno Haible <bruno@clisp.org>
5521
* po-lex.c: Test HAVE_DECL_GETC_UNLOCKED instead of HAVE_GETC_UNLOCKED.
5522
* write-po.c: Test HAVE_DECL_PUTC_UNLOCKED instead of
5525
2003-09-09 Guido Flohr <guido@imperia.net>
5527
* x-perl.c (extract_quotelike_pass3): Change \l handling to no longer
5528
eat up non-uppercase characters; likewise for \u. Also make \l and \u
5529
work on characters written using hex or octal escape sequence. Fix \Q
5530
handling. With option --extract-all, avoid "invalid variable
5531
interpolation" warnings.
5532
(x_perl_prelex): With option --extract-all, keep variables inside
5533
double-quoted strings untouched.
5535
2003-09-03 Bruno Haible <bruno@clisp.org>
5539
* xgettext.c: Include x-sh.h.
5540
(main): Call x_sh_extract_all, x_sh_keyword.
5541
(usage): Mention Shell language.
5542
(language_to_extractor): Add Shell rule.
5543
(extension_to_language): Add Shell rule.
5544
* Makefile.am (noinst_HEADERS): Add x-sh.h.
5545
(xgettext_SOURCES): Add x-sh.c.
5546
* Makefile.msvc (xgettext_OBJECTS): Add x-sh.obj.
5547
(x-sh.obj): New rule.
5548
* Makefile.vms (xgettext_OBJECTS): Add x-sh.obj.
5549
(x-sh.obj): New rule.
5551
2003-08-31 Bruno Haible <bruno@clisp.org>
5553
* format-sh.c: New file.
5554
* message.h (format_sh): New enum value.
5555
(NFORMATS): Increment.
5556
* format.h (formatstring_sh): New declaration.
5557
* format.c (formatstring_parsers): Add entry for sh.
5558
* message.c (format_language, format_language_pretty): Likewise.
5559
* Makefile.am (FORMAT_SOURCE): Add format-sh.c.
5560
* Makefile.msvc (OBJECTS): Add format-sh.obj.
5561
(format-sh.obj): New rule.
5562
* Makefile.vms (OBJECTS): Add format-sh.obj.
5563
(format-sh.obj): New rule.
5565
2003-08-31 Bruno Haible <bruno@clisp.org>
5567
* format-gcc-internal.c (isdigit): Remove unused macro.
5568
* format-perl-brace.c (isdigit): Likewise.
5570
2003-09-01 Guido Flohr <guido@imperia.net>
5572
* x-perl.c (extract_balanced): Access the global last_token.
5573
Initialize last_token and prefer_division_over_regexp here.
5574
(extract_perl): Not here.
5576
2003-08-29 Bruno Haible <bruno@clisp.org>
5578
* x-perl.c: Include getline.h.
5580
2003-08-24 Bruno Haible <bruno@clisp.org>
5582
* Makefile.msvc (format.obj, msgmerge.obj, xgettext.obj, msgattrib.obj,
5583
msgcat.obj, msgcomm.obj, msgconv.obj, msgen.obj, msgfilter.obj,
5584
msggrep.obj, msguniq.obj): Compile these in C++ mode. This works around
5585
the "non-constant initializer" error that we get for addresses of
5586
variables in DLLs in C mode.
5588
2003-08-24 Bruno Haible <bruno@clisp.org>
5590
* msgfilter.c (process_message): Cast xrealloc() result.
5592
2003-08-24 Bruno Haible <bruno@clisp.org>
5594
* msgfilter.c: On Windows, include <io.h> instead of <unistd.h>.
5595
* msggrep.c: Likewise.
5597
2003-08-24 Bruno Haible <bruno@clisp.org>
5599
* plural-count.h: New file.
5600
* plural-count.c: New file, extracted from msgmerge.c.
5601
* msgmerge.c: Include plural-count.h instead of plural-exp.h.
5602
(match_domain): Use function get_plural_count().
5603
* Makefile.am (noinst_HEADERS): Add plural-count.h.
5604
(msgmerge_SOURCES): Add plural-count.c.
5605
* Makefile.msvc (msgmerge_OBJECTS): Add plural-count.obj.
5606
(plural-count.obj): New rule.
5607
* Makefile.vms (msgmerge_OBJECTS): Add plural-count.obj.
5608
(plural-count.obj): New rule.
5610
2003-08-24 Bruno Haible <bruno@clisp.org>
5612
Support for building DLLs on Windows.
5613
* format.h (formatstring_c, formatstring_python, formatstring_lisp,
5614
formatstring_elisp, formatstring_librep, formatstring_smalltalk,
5615
formatstring_java, formatstring_awk, formatstring_pascal,
5616
formatstring_ycp, formatstring_tcl, formatstring_perl,
5617
formatstring_perl_brace, formatstring_php, formatstring_gcc_internal,
5618
formatstring_parsers): Add DLL_VARIABLE attribute.
5619
* message.h (format_language, format_language_pretty): Likewise.
5620
* msgl-cat.h (more_than, less_than, use_first, msgcomm_mode,
5621
omit_header): Likewise.
5622
* plural-table.h (plural_table, plural_table_size): Likewise.
5623
* po-charset.h (po_charset_ascii, po_charset_utf8, po_lex_charset,
5624
po_lex_iconv, po_lex_weird_cjk): Likewise.
5625
* po-lex.h (gram_pos, gram_pos_column, gram_max_allowed_errors,
5626
pass_obsolete_entries): Likewise.
5627
* read-po.h (line_comment, allow_duplicates, input_syntax): Likewise.
5628
* write-mo.h (alignment, no_hash_table): Likewise.
5629
* Makefile.am (po-gram-gen2.h): Likewise.
5631
2003-08-24 Bruno Haible <bruno@clisp.org>
5633
* Makefile.msvc (gettext-po.obj, gettextpo.lib, gettextpo.res): New
5635
(all): Depend on gettextpo.lib.
5636
(install, installdirs, uninstall): Install/uninstall gettext-po.h,
5637
gettextpo.dll and gettextpo.lib.
5638
* Makefile.vms (gettext-po.obj, gettextpo.olb): New rules.
5639
(all): Depend on gettextpo.olb.
5640
(install, installdirs, uninstall): Install/uninstall gettext-po.h,
5643
2003-08-24 Bruno Haible <bruno@clisp.org>
5645
* dir-list.h: Make this file includable in C++ mode: add extern "C".
5646
* file-list.h: Likewise.
5647
* format.h: Likewise.
5648
* message.h: Likewise.
5649
* msgl-ascii.h: Likewise.
5650
* msgl-cat.h: Likewise.
5651
* msgl-charset.h: Likewise.
5652
* msgl-english.h: Likewise.
5653
* msgl-equal.h: Likewise.
5654
* msgl-iconv.h: Likewise.
5655
* open-po.h: Likewise.
5656
* po-charset.h: Likewise.
5657
* po-lex.h: Likewise.
5658
* po-time.h: Likewise.
5659
* read-po-abstract.h: Likewise.
5660
* str-list.h: Likewise.
5661
* write-po.h: Likewise.
5662
* xgettext.h: Likewise.
5663
* read-po.h: Likewise.
5664
(this): Redefine to a different symbol.
5665
* xgettext.c: Add extern "C" around all "x-*.h" includes.
5667
2003-08-22 Bruno Haible <bruno@clisp.org>
5669
* format-awk.c: Include error-progname.h instead of progname.h.
5670
* format-c.c: Likewise.
5671
* format-elisp.c: Likewise.
5672
* format-gcc-internal.c: Likewise.
5673
* format-java.c: Likewise.
5674
* format-librep.c: Likewise.
5675
* format-lisp.c: Likewise.
5676
* format-pascal.c: Likewise.
5677
* format-perl.c: Likewise.
5678
* format-perl-brace.c: Likewise.
5679
* format-php.c: Likewise.
5680
* format-python.c: Likewise.
5681
* format-tcl.c: Likewise.
5682
* format-ycp.c: Likewise.
5683
* po-lex.h: Likewise.
5684
* read-properties.c: Likewise.
5685
* write-po.c: Likewise.
5686
* x-awk.c: Likewise.
5688
* x-perl.c: Likewise.
5689
* x-python.c: Likewise.
5690
* x-rst.c: Likewise.
5691
* hostname.c: Include error-progname.h.
5692
* msgattrib.c: Likewise.
5693
* msgcat.c: Likewise.
5694
* msgcmp.c: Likewise.
5695
* msgcomm.c: Likewise.
5696
* msgconv.c: Likewise.
5697
* msgen.c: Likewise.
5698
* msgexec.c: Likewise.
5699
* msgfilter.c: Likewise.
5700
* msgfmt.c: Likewise.
5701
* msggrep.c: Likewise.
5702
* msginit.c: Likewise.
5703
* msgmerge.c: Likewise.
5704
* msgunfmt.c: Likewise.
5705
* msguniq.c: Likewise.
5706
* urlget.c: Likewise.
5707
* xgettext.c: Likewise.
5708
* po-lex.c: Include error-progname.h and pos.h.
5710
2003-08-15 Bruno Haible <bruno@clisp.org>
5712
* msginit.c (catalogname_for_locale): Add entries for Aragonese,
5713
Haitian, Sichuan Yi, Limburgish.
5714
(englishname_of_language): Likewise.
5716
2003-08-08 Bruno Haible <bruno@clisp.org>
5718
* format-gcc-internal.c: New file.
5719
* message.h (format_gcc_internal): New enum value.
5720
(NFORMATS): Increment.
5721
* format.h (formatstring_gcc_internal): New declaration.
5722
* format.c (formatstring_parsers): Add entry for gcc_internal.
5723
* message.c (format_language, format_language_pretty): Likewise.
5724
* x-c.h (SCANNERS_C): Add an entry for GCC-source.
5725
* xgettext.c (usage): Mention GCC-source language.
5726
* Makefile.am (FORMAT_SOURCE): Add format-gcc-internal.c.
5727
* Makefile.msvc (OBJECTS): Add format-gcc-internal.obj.
5728
(format-gcc-internal.obj): New rule.
5729
* Makefile.vms (OBJECTS): Add format-gcc-internal.obj.
5730
(format-gcc-internal.obj): New rule.
5732
2003-08-04 Bruno Haible <bruno@clisp.org>
5734
* x-perl.c (extract_quotelike_pass3): Fix \x handling.
5735
Reported by Guido Flohr.
5737
2003-07-05 Bruno Haible <bruno@clisp.org>
5739
* format-perl-brace.c: Renamed from format-perl-bracket.c. Recognize
5740
braces instead of brackets.
5741
* format.h (formatstring_perl_brace): Renamed from
5742
formatstring_perl_bracket.
5743
* format.c (formatstring_parsers): Add formatstring_perl_brace, remove
5744
formatstring_perl_bracket.
5745
* message.h (enum format_type): Add format_perl_brace, remove
5746
format_perl_bracket.
5747
* message.c (format_language, format_language_pretty): Update.
5748
* x-perl.h (SCANNERS_PERL): Update.
5749
* Makefile.am (FORMAT_SOURCE): Add format-perl-brace.c, remove
5750
format-perl-bracket.c.
5751
* Makefile.msvc (OBJECTS): Add format-perl-brace.obj, remove
5752
format-perl-bracket.obj.
5753
(format-perl-brace.obj): Renamed from format-perl-bracket.obj.
5754
* Makefile.vms (OBJECTS): Add format-perl-brace.obj, remove
5755
format-perl-bracket.obj.
5756
(format-perl-brace.obj): Renamed from format-perl-bracket.obj.
5758
2003-07-03 Bruno Haible <bruno@clisp.org>
5760
Support for PHP >= 4.2.0.
5761
* x-php.c (init_keywords): Add ngettext, dngettext, dcngettext to the
5763
Reported by A. Sopicki <a.sopicki@gmx.de>.
5765
2003-06-27 Bruno Haible <bruno@clisp.org>
5767
* xgettext.h (from_current_source_encoding): New declaraction.
5768
* xgettext.c (from_current_source_encoding): New function.
5769
(CONVERT_STRING): Use it.
5770
* x-perl.c: Include po-charset.h.
5771
(get_here_document): Convert each line to UTF-8.
5772
(phase2_getc): Convert each comment to UTF-8. Tell xgettext_comment_add
5774
(extract_quotelike_pass1_utf8): New function.
5775
(extract_quotelike): Use extract_quotelike_pass1_utf8.
5776
(extract_triple_quotelike): Likewise.
5777
(extract_variable): Tell remember_a_message to not convert the string.
5778
(interpolate_keywords): Likewise.
5779
(extract_balanced): Tell remember_a_message, remember_a_message_plural
5780
to not convert the string.
5782
2003-06-23 Guido Flohr <guido@imperia.net>
5784
* x-perl.c (extract_quotelike_pass3): Fix handling of doubled
5785
backslashes in single-quoted strings.
5787
2003-06-23 Bruno Haible <bruno@clisp.org>
5789
* format-perl-bracket.c (format_check): Allow additional bracketed
5790
items in the msgstr.
5792
2003-06-22 Bruno Haible <bruno@clisp.org>
5794
* write-properties.c: Don't include exit.h and gettext.h.
5796
2003-06-22 Bruno Haible <bruno@clisp.org>
5798
* x-php.c (phase3_ungetc): Comment out unused function.
5800
2003-06-21 Bruno Haible <bruno@clisp.org>
5802
* format-perl.c: Complete rewrite.
5803
* format-perl-bracket.c: New file.
5804
* message.h (format_perl_bracket): New enum value.
5805
(NFORMATS): Increment.
5806
* format.h (formatstring_perl_bracket): New declaration.
5807
* format.c (formatstring_parsers): Add entry for perl_bracket.
5808
* message.c (format_language, format_language_pretty): Likewise.
5809
* x-perl.h (SCANNERS_PERL): Use formatstring_perl and
5810
formatstring_perl_bracket.
5811
* Makefile.am (FORMAT_SOURCE): Add format-perl-bracket.c.
5812
* Makefile.msvc (OBJECTS): Add format-perl.obj,format-perl-bracket.obj.
5813
(xgettext_OBJECTS): Add x-perl.obj.
5814
(format-perl.obj, format-perl-bracket.obj, x-perl.obj): New rules.
5815
* Makefile.vms (OBJECTS): Add format-perl.obj, format-perl-bracket.obj.
5816
(xgettext_OBJECTS): Add x-perl.obj.
5817
(format-perl.obj, format-perl-bracket.obj, x-perl.obj): New rules.
5819
* x-perl.c (extract_quotelike_pass3): Don't give an invalid
5820
interpolation error for a backslashed dollar sign.
5822
2003-06-21 Bruno Haible <bruno@clisp.org>
5824
* x-perl.c (extract_quotelike_pass3): Fix handling of double backslash.
5826
2003-06-19 Bruno Haible <bruno@clisp.org>
5828
* x-perl.c (enum string_type_ty): Remove trailing comma.
5829
(interpolate_keywords::enum parser_state): Likewise.
5830
(extract_quotelike_pass3): Cast first argument of u8_uctomb().
5832
2003-06-15 Bruno Haible <bruno@clisp.org>
5834
* x-awk.c: Reorder definitions.
5835
* x-c.c: Reorder definitions.
5836
* x-perl.c: Reorder definitions.
5837
* x-php.c: Reorder definitions.
5838
* x-python.c: Reorder definitions.
5839
* x-smalltalk.c: Reorder definitions.
5840
* x-ycp.c: Reorder definitions.
5842
2003-06-15 Bruno Haible <bruno@clisp.org>
5844
* x-perl.c (struct stack_entry): Remove type.
5845
(struct stack): Remove type.
5846
(struct token_stack_ty): New type.
5847
(token_stack): Change type to 'struct token_stack_ty'.
5848
(token_stack_dump): Renamed from stack_dump. Update.
5849
(token_stack_push): Renamed from stack_unshift. Rewritten.
5850
(token_stack_pop): Renamed from stack_shift. Rewritten.
5851
(token_stack_peek): Renamed from stack_head. Rewritten.
5852
(token_stack_free): Renamed from stack_free. Rewritten.
5853
(x_perl_lex, x_perl_unlex, extract_perl): Update.
5855
2003-06-15 Bruno Haible <bruno@clisp.org>
5857
* x-perl.c (DEBUG_MEMORY): Remove macro.
5858
(remember_a_message_debug, remember_a_message_plural_debug,
5859
xmalloc_debug, xrealloc_debug, xrealloc_static_debug, xstrdup_debug,
5860
free_debug): Remove functions.
5861
(xrealloc_static): Remove macro. Use xrealloc instead.
5863
2003-06-15 Bruno Haible <bruno@clisp.org>
5865
* x-awk.c (phase2_getc, x_awk_lex): Increase bufmax proportionally.
5866
* x-c.c (comment_add, comment_line_end, phase5_get, phase6_get):
5868
* x-elisp.c (comment_add, comment_line_end): Likewise.
5869
* x-librep.c (comment_add, comment_line_end): Likewise.
5870
* x-lisp.c (comment_add, comment_line_end): Likewise.
5871
* x-php.c (comment_add, comment_line_end, x_php_lex): Likewise.
5872
* x-python.c (comment_add, comment_line_end, phase5_get): Likewise.
5873
* x-rst.c (extract_rst): Likewise.
5874
* x-smalltalk.c (comment_add, comment_line_end, phase2_get): Likewise.
5875
* x-tcl.c (comment_add, comment_line_end): Likewise.
5876
* x-ycp.c (phase2_getc, x_ycp_lex): Likewise.
5878
2003-06-15 Bruno Haible <bruno@clisp.org>
5880
* xgettext.c (current_formatstring_parser1,
5881
current_formatstring_parser2): New variables, replacing
5882
current_formatstring_parser.
5883
(remember_a_message, remember_a_message_plural): Try both
5884
formatstring parsers.
5885
(language_to_extractor): Allow two formatstring parsers per language,
5887
* x-perl.h (SCANNERS_PERL): Add formatstring_c as secondary format
5889
* x-awk.h (SCANNERS_AWK): Update.
5890
* x-c.h (SCANNERS_C): Update.
5891
* x-elisp.h (SCANNERS_ELISP): Update.
5892
* x-glade.h (SCANNERS_GLADE): Update.
5893
* x-java.h (SCANNERS_JAVA): Update.
5894
* x-librep.h (SCANNERS_LIBREP): Update.
5895
* x-lisp.h (SCANNERS_LISP): Update.
5896
* x-php.h (SCANNERS_PHP): Update.
5897
* x-po.h (SCANNERS_PO): Update.
5898
* x-properties.h (SCANNERS_PROPERTIES): Update.
5899
* x-python.h (SCANNERS_PYTHON): Update.
5900
* x-rst.h (SCANNERS_RST): Update.
5901
* x-smalltalk.h (SCANNERS_SMALLTALK): Update.
5902
* x-tcl.h (SCANNERS_TCL): Update.
5903
* x-ycp.h (SCANNERS_YCP): Update.
5905
2003-06-15 Bruno Haible <bruno@clisp.org>
5907
* x-perl.c (case_whitespace): New macro.
5908
(is_whitespace): New function.
5909
(interpolate_keywords): Add lineno argument. Track newlines to update
5910
lineno while processing the string. Use is_whitespace.
5911
(extract_triple_quotelike): Update. Use is_whitespace.
5912
(extract_variable): Simplify: add final NUL byte only when done. Use
5914
(x_perl_prelex): Use is_whitespace. After reading a here document, use
5915
line_number+1, not line_number. Fix buffer overrun in <<XYZ handling.
5916
(collect_message): Use is_whitespace.
5917
(extract_balanced): Call free_token at the end of the loop, not at the
5920
2003-06-14 Bruno Haible <bruno@clisp.org>
5922
* x-perl.c (enum token_type_ty): Reorder, so as to simplify the
5923
function free_token().
5924
(struct token_ty): Fix comments.
5925
(token2string): Add const.
5926
(token_stack): Make static.
5927
(*_debug, stack_dump): Remove all fflushs.
5928
(linebuf, linesize, linepos, linebuf_size, last_token, here_eaten,
5929
end_of_file): Make static.
5930
(last_string, last_string_finished): Remove unused variables.
5931
(phase1_getc, get_here_document, skip_pod): Test getline() result
5932
for being < 0, not == EOF.
5933
(phase1_ungetc): Signal internal error through abort(), not exit().
5934
(get_here_document): Tweak. Increase bufmax proportionally.
5935
(phase2_getc): Increase bufmax proportionally.
5936
(prefer_division_over_regexp): Fix comment.
5937
(extract_hex, extract_oct): Add const. Simplify.
5938
(extract_quotelike): Add a safety check.
5939
(extract_quotelike_pass1): Increase bufmax proportionally. Fix
5940
insufficient memory allocation at "bufpos + len >= bufmax".
5941
(extract_quotelike_pass3): Increase bufmax proportionally. Make crs
5942
const. After \x{ABC} position crs after the closing brace. Simplify \c
5943
code. Reduce memory allocation when \N{ABC} is seen. Fix bug in \l and
5944
\u. Fix error message when $ or @ is seen.
5945
(extract_variable): Increase bufmax proportionally.
5946
(interpolate_keywords): Likewise. Convert c's value to unsigned char.
5947
(x_perl_prelex): Increase bufmax proportionally. Compute 4th argument
5948
to extract_triple_quotelike completely.
5949
(extract_perl): Initialize token_stack correctly.
5951
2003-06-13 Bruno Haible <bruno@clisp.org>
5953
* msgexec.c (process_string): Pass null_stderr=false.
5954
* msgfilter.c (process_string): Likewise.
5955
* msggrep.c (is_string_selected): Likewise.
5956
* read-java.c (execute_and_read_po_output): Likewise.
5957
* read-tcl.c (msgdomain_read_tcl): Likewise.
5958
* msginit.c (project_id, project_id_version, get_user_email,
5959
language_team_address): Return a default value if the subprocess
5960
fails, instead of exiting.
5962
2003-06-12 Bruno Haible <bruno@clisp.org>
5964
* Makefile.am (noinst_HEADERS): Add x-perl.h.
5965
(FORMAT_SOURCE): Add format-perl.c.
5966
(xgettext_SOURCES): Add x-perl.c.
5967
* message.h (enum format_type): Mention perl between tcl and php.
5968
* message.c (format_language, format_language_pretty): Likewise.
5969
* format.h (formatstring_perl): Likewise.
5970
* format.c (formatstring_parsers): Likewise.
5971
* format-perl.c: Use GNU coding style. Prefer xmalloc over xcalloc.
5972
* x-perl.h: Assume ANSI C.
5973
* x-perl.c: Assume ANSI C. Use GNU coding style. Prefer xmalloc over
5975
(token_buf): Remove unused variable.
5976
(xcalloc_debug, stack_push, stack_pop): Remove unused functions.
5977
* xgettext.c: Mention perl between tcl and php.
5979
2003-06-11 Guido Flohr <guido@imperia.net>
5981
* message.h (enum format_type): New enum value 'format_perl'.
5982
(NFORMATS): Increment.
5983
* message.c (format_language, format_language_pretty): Add entry
5985
* format.h (formatstring_perl): New declaration.
5986
* format-perl.c: New file.
5987
* format.c (formatstring_parsers): Add entry for perl.
5988
* x-perl.h: New file.
5989
* x-perl.c: New file.
5990
* xgettext.c: Include x-perl.h.
5991
(main): Call x_perl_extract_all, x_perl_keyword.
5992
(usage): Mention Perl language.
5993
(language_to_extractor): Add Perl rule.
5994
(extension_to_language): Add Perl rule.
5996
2003-06-08 Bruno Haible <bruno@clisp.org>
5998
* Makefile.vms (LDADD): Take options from .opt files.
5999
(libiconv.opt): New rule.
6000
(msgcmp.exe, msgfmt.exe, msgmerge.exe, msgunfmt.exe, xgettext.exe,
6001
msgattrib.exe, msgcat.exe, msgcomm.exe, msgconv.exe, msgen.exe,
6002
msgexec.exe, msgfilter.exe, msggrep.exe, msginit.exe, msguniq.exe):
6004
* plural-eval.c: Include "eval-plural.h" without a path, rely on the
6005
Makefile's -I options instead.
6006
* read-properties.c (conv_from_java): Change type of q to
6008
Reported by Jouk Jansen <joukj@hrem.stm.tudelft.nl>.
6010
2003-05-27 Bruno Haible <bruno@clisp.org>
6012
* plural-table.c (plural_table): Correct entry for Slovak.
6013
Reported by Marcel Telka <marcel@telka.sk>.
6015
2003-05-24 Bruno Haible <bruno@clisp.org>
6017
* x-glade.h (EXTENSIONS_GLADE): Also recognize the .glade2 extension.
6018
* x-glade.c (start_element_handler): Also extract strings according to
6019
Glade 2 conventions.
6021
2003-05-22 Bruno Haible <bruno@clisp.org>
6023
* gettext-0.12.1 released.
6025
2003-05-21 Bruno Haible <bruno@clisp.org>
6027
* msggrep.c (main) [Solaris]: Fix syntax error.
6028
Reported by Valery Beaud <valery.beaud@art.alcatel.fr>.
6030
2003-05-21 Bruno Haible <bruno@clisp.org>
6032
* xgettext.c (output_syntax): New variable.
6034
(finalize_header): If --properties-output was given, set the charset.
6036
2003-05-18 Bruno Haible <bruno@clisp.org>
6038
* Makefile.msvc (DEBUGFLAGS): New variable.
6039
(gettextsrc.lib): Use it.
6040
(msgcmp.exe, msgfmt.exe, msgmerge.exe, msgunfmt.exe, xgettext.exe,
6041
msgattrib.exe, msgcat.exe, msgcomm.exe, msgconv.exe, msgen.exe,
6042
msgexec.exe, msgfilter.exe, msggrep.exe, msginit.exe, msguniq.exe):
6043
Use it, and MFLAGS too.
6045
2003-05-17 Bruno Haible <bruno@clisp.org>
6047
* gettext-0.12 released.
6049
2003-05-17 Bruno Haible <bruno@clisp.org>
6051
* Makefile.msvc (msgcmp.exe, msgfmt.exe, msgmerge.exe, msgunfmt.exe,
6052
msgattrib.exe, msgcat.exe, msgcomm.exe, msgconv.exe, msgen.exe,
6053
msgexec.exe, msgfilter.exe, msggrep.exe, msginit.exe, msguniq.exe):
6054
Link with iconv.lib, needed by intl.lib.
6056
2003-05-12 Bruno Haible <bruno@clisp.org>
6058
* msginit.c (F_OK): Provide a fallback value.
6059
Reported by Perry Rapp.
6061
2003-05-10 Bruno Haible <bruno@clisp.org>
6063
* msgl-iconv.c (iconv_string): Don't return -1 just because the string
6064
is longer than 4 KB.
6065
Reported by Denis Barbier <barbier@linuxfr.org>.
6067
2003-05-04 Bruno Haible <bruno@clisp.org>
6069
* po-lex.h (po_gram_error): Don't use ISO C 99 feature on DEC C.
6070
* po-lex.c (po_gram_error): LIkewise.
6072
2003-05-03 Bruno Haible <bruno@clisp.org>
6074
* msgfilter.c: Include <sys/select.h> also on EMX.
6075
Reported by Andreas Buening <andreas.buening@nexgo.de>.
6077
2003-04-26 Bruno Haible <bruno@clisp.org>
6079
* message.h (msgdomain_list_ty): Add field 'encoding'.
6080
* message.c (msgdomain_list_alloc): Initialize it.
6081
* read-properties.h: New file.
6082
* read-properties.c: New file.
6083
* read-po-abstract.h (abstract_po_reader_class_ty): In
6084
directive_message field, add force_fuzzy argument.
6085
(po_scan_start, po_scan_end): Remove declarations.
6086
(input_syntax_ty): New type.
6087
(po_callback_message): Add force_fuzzy argument.
6088
* read-po-abstract.c (call_directive_message, po_callback_message):
6089
Add force_fuzzy argument.
6090
(po_scan_start, po_scan_end): Make static.
6091
(po_scan): Add support for syntax_properties. Move
6092
error_message_count handling to here.
6093
(po_callback_message): Move po_lex_charset_set invocation away.
6094
* read-po.h (default_po_reader_class_ty): In add_message field, add
6095
force_fuzzy argument.
6096
(default_directive_message, default_add_message): Add force_fuzzy
6098
(inout_syntax): New declaration.
6099
* read-po.c (call_add_message): Add force_fuzzy argument.
6100
(default_directive_message, default_add_message): Likewise.
6101
(input_syntax): New variable.
6102
(read_po): Pass input_syntax to po_scan(). Set mdlp->encoding if
6104
* po-gram-gen.y: Pass force_fuzzy = false.
6105
(do_callback_message): New function. Move po_lex_charset_set
6107
* po-lex.c (lex_end): Move error_message_count handling away.
6108
* write-properties.h: New file.
6109
* write-properties.c: New file.
6110
* write-po.h (message_print_syntax_properties): New declaration.
6111
* write-po.c (use_syntax_properties): New variable.
6112
(message_print_syntax_properties): New function.
6113
(msgdomain_list_print_po): New function, extracted from
6114
msgdomain_list_print.
6115
(msgdomain_list_print): Add check for plural forms. Add support for
6116
writing the .properties format.
6117
(extract_po): Renamed from extract.
6118
* write-java.h (msgdomain_write_java): Add canon_encoding argument.
6119
* write-java.c (msgdomain_write_java): Likewise.
6120
* write-tcl.h (msgdomain_write_tcl): Likewise.
6121
* write-tcl.c (msgdomain_write_tcl): Likewise.
6122
* msgl-cat.c (catenate_msgdomain_list): Use mdlp->encoding if there
6123
is no header entry. Set total_mdlp->encoding if possible.
6124
* msgl-iconv.c (iconv_msgdomain_list): Use mdlp->encoding if there
6125
is no header entry. Set mdlp->encoding.
6126
* msgattrib.c (long_options): Add --properties-input/output.
6127
(main): Handle them.
6128
(usage): Document options -P and -p.
6129
* msgcat.c (long_options): Add --properties-input/output.
6130
(main): Handle them. If option -p is used, convert to UTF-8 and
6132
(usage): Document options -P and -p.
6133
* msgcomm.c (long_options): Add --properties-input/output.
6134
(main): Handle them.
6135
(usage): Document options -P and -p.
6136
* msgconv.c (long_options): Add --properties-input/output.
6137
(main): Handle them. If option -p is used, ignore the to_code.
6138
(usage): Document options -P and -p.
6139
* msgen.c (long_options): Add --properties-input/output.
6140
(main): Handle them.
6141
(usage): Document options -P and -p.
6142
* msgfilter.c (long_options): Add --properties-input/output.
6143
(main): Handle them.
6144
(usage): Document options -P and -p.
6145
* msggrep.c (long_options): Add --properties-input/output.
6146
(main): Handle them.
6147
(usage): Document options -P and -p.
6148
* msginit.c (long_options): Add --properties-input/output.
6149
(main): Handle them.
6150
(usage): Document options -P and -p.
6151
* msgmerge.c (long_options): Add --properties-input/output.
6152
(main): Handle them. In update mode, --properties-input implies
6153
--properties-output.
6154
(usage): Document options -P and -p.
6155
(merge): Set result->encoding if possible.
6156
* msguniq.c (long_options): Add --properties-input/output.
6157
(main): Handle them.
6158
(usage): Document options -P and -p.
6159
* msgcmp.c (long_options): Add --properties-input.
6161
(usage): Document option -P.
6162
* msgexec.c (long_options): Add --properties-input.
6164
(usage): Document option -P.
6165
* msgfmt.c (long_options): Add --properties-input.
6166
(main): Handle it. Pass the known canon_encoding to
6167
msgdomain_write_java and msgdomain_write_tcl.
6168
(usage): Document option -P.
6169
(msgfmt_add_message): Add force_fuzzy argument.
6170
(read_po_file_msgfmt): Pass input_syntax to po_scan().
6171
* msgunfmt.c (long_options): Add --properties-output.
6173
(usage): Document option -p.
6174
* x-properties.h: New file.
6175
* x-po.c (extract_add_message): Add force_fuzzy argument.
6176
(extract): Renamed from extract_po. Pass input_syntax to po_scan().
6177
(extract_po): New function.
6178
(extract_properties): New function.
6179
* xgettext.h: Include read-po.h.
6180
* xgettext.c (long_options): Add --properties-output.
6182
(usage): Document options -L JavaProperties and --properties-output.
6183
(exclude_directive_message): Add force_fuzzy argument.
6184
(read_exclusion_file): Pass input_syntax to po_scan().
6185
(table): Add support for .properties format.
6186
* Makefile.am (noinst_HEADERS): Add read-properties.h,
6187
write-properties.h, x-properties.h.
6188
(COMMON_SOURCE): Add read-properties.c.
6189
(libgettextsrc_la_SOURCES): Add write-properties.c.
6190
* Makefile.msvc (OBJECTS): Add read-properties.obj,
6191
write-properties.obj.
6192
(read-properties.obj, write-properties.obj): New rules.
6193
* Makefile.vms (OBJECTS): Add read-properties.obj,
6194
write-properties.obj.
6195
(read-properties.obj, write-properties.obj): New rules.
6198
2003-04-21 Bruno Haible <bruno@clisp.org>
6200
* read-po-abstract.h (po_scan_file): Remove declaration.
6201
* read-po-abstract.c (po_scan_file): Remove function.
6202
* read-po.c (read_po_file): Call read_po.
6203
* msgfmt.c (read_po_file_msgfmt): Call open_po_file. Invoke po_scan
6204
instead of po_scan_file.
6205
* xgettext.c (read_exclusion_file): Call open_po_file. Invoke po_scan
6206
instead of po_scan_file.
6208
2003-04-20 Bruno Haible <bruno@clisp.org>
6210
* open-po.h (open_po_file): Add argument 'exit_on_error'.
6211
* open-po.c (try_open_po_file): Renamed from open_po_file.
6212
(open_po_file): New function.
6213
* po-lex.h (lex_end): Change return type to void.
6214
(lex_open, lex_close): Remove declarations.
6215
* po-lex.c (lex_end): Change return type to void.
6216
(lex_open, lex_close): Remove functions.
6217
* read-po-abstract.c (po_scan_file): Inline lex_open and lex_close.
6220
2003-04-14 Bruno Haible <bruno@clisp.org>
6222
* hostname.c (usage): Split strings: use one string per option
6224
* msgattrib.c (usage): Likewise.
6225
* msgcat.c (usage): Likewise.
6226
* msgcmp.c (usage): Likewise.
6227
* msgcomm.c (usage): Likewise.
6228
* msgconv.c (usage): Likewise.
6229
* msgen.c (usage): Likewise.
6230
* msgexec.c (usage): Likewise.
6231
* msgfilter.c (usage): Likewise.
6232
* msgfmt.c (usage): Likewise.
6233
* msggrep.c (usage): Likewise.
6234
* msginit.c (usage): Likewise.
6235
* msgmerge.c (usage): Likewise.
6236
* msgunfmt.c (usage): Likewise.
6237
* msguniq.c (usage): Likewise.
6238
* urlget.c (usage): Likewise.
6239
* xgettext.c (usage): Likewise.
6241
2003-04-13 Bruno Haible <bruno@clisp.org>
6243
Unify three PO file parsers.
6244
* read-po-abstract.h: Renamed from po.h.
6245
(abstract_po_reader_class_ty): Renamed from po_method_ty.
6246
(abstract_po_reader_ty): Renamed from po_ty.
6247
(ABSTRACT_PO_READER_TY): Renamed from PO_BASE_TY.
6248
(po_reader_alloc): Renamed from po_alloc.
6249
(po_reader_free): Renamed from po_free.
6250
* read-po-abstract.c: Renamed from po.c.
6251
(po_reader_alloc): Renamed from po_alloc.
6252
(po_reader_free): Renamed from po_free.
6253
(call_parse_brief): Renamed from po_parse_brief.
6254
(call_parse_debrief): Renamed from po_parse_debrief.
6255
(call_directive_domain): Renamed from po_directive_domain.
6256
(call_directive_message): Renamed from po_directive_message.
6257
(call_comment): Renamed from po_comment.
6258
(call_comment_dot): Renamed from po_comment_dot.
6259
(call_comment_filepos): Renamed from po_comment_filepos.
6260
(call_comment_special): Renamed from po_comment_special.
6261
* read-po.h: Include read-po-abstract.h.
6262
(default_po_reader_class_ty, default_po_reader_ty): New types.
6263
(ABSTRACT_PO_READER_TY): New macro.
6264
(default_constructor, default_destructor, default_parse_brief,
6265
default_parse_debrief, default_directive_domain,
6266
default_directive_message, default_comment, default_comment_dot,
6267
default_comment_filepos, default_comment_special, default_set_domain,
6268
default_add_message): New declarations.
6269
(default_po_reader_alloc): New declaration.
6270
* read-po.c (default_po_reader_ty): Renamed from readall_class_ty.
6271
Add fields handle_comments, handle_filepos_comments,
6272
allow_domain_directives, allow_duplicates,
6273
allow_duplicates_if_same_msgstr.
6274
(call_set_domain, call_add_message, call_frob_new_message): New
6276
(default_constructor): Renamed from readall_constructor. Don't set
6277
this->mdlp and this->mlp.
6278
(default_destructor): Renamed from readall_destructor.
6279
(default_parse_brief): Renamed from readall_parse_brief.
6280
(default_parse_debrief): New function.
6281
(default_copy_comment_state, default_reset_comment_state): New
6283
(default_directive_domain): Renamed from readall_directive_domain.
6284
Call set_domain method.
6285
(default_directive_message): Renamed from readall_directive_message.
6286
Call add_message method.
6287
(default_comment): Renamed from readall_comment.
6288
(default_comment_dot): Renamed from readall_comment_dot.
6289
(default_comment_filepos): Renamed from readall_comment_filepos.
6290
(default_comment_special): Renamed from readall_comment_special.
6291
(default_set_domain, default_add_message): New functions.
6292
(default_methods): Renamed from readall_methods.
6293
(default_po_reader_alloc): New function.
6294
(read_po, read_po_file): Update.
6295
* msgfmt.c: Include read-po.h instead of po.h.
6296
(msgfmt_po_reader_ty): Renamed from msgfmt_class_ty. Inherit
6297
from default_po_reader_ty.
6298
(main): Drop po_lex_pass_comments call, done by default_parse_brief.
6299
(msgfmt_constructor): Renamed from format_constructor. Call superclass
6301
(msgfmt_parse_debrief): Renamed from format_debrief. Call superclass
6303
(format_directive_domain): Remove function.
6304
(msgfmt_set_domain): New function.
6305
(format_directive_message): Remove function.
6306
(msgfmt_add_message, msgfmt_frob_new_message): New functions.
6307
(msgfmt_comment_special): Renamed from format_comment_special.
6308
(msgfmt_methods): Renamed from format_methods.
6309
(read_po_file_msgfmt): Renamed from read_po_file.
6310
* x-po.c: Include read-po.h instead of po.h.
6311
(extract_class_ty, extract_constructor, extract_directive_domain,
6312
extract_directive_message, extract_parse_brief, extract_comment,
6313
extract_comment_dot, extract_comment_filepos, extract_comment_special):
6315
(extract_add_message): New function.
6316
(extract_methods): Update.
6317
(extract_po): Update.
6318
* xgettext.c: Include read-po-abstract.h instead of po.h.
6319
(exclude_directive_domain, exclude_directive_message, exclude_methods,
6320
read_exclusion_file): Update.
6321
* msgcmp.c: Don't include po.h.
6322
* msgmerge.c: Likewise.
6323
* po-gram-gen.y: Include read-po-abstract.h instead of po.h.
6324
* po-hash-gen.y: Likewise.
6325
(po_parse_comment_filepos): Renamed from po_hash.
6326
* po-hash.h (po_parse_comment_filepos): Renamed from po_hash.
6327
* Makefile.am (noinst_HEADERS): Remove po.h, add read-po-abstract.h.
6328
(COMMON_SOURCE): Remove po.c, add read-po-abstract.c.
6329
* Makefile.msvc (OBJECTS): Remove po.obj, add read-po-abstract.obj.
6330
(read-po-abstract.obj): Renamed from po.obj.
6331
* Makefile.vms (OBJECTS): Remove po.obj, add read-po-abstract.obj.
6332
(read-po-abstract.obj): Renamed from po.obj.
6334
2003-04-13 Bruno Haible <bruno@clisp.org>
6336
* read-po.c (readall_directive_message): Separate accumulation and
6338
* x-po.c (extract_directive_message): Likewise.
6340
2003-04-13 Bruno Haible <bruno@clisp.org>
6342
* write-po.h (message_print_comment, message_print_comment_dot,
6343
message_print_comment_filepos, message_print_comment_flags): New
6345
* write-po.c: Reorder functions.
6346
(message_print_comment, message_print_comment_dot,
6347
message_print_comment_filepos, message_print_comment_flags): New
6348
functions, extracted from message_print.
6349
(message_print): Use them.
6350
(message_print_obsolete): Use message_print_comment.
6352
2003-04-22 Bruno Haible <bruno@clisp.org>
6354
* plural-table.c (plural_table): Add an entry about Faroese.
6355
Reported by Jacob Sparre Andersen <sparre@crs4.it>.
6357
2003-04-13 Bruno Haible <bruno@clisp.org>
6359
* po.h (po_scan_start, po_scan_end): New declarations.
6360
* po.c: Reorder functions.
6361
(po_scan_start, po_scan_end): New functions.
6362
(po_scan, po_scan_file): Use them.
6364
2003-04-12 Bruno Haible <bruno@clisp.org>
6366
* Makefile.vms: New variables ABIFLAGS, DEFS. Avoid rules with no
6367
lines. Don't use the force target. Correct wildcard syntax.
6368
Suggested by Jouk Jansen <joukj@hrem.stm.tudelft.nl>.
6370
2003-04-13 Bruno Haible <bruno@clisp.org>
6372
* xgettext.c (construct_header): Remove spurious comma.
6374
2003-03-30 Bruno Haible <bruno@clisp.org>
6376
* Makefile.vms: New file.
6377
* Makefile.am (EXTRA_DIST): Add Makefile.vms.
6378
(x-java.c): Prepend a few VMS specific lines.
6379
* po-lex.c (mbfile_getc): Change element type of scatchbuf to
6381
* write-java.c (string_hashcode, write_java_string): Cast argument of
6383
* write-tcl.c (write_tcl_string): Likewise.
6384
* x-python.c (phase7_getuc): Cast argument of unicode_name_character.
6385
* msgfilter.c (write): #undef before redefining it. Needed for VMS.
6388
2003-03-30 Bruno Haible <bruno@clisp.org>
6390
* Makefile.am (noinst_HEADERS): Add po-gram-gen2.h.
6391
(BUILT_SOURCES): Add po-gram-gen2.h.
6392
(DISTCLEANFILES): Remove po-gram-gen2.h.
6393
(po-gram-gen2.h): Simplify rule.
6395
2003-03-17 Bruno Haible <bruno@clisp.org>
6397
Native Woe32/MSVC support.
6398
* Makefile.msvc: New file.
6399
* Makefile.am (EXTRA_DIST): Add it.
6400
* msgfilter.c: Include <sys/time.h> only if it exists.
6401
(process_string): Mark as NYI on Woe32.
6402
* msgfmt.c (sigjmp_buf, sigsetjmp, siglongjmp): Provide fallback
6403
definitions for Woe32.
6404
* msginit.c: Include <fcntl.h>, for F_OK. Include <pwd.h> only if it
6406
(get_user_pwd, get_user_fullname): Adapt for when <pwd.h> is missing.
6407
(project_id, project_id_version, get_user_email,
6408
language_team_address): Use DEV_NULL instead of "/dev/null".
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
* write-mo.c: Include <sys/param.h> only if it exists.
6414
2003-03-28 Bruno Haible <bruno@clisp.org>
6416
* msgmerge.c (main): Use copy_file_preserving instead of copy_file.
6418
2003-03-16 Bruno Haible <bruno@clisp.org>
6420
* str-list.h (string_list_join): Comment out.
6421
* str-list.c (string_list_join): Comment out.
6423
2003-03-10 Bruno Haible <bruno@clisp.org>
6425
* msggrep.c (no_pass): Mention option -C.
6426
(usage): Document option -C completely.
6427
Reported by Martin Quinson <Martin.Quinson@tuxfamily.org>.
6429
2003-02-28 Bruno Haible <bruno@clisp.org>
6431
Support for relocatable installation.
6432
* msgattrib.c: Include relocatable.h.
6433
(main): Relocate LOCALEDIR value.
6434
* msgcat.c: Include relocatable.h.
6435
(main): Relocate LOCALEDIR value.
6436
* msgcmp.c: Include relocatable.h.
6437
(main): Relocate LOCALEDIR value.
6438
* msgcomm.c: Include relocatable.h.
6439
(main): Relocate LOCALEDIR value.
6440
* msgconv.c: Include relocatable.h.
6441
(main): Relocate LOCALEDIR value.
6442
* msgen.c: Include relocatable.h.
6443
(main): Relocate LOCALEDIR value.
6444
* msgexec.c: Include relocatable.h.
6445
(main): Relocate LOCALEDIR value.
6446
* msgfilter.c: Include relocatable.h.
6447
(main): Relocate LOCALEDIR value.
6448
* msgfmt.c: Include relocatable.h.
6449
(main): Relocate LOCALEDIR value.
6450
* msggrep.c: Include relocatable.h.
6451
(main): Relocate LOCALEDIR value.
6452
* msginit.c: Include relocatable.h.
6453
(main): Relocate LOCALEDIR value.
6454
(project_id, project_id_version, get_user_email): Relocate LIBDIR
6456
(language_team_address): Relocate LIBDIR and PROJECTSDIR values.
6457
* msgmerge.c: Include relocatable.h.
6458
(main): Relocate LOCALEDIR value.
6459
* msgunfmt.c: Include relocatable.h.
6460
(main): Relocate LOCALEDIR value.
6461
* msguniq.c: Include relocatable.h.
6462
(main): Relocate LOCALEDIR value.
6463
* xgettext.c: Include relocatable.h.
6464
(main): Relocate LOCALEDIR value.
6465
* read-java.c: Include relocatable.h.
6466
(msgdomain_read_java): Relocate GETTEXTJEXEDIR value.
6467
* read-tcl.c: Include relocatable.h.
6468
(msgdomain_read_tcl): Relocate GETTEXTDATADIR value.
6469
* hostname.c: Include relocatable.h.
6470
(main): Relocate LOCALEDIR value. Update copyright year.
6471
* urlget.c: Include relocatable.h.
6472
(main): Relocate LOCALEDIR value. Update copyright year.
6473
(fetch): Relocate GETTEXTJEXEDIR value.
6474
* user-email.in: Relocate $libdir.
6475
* Makefile.am (aliaspath): New variable.
6476
(DEFS): Define LOCALE_ALIAS_PATH.
6477
(msginit_SOURCES): Add .../localealias.c.
6478
(msginit_LDADD): Remove .../localealias.lo.
6479
(msgcmp_CFLAGS, msgfmt_CFLAGS, msgmerge_CFLAGS, msgunfmt_CFLAGS,
6480
xgettext_CFLAGS, msgattrib_CFLAGS, msgcat_CFLAGS, msgcomm_CFLAGS,
6481
msgconv_CFLAGS, msgen_CFLAGS, msgexec_CFLAGS, msgfilter_CFLAGS,
6482
msggrep_CFLAGS, msginit_CFLAGS, msguniq_CFLAGS, hostname_CFLAGS,
6483
urlget_CFLAGS): New variables.
6484
(msgcmp_LDFLAGS, msgfmt_LDFLAGS, msgmerge_LDFLAGS, msgunfmt_LDFLAGS,
6485
xgettext_LDFLAGS, msgattrib_LDFLAGS, msgcat_LDFLAGS, msgcomm_LDFLAGS,
6486
msgconv_LDFLAGS, msgen_LDFLAGS, msgexec_LDFLAGS, msgfilter_LDFLAGS,
6487
msggrep_LDFLAGS, msginit_LDFLAGS, msguniq_LDFLAGS, hostname_LDFLAGS,
6488
urlget_LDFLAGS): New variables.
6489
(install-exec-java-yes): Don't ignore INSTALL_PROGRAM_ENV.
6490
(RELOCATABLE_LIBRARY_PATH, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR,
6491
RELOCATABLE_CONFIG_H_DIR): New variables.
6493
2003-03-13 Bruno Haible <bruno@clisp.org>
6495
* msggrep.c (main): On Solaris, prefer /usr/xpg4/bin/grep to
6496
/usr/bin/grep. Needed for Solaris 2.8 and 2.9.
6497
Reported by Sven Utcke <utcke@informatik.uni-hamburg.de>.
6499
2003-03-03 Bruno Haible <bruno@clisp.org>
6501
* msgen.c (usage): Don't say that the entries are marked fuzzy.
6502
Reported by Karl Eichwalder <ke@suse.de>.
6504
2003-02-23 Bruno Haible <bruno@clisp.org>
6506
Improve error messages for invalid format strings.
6507
* format-invalid.h: New file.
6508
* format.h (struct formatstring_parser): Add invalid_reason argument
6510
* format-awk.c: Include c-ctype.h, xerror.h, format-invalid.h.
6511
(format_parse): Add invalid_reason argument.
6512
* format-c.c: Include c-ctype.h, xerror.h, format-invalid.h.
6513
(INVALID_C99_MACRO): New macro.
6514
(format_parse): Add invalid_reason argument.
6515
(get_c99_format_directives): Update.
6516
* format-elisp.c: Include c-ctype.h, xerror.h, format-invalid.h.
6517
(format_parse): Add invalid_reason argument.
6518
* format-java.c: Include xerror.h, format-invalid.h.
6519
(message_format_parse, choice_format_parse, format_parse): Add
6520
invalid_reason argument.
6521
(choice_format_parse): Return false if a choice contains an empty
6523
* format-librep.c: Include c-ctype.h, xerror.h, format-invalid.h.
6524
(format_parse): Add invalid_reason argument.
6525
* format-lisp.c: Include xerror.h, format-invalid.h.
6526
(check_params, nocheck_params): Add directives, invalid_reason
6528
(parse_upto, format_parse): Add invalid_reason argument.
6529
* format-pascal.c: Include xerror.h, format-invalid.h.
6530
(format_parse): Add invalid_reason argument.
6531
* format-php.c: Include c-ctype.h, xerror.h, format-invalid.h.
6532
(format_parse): Add invalid_reason argument.
6533
* format-python.c: Include c-ctype.h, xerror.h, format-invalid.h.
6534
(INVALID_MIXES_NAMED_UNNAMED): New macro.
6535
(format_parse): Add invalid_reason argument.
6536
* format-tcl.c: Include c-ctype.h, xerror.h, format-invalid.h.
6537
(format_parse): Add invalid_reason argument.
6538
* format-ycp.c: Include c-ctype.h, xerror.h, format-invalid.h.
6539
(format_parse): Add invalid_reason argument.
6540
* msgfmt.c (check_pair): Output invalid_reason returned for msgstr.
6541
* msgmerge.c (msgfmt_check_pair_fails): Update.
6542
* xgettext.c (remember_a_message, remember_a_message_plural): Update.
6543
* Makefile.am (FORMAT_SOURCE): Add format-invalid.h.
6545
2003-02-22 Bruno Haible <bruno@clisp.org>
6547
* x-python.c (init_keywords): Add u*gettext variants and plural
6548
handling functions added in Python 2.3.
6550
2003-02-22 Bruno Haible <bruno@clisp.org>
6552
* Makefile.am (installdirs): Remove dependency, redundant with
6555
2003-02-20 Bruno Haible <bruno@clisp.org>
6557
* Makefile.am (libgettextpo_la_DEPENDENCIES): New variable.
6558
Reported by Jim Meyering <jim@meyering.net>.
6560
2003-02-19 Bruno Haible <bruno@clisp.org>
6562
* Makefile.am (xgettext_LDADD): Mention $(LIBUNINAME) before
6563
libgettextsrc.la, not after it. Needed avoid link error on OSF/1 4.0:
6564
libtool produces a link command line that contains "-lc" where a
6565
shared library was used, and on OSF/1 4.0 "-lc" must not be used
6566
before objects that use integer division.
6568
2003-02-18 Bruno Haible <bruno@clisp.org>
6570
* message.c (msgdomain_list_free): Uncomment this function.
6571
* Makefile.am (libgettextpo_la_LDFLAGS): Add ../lib/libgettextlib.la.
6572
Needed for Solaris 2.7.
6574
2003-02-16 Bruno Haible <bruno@clisp.org>
6576
* msgmerge.c (message_merge): Add support for Report-Msgid-Bugs-To
6578
* xgettext.c (msgid_bugs_address): New variable.
6579
(long_options): Add option --msgid-bugs-address.
6580
(main): Handle option --msgid-bugs-address.
6581
(usage): Document option --msgid-bugs-address.
6582
(construct_header): Add 'Report-Msgid-Bugs-To:' field. Warn if
6583
msgid_bugs_address is empty.
6585
2003-02-15 Bruno Haible <bruno@clisp.org>
6587
* user-email.in: Add support for GNOME evolution, OpenOffice and
6588
StarOffice with nonstandard installation directory.
6590
2003-02-15 Bruno Haible <bruno@clisp.org>
6592
* msgattrib.c (main): Update year in --version output.
6593
* msgcat.c (main): Likewise.
6594
* msgcmp.c (main): Likewise.
6595
* msgcomm.c (main): Likewise.
6596
* msgconv.c (main): Likewise.
6597
* msgen.c (main): Likewise.
6598
* msgexec.c (main): Likewise.
6599
* msgfilter.c (main): Likewise.
6600
* msgfmt.c (main): Likewise.
6601
* msgunfmt.c (main): Likewise.
6602
* msguniq.c (main): Likewise.
6603
* xgettext.c (main): Likewise.
6605
2003-02-12 Bruno Haible <bruno@clisp.org>
6608
* gettext.c: Remove file.
6609
* ngettext.c: Remove file.
6610
* Makefile.am (bin_PROGRAMS): Remove gettext, ngettext.
6611
(EXTRA_DIST): Add ChangeLog.0.
6612
(pkgdatadir): Define using 'gettext' instead of @PACKAGE@.
6613
(pkglibdir): Likewise.
6614
(INCLUDES): Refer to intl in gettext-runtime directory.
6615
(gettext_SOURCES, ngettext_SOURCES, gettext_LDADD, ngettext_LDADD):
6617
(install-exec-local, installdirs-local, uninstall-local,
6618
install-exec-java-yes, installdirs-java-yes, uninstall-java-yes): Use
6619
$(pkglibdir) instead of $(libdir)/$(PACKAGE).
6620
* plural.c: Update for changed directory structure.
6621
* user-email.in: Use 'gettext' instead of @PACKAGE@.
6624
See ChangeLog.0 for earlier changes.