Skip to content

Commit

Permalink
* intl/tst-gettext3.c: New file.
Browse files Browse the repository at this point in the history
	* intl/tst-gettext3.sh: New file.
	* intl/Makefile (distribute): Add tst-gettext3.sh.
	(test-srcs): Add tst-gettext3.
	(tests): Depend on tst-gettext3.out.
	(tst-gettext3.out): New rule.
	(CFLAGS-tst-gettext3.c): New variable.

	Fix bug exposed by tst-gettext3.
	* intl/gettextP.h (struct converted_domain): New type.
	(struct loaded_domain): Remove the conv, conv_tab fields. Add
	conversions, nconversions fields.
	(_nl_init_domain_conv): Remove declaration.
	(_nl_free_domain_conv): Remove declaration.
	(_nl_find_msg): Add convert argument.
	* intl/dcigettext.c (DCIGETTEXT): Call _nl_find_msg with convert=1.
	(_nl_find_msg): Add convert argument. When a conversion to a different
	charset is needed, create a new converted_domain element, instead of
	throwing away the old converted translations.
	(get_output_charset): New function.
	* intl/loadmsgcat.c (_nl_init_domain_conv): Remove function.
	(_nl_free_domain_conv): Remove function.
	(_nl_load_domain): Initialize the conversions array to empty. Use
	_nl_find_msg instead of _nl_init_domain_conv to retrieve the header
	entry.
	(_nl_unload_domain): Free the conversions array and its contents.

	* intl/gettextP.h (struct loaded_domain): Remove codeset_cntr field.
	(struct binding): Likewise.
	* intl/bindtextdom.c (set_binding_values): Drop codeset_cntr
	modifications.
  • Loading branch information
Ulrich Drepper committed Apr 4, 2005
1 parent 7a50b1f commit 4e82c61
Show file tree
Hide file tree
Showing 7 changed files with 523 additions and 322 deletions.
34 changes: 34 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
2005-03-27 Bruno Haible <bruno@clisp.org>

* intl/tst-gettext3.c: New file.
* intl/tst-gettext3.sh: New file.
* intl/Makefile (distribute): Add tst-gettext3.sh.
(test-srcs): Add tst-gettext3.
(tests): Depend on tst-gettext3.out.
(tst-gettext3.out): New rule.
(CFLAGS-tst-gettext3.c): New variable.

Fix bug exposed by tst-gettext3.
* intl/gettextP.h (struct converted_domain): New type.
(struct loaded_domain): Remove the conv, conv_tab fields. Add
conversions, nconversions fields.
(_nl_init_domain_conv): Remove declaration.
(_nl_free_domain_conv): Remove declaration.
(_nl_find_msg): Add convert argument.
* intl/dcigettext.c (DCIGETTEXT): Call _nl_find_msg with convert=1.
(_nl_find_msg): Add convert argument. When a conversion to a different
charset is needed, create a new converted_domain element, instead of
throwing away the old converted translations.
(get_output_charset): New function.
* intl/loadmsgcat.c (_nl_init_domain_conv): Remove function.
(_nl_free_domain_conv): Remove function.
(_nl_load_domain): Initialize the conversions array to empty. Use
_nl_find_msg instead of _nl_init_domain_conv to retrieve the header
entry.
(_nl_unload_domain): Free the conversions array and its contents.

* intl/gettextP.h (struct loaded_domain): Remove codeset_cntr field.
(struct binding): Likewise.
* intl/bindtextdom.c (set_binding_values): Drop codeset_cntr
modifications.

2005-04-04 Jakub Jelinek <jakub@redhat.com>

* sunrpc/pmap_rmt.c (xdr_rmtcall_args): Use a dummy arglen instead
Expand Down
4 changes: 0 additions & 4 deletions intl/bindtextdom.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ set_binding_values (domainname, dirnamep, codesetp)
free (binding->codeset);

binding->codeset = result;
++binding->codeset_cntr;
modified = 1;
}
}
Expand Down Expand Up @@ -271,8 +270,6 @@ set_binding_values (domainname, dirnamep, codesetp)
/* The default value. */
new_binding->dirname = (char *) _nl_default_dirname;

new_binding->codeset_cntr = 0;

if (codesetp)
{
const char *codeset = *codesetp;
Expand All @@ -293,7 +290,6 @@ set_binding_values (domainname, dirnamep, codesetp)
memcpy (result, codeset, len);
#endif
codeset = result;
++new_binding->codeset_cntr;
}
*codesetp = codeset;
new_binding->codeset = (char *) codeset;
Expand Down
Loading

0 comments on commit 4e82c61

Please sign in to comment.