annotate lib/propername.h @ 17334:bb52d9cece01

unsetenv etc.: port to Solaris 11 + GNU Emacs * lib/canonicalize-lgpl.c, lib/getaddrinfo.c, lib/getdelim.c: * lib/glob.c, lib/random_r.c, lib/setenv.c, lib/tsearch.c: * lib/unsetenv.c (_GL_ARG_NONNULL): Define before including <config.h>. GNU Emacs's <config.h> includes <stdlib.h> (which is not a great idea but is too painful to fix right now), and without this gnulib change <stdlib.h> was defining _GL_ARG_NONNULL incorrectly when compiling unsetenv.c on Solaris 11. Fix the problem for unsetenv.c, and fix other similar occurrences.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 11 Feb 2013 14:58:56 -0800
parents e542fd46ad6f
children 344018b6e5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10085
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Localization of proper names.
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16201
diff changeset
2 Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc.
10085
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 Written by Bruno Haible <bruno@clisp.org>, 2006.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software: you can redistribute it and/or modify
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 the Free Software Foundation; either version 3 of the License, or
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 (at your option) any later version.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 /* INTRODUCTION
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 What do
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 Torbjörn Granlund (coreutils)
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 François Pinard (coreutils)
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 Danilo Šegan (gettext)
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 have in common?
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 A non-ASCII name. This causes trouble in the --version output. The simple
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 "solution", unfortunately mutilates the name.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 $ du --version| grep Granlund
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 Écrit par Torbjorn Granlund, David MacKenzie, Paul Eggert et Jim Meyering.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 $ ptx --version| grep Pinard
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 Écrit par F. Pinard.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 What is desirable, is to print the full name if the output character set
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 allows it, and the ASCIIfied name only as a fallback.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 $ recode-sr-latin --version
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 ...
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 Written by Danilo Šegan and Bruno Haible.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 $ LC_ALL=C recode-sr-latin --version
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 ...
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 Written by Danilo Segan and Bruno Haible.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 The 'propername' module does exactly this. Plus, for languages that use
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 a different writing system than the Latin alphabet, it allows a translator
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 to write the name using that different writing system. In that case the
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 output will look like this:
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 <translated name> (<original name in English>)
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 To use the 'propername' module is done in three simple steps:
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 1) Add it to the list of gnulib modules to import,
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 2) Change the arguments of version_etc, from
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 from "Paul Eggert"
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 to proper_name ("Paul Eggert")
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 from "Torbjorn Granlund"
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 to proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund")
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 from "F. Pinard"
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 to proper_name_utf8 ("Franc,ois Pinard", "Fran\303\247ois Pinard")
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 (Optionally, here you can also add / * TRANSLATORS: ... * / comments
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 explaining how the name is written or pronounced.)
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 3) If you are using GNU gettext version 0.16.1 or older, in po/Makevars,
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 in the definition of the XGETTEXT_OPTIONS variable, add:
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74
10094
69d791e94c2d Fix syntax of --keyword option.
Bruno Haible <bruno@clisp.org>
parents: 10085
diff changeset
75 --keyword='proper_name:1,"This is a proper name. See the gettext manual, section Names."'
69d791e94c2d Fix syntax of --keyword option.
Bruno Haible <bruno@clisp.org>
parents: 10085
diff changeset
76 --keyword='proper_name_utf8:1,"This is a proper name. See the gettext manual, section Names."'
10085
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 This specifies automatic comments for the translator. (Requires
10094
69d791e94c2d Fix syntax of --keyword option.
Bruno Haible <bruno@clisp.org>
parents: 10085
diff changeset
79 xgettext >= 0.15. The double-quotes inside the quoted string are on
69d791e94c2d Fix syntax of --keyword option.
Bruno Haible <bruno@clisp.org>
parents: 10085
diff changeset
80 purpose: they are part of the --keyword argument syntax.)
10085
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 */
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 #ifndef _PROPERNAME_H
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 #define _PROPERNAME_H
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 #ifdef __cplusplus
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 extern "C" {
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 #endif
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 /* Return the localization of NAME. NAME is written in ASCII. */
16130
376ca4146b05 propername: do not mark proper_name with the const attribute
Jim Meyering <meyering@redhat.com>
parents: 16129
diff changeset
92 extern const char * proper_name (const char *name) /* NOT attribute const */;
10085
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 /* Return the localization of a name whose original writing is not ASCII.
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 NAME_UTF8 is the real name, written in UTF-8 with octal or hexadecimal
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 escape sequences. NAME_ASCII is a fallback written only with ASCII
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 characters. */
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 extern const char * proper_name_utf8 (const char *name_ascii,
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 10094
diff changeset
99 const char *name_utf8);
10085
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 #ifdef __cplusplus
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102 }
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 #endif
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
104
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
105
6eeccac8ebca New module 'propername', moved here from GNU gettext.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 #endif /* _PROPERNAME_H */