From 1461534aad5f4871ee004414eaac2659431c0338 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 15 Jan 2002 13:00:46 +0000 Subject: Remove the parentheses around the expansions of N_ and gettext_noop. --- doc/ChangeLog | 5 +++++ doc/gettext.texi | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/ChangeLog b/doc/ChangeLog index 677f32d..232cf12 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2002-01-12 Bruno Haible + + * gettext.texi: Remove the parentheses around the expansions of N_ and + gettext_noop. + 2002-01-14 Bruno Haible * gettext.texi (c-format): Slight reformulation. diff --git a/doc/gettext.texi b/doc/gettext.texi index c863bdf..43cff90 100644 --- a/doc/gettext.texi +++ b/doc/gettext.texi @@ -704,7 +704,7 @@ or in a central header file: @example @group #define _(String) (String) -#define N_(String) (String) +#define N_(String) String #define textdomain(Domain) #define bindtextdomain(Package, Directory) @end group @@ -719,7 +719,7 @@ simply replace these definitions by the following: @group #include #define _(String) gettext (String) -#define gettext_noop(String) (String) +#define gettext_noop(String) String #define N_(String) gettext_noop (String) @end group @end example @@ -1858,7 +1858,7 @@ from the array. So one solution can look like this: @example @group -#define gettext_noop(String) (String) +#define gettext_noop(String) String @{ static const char *messages[] = @{ @@ -1886,7 +1886,7 @@ with the following one: @example @group -#define gettext_noop(String) (String) +#define gettext_noop(String) String @{ static const char *messages[] = @{ @@ -1904,11 +1904,9 @@ with the following one: @end group @end example -But this has some drawbacks. First the programmer has to take care that +But this has a drawback. The programmer has to take care that he uses @code{gettext_noop} for the string @code{"a default message"}. A use of @code{gettext} could have in rare cases unpredictable results. -The second reason is found in the internals of the GNU @code{gettext} -Library which will make this solution less efficient. One advantage is that you need not make control flow analysis to make sure the output is really translated in any case. But this analysis is @@ -4230,7 +4228,7 @@ The same procedure can be done for the @code{gettext_noop} invocations no-op macro. So you should consider the following code for your project: @example -#define gettext_noop(String) (String) +#define gettext_noop(String) String #define N_(String) gettext_noop (String) @end example -- cgit v1.1