Changeset 183
- Timestamp:
- 07/28/05 02:05:16 (7 years ago)
- Files:
-
- sweep/trunk/ABOUT-NLS (modified) (13 diffs)
- sweep/trunk/ChangeLog (modified) (1 diff)
- sweep/trunk/Makefile.am (modified) (1 diff)
- sweep/trunk/config.rpath (added)
- sweep/trunk/intl/ChangeLog (modified) (1 diff)
- sweep/trunk/intl/Makefile.in (modified) (16 diffs)
- sweep/trunk/intl/VERSION (modified) (1 diff)
- sweep/trunk/intl/bindtextdom.c (modified) (15 diffs)
- sweep/trunk/intl/cat-compat.c (deleted)
- sweep/trunk/intl/config.charset (added)
- sweep/trunk/intl/dcgettext.c (modified) (5 diffs)
- sweep/trunk/intl/dcigettext.c (added)
- sweep/trunk/intl/dcngettext.c (added)
- sweep/trunk/intl/dgettext.c (modified) (5 diffs)
- sweep/trunk/intl/dngettext.c (added)
- sweep/trunk/intl/eval-plural.h (added)
- sweep/trunk/intl/explodename.c (modified) (4 diffs)
- sweep/trunk/intl/finddomain.c (modified) (5 diffs)
- sweep/trunk/intl/gettext.c (modified) (4 diffs)
- sweep/trunk/intl/gettext.h (deleted)
- sweep/trunk/intl/gettextP.h (modified) (5 diffs)
- sweep/trunk/intl/gmo.h (added)
- sweep/trunk/intl/hash-string.h (modified) (4 diffs)
- sweep/trunk/intl/intl-compat.c (modified) (4 diffs)
- sweep/trunk/intl/l10nflist.c (modified) (19 diffs)
- sweep/trunk/intl/langprefs.c (added)
- sweep/trunk/intl/libgettext.h (deleted)
- sweep/trunk/intl/libgnuintl.h.in (added)
- sweep/trunk/intl/loadinfo.h (modified) (4 diffs)
- sweep/trunk/intl/loadmsgcat.c (modified) (16 diffs)
- sweep/trunk/intl/localcharset.c (added)
- sweep/trunk/intl/localcharset.h (added)
- sweep/trunk/intl/locale.alias (added)
- sweep/trunk/intl/localealias.c (modified) (20 diffs)
- sweep/trunk/intl/localename.c (added)
- sweep/trunk/intl/log.c (added)
- sweep/trunk/intl/ngettext.c (added)
- sweep/trunk/intl/os2compat.c (added)
- sweep/trunk/intl/os2compat.h (added)
- sweep/trunk/intl/osdep.c (added)
- sweep/trunk/intl/plural-exp.c (added)
- sweep/trunk/intl/plural-exp.h (added)
- sweep/trunk/intl/plural.c (added)
- sweep/trunk/intl/plural.y (added)
- sweep/trunk/intl/po2tbl.sed.in (deleted)
- sweep/trunk/intl/printf-args.c (added)
- sweep/trunk/intl/printf-args.h (added)
- sweep/trunk/intl/printf-parse.c (added)
- sweep/trunk/intl/printf-parse.h (added)
- sweep/trunk/intl/printf.c (added)
- sweep/trunk/intl/ref-add.sin (added)
- sweep/trunk/intl/ref-del.sin (added)
- sweep/trunk/intl/relocatable.c (added)
- sweep/trunk/intl/relocatable.h (added)
- sweep/trunk/intl/textdomain.c (modified) (6 diffs)
- sweep/trunk/intl/vasnprintf.c (added)
- sweep/trunk/intl/vasnprintf.h (added)
- sweep/trunk/intl/vasnwprintf.h (added)
- sweep/trunk/intl/wprintf-parse.h (added)
- sweep/trunk/intl/xopen-msg.sed (deleted)
- sweep/trunk/intl/xsize.h (added)
- sweep/trunk/m4/Makefile.am (modified) (1 diff)
- sweep/trunk/m4/codeset.m4 (added)
- sweep/trunk/m4/gettext.m4 (added)
- sweep/trunk/m4/glibc2.m4 (added)
- sweep/trunk/m4/glibc21.m4 (added)
- sweep/trunk/m4/iconv.m4 (added)
- sweep/trunk/m4/intdiv0.m4 (added)
- sweep/trunk/m4/intmax.m4 (added)
- sweep/trunk/m4/inttypes-pri.m4 (added)
- sweep/trunk/m4/inttypes.m4 (added)
- sweep/trunk/m4/inttypes_h.m4 (added)
- sweep/trunk/m4/isc-posix.m4 (added)
- sweep/trunk/m4/lcmessage.m4 (added)
- sweep/trunk/m4/lib-ld.m4 (added)
- sweep/trunk/m4/lib-link.m4 (added)
- sweep/trunk/m4/lib-prefix.m4 (added)
- sweep/trunk/m4/longdouble.m4 (added)
- sweep/trunk/m4/longlong.m4 (added)
- sweep/trunk/m4/nls.m4 (added)
- sweep/trunk/m4/po.m4 (added)
- sweep/trunk/m4/printf-posix.m4 (added)
- sweep/trunk/m4/progtest.m4 (added)
- sweep/trunk/m4/signed.m4 (added)
- sweep/trunk/m4/size_max.m4 (added)
- sweep/trunk/m4/stdint_h.m4 (added)
- sweep/trunk/m4/uintmax_t.m4 (added)
- sweep/trunk/m4/ulonglong.m4 (added)
- sweep/trunk/m4/wchar_t.m4 (added)
- sweep/trunk/m4/wint_t.m4 (added)
- sweep/trunk/m4/xsize.m4 (added)
- sweep/trunk/mkinstalldirs (added)
- sweep/trunk/po/ChangeLog (modified) (1 diff)
- sweep/trunk/po/Makefile.in.in (modified) (8 diffs)
- sweep/trunk/po/Makevars (added)
- sweep/trunk/po/Rules-quot (added)
- sweep/trunk/po/boldquot.sed (added)
- sweep/trunk/po/cat-id-tbl.c (deleted)
- sweep/trunk/po/en@boldquot.header (added)
- sweep/trunk/po/en@quot.header (added)
- sweep/trunk/po/insert-header.sin (added)
- sweep/trunk/po/quot.sed (added)
- sweep/trunk/po/remove-potcdate.sin (added)
- sweep/trunk/po/stamp-cat-id (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sweep/trunk/ABOUT-NLS
r124 r183 1 Notes on the Free Translation Project 2 ************************************* 3 4 Free software is going international! The Free Translation Project 5 is a way to get maintainers of free software, translators, and users all 6 together, so that will gradually become able to speak many languages. 7 A few packages already provide translations for their messages. 1 1 Notes on the Free Translation Project 2 *************************************** 3 4 Free software is going international! The Free Translation Project is 5 a way to get maintainers of free software, translators, and users all 6 together, so that free software will gradually become able to speak many 7 languages. A few packages already provide translations for their 8 messages. 8 9 9 10 If you found this `ABOUT-NLS' file inside a distribution, you may … … 16 17 explain how users should proceed for getting the programs to use the 17 18 available translations. They tell how people wanting to contribute and 18 work at translations shouldcontact the appropriate team.19 work on translations can contact the appropriate team. 19 20 20 21 When reporting bugs in the `intl/' directory or bugs which may be … … 23 24 `intl/VERSION' file, in internationalized packages. 24 25 25 Quick configuration advice26 ========================== 27 28 If you want to exploit the full power of internationalization, you26 1.1 Quick configuration advice 27 ============================== 28 29 If you want to exploit the full power of internationalization, you 29 30 should configure it using 30 31 … … 46 47 included `libintl'. 47 48 48 INSTALL Matters49 =============== 50 51 Some packages are "localizable" when properly installed; the 52 programs they contain can be made to speak your own native language. 53 Most such packages use GNU `gettext'. Other packages have their own 54 ways tointernationalization, predating GNU `gettext'.49 1.2 INSTALL Matters 50 =================== 51 52 Some packages are "localizable" when properly installed; the programs 53 they contain can be made to speak your own native language. Most such 54 packages use GNU `gettext'. Other packages have their own ways to 55 internationalization, predating GNU `gettext'. 55 56 56 57 By default, this package will be installed to allow translation of 57 58 messages. It will automatically detect whether the system already 58 provides the GNU `gettext' functions. If not, the GNU `gettext' own59 library will be used. This library is wholly contained within this 60 package, usually in the `intl/' subdirectory, so prior installation of 61 the GNU `gettext' package is _not_ required. Installers may use 62 special options at configuration time for changing the default 63 behaviour. The commands:59 provides the GNU `gettext' functions. If not, the included GNU 60 `gettext' library will be used. This library is wholly contained 61 within this package, usually in the `intl/' subdirectory, so prior 62 installation of the GNU `gettext' package is _not_ required. 63 Installers may use special options at configuration time for changing 64 the default behaviour. The commands: 64 65 65 66 ./configure --with-included-gettext 66 67 ./configure --disable-nls 67 68 68 will respectivelybypass any pre-existing `gettext' to use the69 will, respectively, bypass any pre-existing `gettext' to use the 69 70 internationalizing routines provided within this package, or else, 70 71 _totally_ disable translation of messages. … … 73 74 configure without an option for your new package, `configure' will 74 75 probably detect the previously built and installed `libintl.a' file and 75 will decide to use this. This might be not what is desirable. You76 should use the more recent version of the GNU `gettext' library. I.e. 77 if the file `intl/VERSION' shows that the library which comes with this78 package ismore recent, you should use76 will decide to use this. This might not be desirable. You should use 77 the more recent version of the GNU `gettext' library. I.e. if the file 78 `intl/VERSION' shows that the library which comes with this package is 79 more recent, you should use 79 80 80 81 ./configure --with-included-gettext … … 87 88 extensions of the GNU `gettext' library. 88 89 89 Internationalized packages have usuallymany `po/LL.po' files, where90 Internationalized packages usually have many `po/LL.po' files, where 90 91 LL gives an ISO 639 two-letter code identifying the language. Unless 91 92 translations have been forbidden at `configure' time by using the … … 96 97 codes, stating which languages are allowed. 97 98 98 Using This Package99 ================== 100 101 As a user, if your language has been installed for this package, you99 1.3 Using This Package 100 ====================== 101 102 As a user, if your language has been installed for this package, you 102 103 only have to set the `LANG' environment variable to the appropriate 103 104 `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, … … 113 114 example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The 114 115 country code serves to distinguish the dialects. 116 117 The locale naming convention of `LL_CC', with `LL' denoting the 118 language and `CC' denoting the country, is the one use on systems based 119 on GNU libc. On other systems, some variations of this scheme are 120 used, such as `LL' or `LL_CC.ENCODING'. You can get the list of 121 locales supported by your system for your country by running the command 122 `locale -a | grep '^LL''. 115 123 116 124 Not all programs have translations for all languages. By default, an … … 125 133 available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. 126 134 135 Special advice for Norwegian users: The language code for Norwegian 136 bokma*l changed from `no' to `nb' recently (in 2003). During the 137 transition period, while some message catalogs for this language are 138 installed under `nb' and some older ones under `no', it's recommended 139 for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and 140 older translations are used. 141 127 142 In the `LANGUAGE' environment variable, but not in the `LANG' 128 143 environment variable, `LL_CC' combinations can be abbreviated as `LL' … … 131 146 (Portuguese as spoken in Portugal) in this context. 132 147 133 Translating Teams134 ================= 135 136 For the Free Translation Project to be a success, we need interested148 1.4 Translating Teams 149 ===================== 150 151 For the Free Translation Project to be a success, we need interested 137 152 people who like their own language and write it well, and who are also 138 153 able to synergize with other translators speaking the same language. … … 161 176 programming skill, here. 162 177 163 Available Packages164 ================== 165 166 Languages are not equally supported in all packages. The following167 matrix shows the current state of internationalization, as of September168 2001. The matrix shows, in regard of each package, for which languages 169 POfiles have been submitted to translation coordination, with a178 1.5 Available Packages 179 ====================== 180 181 Languages are not equally supported in all packages. The following 182 matrix shows the current state of internationalization, as of May 2005. 183 The matrix shows, in regard of each package, for which languages PO 184 files have been submitted to translation coordination, with a 170 185 translation percentage of at least 50%. 171 186 172 Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja 173 +----------------------------------------------------+ 174 a2ps | [] [] [] | 175 bash | [] [] [] [] | 176 bfd | | 177 binutils | [] | 178 bison | [] [] [] [] [] | 179 clisp | [] [] [] [] | 180 cpio | [] [] [] [] [] | 181 diffutils | [] [] [] [] [] [] [] | 182 enscript | [] [] | 183 error | [] [] | 184 fetchmail | | 185 fileutils | [] [] [] [] [] [] [] [] | 186 findutils | [] [] [] [] [] [] [] [] | 187 flex | [] [] [] | 188 freetype | | 189 gas | | 190 gawk | [] [] | 191 gcal | | 192 gcc | | 193 gettext | [] [] [] [] [] [] [] [] [] [] | 194 gnupg | [] [] [] [] [] [] [] | 195 gprof | | 196 grep | [] [] [] [] [] [] [] [] | 197 hello | [] [] [] [] [] [] [] [] [] [] [] | 198 id-utils | [] [] [] | 199 indent | [] [] [] [] [] | 200 jpilot | [] | 201 kbd | | 202 ld | [] | 203 libc | [] [] [] [] [] [] [] [] | 204 lilypond | [] | 205 lynx | [] [] [] [] | 206 m4 | [] [] [] [] [] [] [] [] | 207 make | [] [] [] [] [] [] | 208 mysecretdiary | [] | 209 nano | [] [] [] | 210 opcodes | | 211 parted | [] [] [] | 212 ptx | [] [] [] [] [] [] [] | 213 python | | 214 recode | [] [] [] [] [] [] [] [] [] | 215 sed | [] [] [] [] [] [] [] [] [] [] [] [] | 216 sh-utils | [] [] [] [] [] [] [] [] [] [] | 217 sharutils | [] [] [] [] [] [] [] [] | 218 sketch | | 219 soundtracker | [] [] [] | 220 sp | | 221 tar | [] [] [] [] [] [] [] [] | 222 texinfo | [] [] [] [] [] [] | 223 textutils | [] [] [] [] [] [] [] [] | 224 util-linux | [] [] | 225 wdiff | [] [] [] | 226 wget | [] [] [] [] [] [] [] [] [] [] | 227 +----------------------------------------------------+ 228 bg cs da de el en eo es et fi fr gl he hr id it ja 229 0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18 230 231 ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh 232 +----------------------------------------------------+ 233 a2ps | [] [] [] | 6 234 bash | | 4 235 bfd | | 0 236 binutils | | 1 237 bison | [] | 6 238 clisp | [] | 5 239 cpio | [] [] [] [] [] | 10 240 diffutils | [] [] [] [] | 11 241 enscript | [] [] [] | 5 242 error | [] [] | 4 243 fetchmail | | 0 244 fileutils | [] [] [] [] [] [] [] [] [] | 17 245 findutils | [] [] [] [] [] [] [] [] | 16 246 flex | [] [] [] | 6 247 freetype | | 0 248 gas | | 0 249 gawk | [] | 3 250 gcal | | 0 251 gcc | | 0 252 gettext | [] [] [] [] [] [] [] [] | 18 253 gnupg | [] [] [] | 10 254 gprof | | 0 255 grep | [] [] [] [] | 12 256 hello | [] [] [] [] [] [] [] [] [] [] [] | 22 257 id-utils | [] [] [] | 6 258 indent | [] [] [] [] [] [] [] | 12 259 jpilot | | 1 260 kbd | [] | 1 261 ld | | 1 262 libc | [] [] [] [] [] [] [] [] | 16 263 lilypond | [] [] | 3 264 lynx | [] [] [] [] | 8 265 m4 | [] [] [] [] | 12 266 make | [] [] [] [] [] [] | 12 267 mysecretdiary | | 1 268 nano | [] | 4 269 opcodes | [] | 1 270 parted | [] [] | 5 271 ptx | [] [] [] [] [] [] [] [] | 15 272 python | | 0 273 recode | [] [] [] [] | 13 274 sed | [] [] [] [] [] [] [] | 19 275 sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21 276 sharutils | [] [] [] | 11 277 sketch | | 0 278 soundtracker | | 3 279 sp | | 0 280 tar | [] [] [] [] [] [] [] | 15 281 texinfo | [] | 7 282 textutils | [] [] [] [] [] [] [] [] | 16 283 util-linux | [] [] | 4 284 wdiff | [] [] [] [] | 7 285 wget | [] [] [] [] [] [] [] | 17 286 +----------------------------------------------------+ 287 33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh 288 53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387 187 Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB 188 +-------------------------------------------------+ 189 GNUnet | | 190 a2ps | [] [] [] [] [] | 191 aegis | () | 192 ant-phone | () | 193 anubis | [] | 194 ap-utils | | 195 aspell | [] [] [] [] | 196 bash | [] [] | 197 batchelor | [] | 198 bfd | | 199 bibshelf | [] | 200 binutils | [] | 201 bison | [] [] | 202 bluez-pin | [] [] [] [] | 203 clisp | [] [] | 204 console-tools | [] [] | 205 coreutils | [] [] [] [] | 206 cpio | | 207 cpplib | [] [] [] | 208 darkstat | [] () [] | 209 dialog | [] [] [] [] [] [] | 210 diffutils | [] [] [] [] [] | 211 doodle | [] | 212 e2fsprogs | [] [] | 213 enscript | [] [] [] [] | 214 error | [] [] [] [] | 215 fetchmail | [] [] () [] | 216 fileutils | [] [] | 217 findutils | [] [] [] | 218 flex | [] [] [] | 219 fslint | [] | 220 gas | | 221 gawk | [] [] [] | 222 gbiff | [] | 223 gcal | [] | 224 gcc | [] | 225 gettext-examples | [] [] [] [] | 226 gettext-runtime | [] [] [] [] | 227 gettext-tools | [] [] | 228 gimp-print | [] [] [] [] | 229 gip | | 230 gliv | [] | 231 glunarclock | | 232 gmult | [] [] | 233 gnubiff | () | 234 gnucash | [] () () [] | 235 gnucash-glossary | [] () | 236 gpe-aerial | [] [] | 237 gpe-beam | [] [] | 238 gpe-calendar | [] [] | 239 gpe-clock | [] [] | 240 gpe-conf | [] [] | 241 gpe-contacts | | 242 gpe-edit | [] | 243 gpe-go | [] | 244 gpe-login | [] [] | 245 gpe-ownerinfo | [] [] | 246 gpe-sketchbook | [] [] | 247 gpe-su | [] [] | 248 gpe-taskmanager | [] [] | 249 gpe-timesheet | [] | 250 gpe-today | [] [] | 251 gpe-todo | [] [] | 252 gphoto2 | [] [] [] [] | 253 gprof | [] [] | 254 gpsdrive | () () | 255 gramadoir | [] [] | 256 grep | [] [] [] [] [] [] | 257 gretl | | 258 gsasl | [] | 259 gss | | 260 gst-plugins | [] [] [] [] [] [] | 261 gstreamer | [] [] [] [] [] | 262 gtick | [] () | 263 gtkspell | [] [] [] | 264 hello | [] [] [] [] | 265 id-utils | [] [] | 266 impost | | 267 indent | [] [] | 268 iso_3166 | | 269 iso_3166_1 | [] [] [] [] [] | 270 iso_3166_2 | | 271 iso_3166_3 | [] | 272 iso_4217 | | 273 iso_639 | | 274 jpilot | [] | 275 jtag | | 276 jwhois | | 277 kbd | [] [] [] [] | 278 latrine | () | 279 ld | [] | 280 libc | [] [] [] [] [] | 281 libextractor | | 282 libgpewidget | [] [] [] | 283 libgphoto2 | [] | 284 libgphoto2_port | [] | 285 libgsasl | | 286 libiconv | [] [] [] [] [] | 287 libidn | | 288 lifelines | [] () | 289 lilypond | [] | 290 lingoteach | | 291 lynx | [] [] [] [] | 292 m4 | [] [] [] [] | 293 mailutils | [] | 294 make | [] [] | 295 man-db | [] () [] [] | 296 minicom | [] [] | 297 mysecretdiary | [] [] | 298 nano | [] () [] | 299 nano_1_0 | [] () [] [] | 300 opcodes | [] | 301 parted | [] [] [] [] | 302 psmisc | | 303 ptx | [] [] [] | 304 pwdutils | | 305 python | | 306 radius | [] | 307 recode | [] [] [] [] [] | 308 rpm | [] [] | 309 screem | | 310 scrollkeeper | [] [] [] [] [] [] [] [] | 311 sed | [] [] | 312 sh-utils | [] [] | 313 shared-mime-info | [] [] | 314 sharutils | [] [] [] [] [] | 315 silky | | 316 skencil | [] () | 317 sketch | [] () | 318 solfege | [] | 319 soundtracker | [] [] | 320 sp | [] | 321 stardict | [] | 322 tar | | 323 texinfo | [] [] | 324 textutils | [] [] [] | 325 tin | () () | 326 tp-robot | [] | 327 tuxpaint | [] [] [] [] [] [] [] | 328 unicode-han-tra... | | 329 unicode-transla... | | 330 util-linux | [] [] [] [] | 331 vorbis-tools | [] [] [] [] | 332 wastesedge | () | 333 wdiff | [] [] [] [] | 334 wget | | 335 xchat | [] [] [] [] [] | 336 xkeyboard-config | | 337 xpad | | 338 +-------------------------------------------------+ 339 af am ar az be bg bs ca cs cy da de el en en_GB 340 10 0 0 2 7 5 0 40 43 2 51 91 19 1 14 341 342 eo es et eu fa fi fr ga gl he hi hr hu id is 343 +-----------------------------------------------+ 344 GNUnet | | 345 a2ps | [] [] [] | 346 aegis | | 347 ant-phone | [] | 348 anubis | [] | 349 ap-utils | [] | 350 aspell | [] [] | 351 bash | [] [] [] [] | 352 batchelor | [] [] | 353 bfd | [] | 354 bibshelf | [] [] | 355 binutils | [] [] | 356 bison | [] [] [] [] [] | 357 bluez-pin | [] [] [] [] [] [] | 358 clisp | [] [] | 359 console-tools | | 360 coreutils | [] [] [] [] [] | 361 cpio | [] [] | 362 cpplib | [] [] | 363 darkstat | [] () [] [] [] | 364 dialog | [] [] [] [] [] [] [] | 365 diffutils | [] [] [] [] [] [] [] [] [] | 366 doodle | [] | 367 e2fsprogs | [] [] | 368 enscript | [] [] | 369 error | [] [] [] [] [] | 370 fetchmail | [] | 371 fileutils | [] [] [] [] [] | 372 findutils | [] [] [] [] | 373 flex | [] [] [] | 374 fslint | [] | 375 gas | [] [] | 376 gawk | [] [] [] [] | 377 gbiff | [] | 378 gcal | [] [] | 379 gcc | [] | 380 gettext-examples | [] [] [] | 381 gettext-runtime | [] [] [] [] [] | 382 gettext-tools | [] [] | 383 gimp-print | [] [] | 384 gip | [] [] [] | 385 gliv | () | 386 glunarclock | [] [] [] | 387 gmult | [] [] | 388 gnubiff | () | 389 gnucash | [] () | 390 gnucash-glossary | [] | 391 gpe-aerial | [] [] | 392 gpe-beam | [] [] | 393 gpe-calendar | [] [] [] [] | 394 gpe-clock | [] [] [] | 395 gpe-conf | [] | 396 gpe-contacts | [] | 397 gpe-edit | [] [] | 398 gpe-go | [] [] | 399 gpe-login | [] [] [] | 400 gpe-ownerinfo | [] [] [] [] [] | 401 gpe-sketchbook | [] [] | 402 gpe-su | [] [] [] | 403 gpe-taskmanager | [] [] [] | 404 gpe-timesheet | [] [] [] [] | 405 gpe-today | [] [] [] [] | 406 gpe-todo | [] [] [] | 407 gphoto2 | [] [] [] [] | 408 gprof | [] [] [] | 409 gpsdrive | () () [] | 410 gramadoir | [] [] | 411 grep | [] [] [] [] [] [] [] [] [] [] [] | 412 gretl | [] [] | 413 gsasl | [] [] [] | 414 gss | [] | 415 gst-plugins | [] [] | 416 gstreamer | | 417 gtick | [] [] [] [] | 418 gtkspell | [] [] [] [] [] | 419 hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | 420 id-utils | [] [] [] | 421 impost | [] [] | 422 indent | [] [] [] [] [] [] [] [] [] [] | 423 iso_3166 | [] [] [] | 424 iso_3166_1 | [] [] [] [] [] [] [] | 425 iso_3166_2 | [] | 426 iso_3166_3 | [] | 427 iso_4217 | [] [] [] | 428 iso_639 | [] [] [] [] | 429 jpilot | [] [] | 430 jtag | [] | 431 jwhois | [] [] [] [] | 432 kbd | [] [] | 433 latrine | [] [] | 434 ld | [] [] | 435 libc | [] [] [] [] [] | 436 libextractor | | 437 libgpewidget | [] [] [] [] [] | 438 libgphoto2 | [] [] [] | 439 libgphoto2_port | [] | 440 libgsasl | [] [] | 441 libiconv | [] [] [] [] [] [] [] [] [] [] | 442 libidn | [] [] | 443 lifelines | () | 444 lilypond | | 445 lingoteach | [] [] | 446 lynx | [] [] | 447 m4 | [] [] [] [] | 448 mailutils | [] [] | 449 make | [] [] [] [] [] [] [] | 450 man-db | () | 451 minicom | [] [] [] [] | 452 mysecretdiary | [] [] [] | 453 nano | [] [] () [] | 454 nano_1_0 | [] [] [] [] | 455 opcodes | [] [] [] | 456 parted | [] [] [] | 457 psmisc | [] | 458 ptx | [] [] [] [] [] [] [] [] [] | 459 pwdutils | | 460 python | | 461 radius | [] [] | 462 recode | [] [] [] [] [] [] [] | 463 rpm | [] | 464 screem | | 465 scrollkeeper | [] [] [] | 466 sed | [] [] [] [] [] [] | 467 sh-utils | [] [] [] [] [] [] | 468 shared-mime-info | [] [] [] [] [] [] | 469 sharutils | [] [] [] [] [] [] | 470 silky | [] | 471 skencil | [] [] | 472 sketch | [] [] | 473 solfege | | 474 soundtracker | [] [] | 475 sp | [] | 476 stardict | [] | 477 tar | [] [] [] [] | 478 texinfo | [] [] [] | 479 textutils | [] [] [] [] [] | 480 tin | [] () | 481 tp-robot | [] [] | 482 tuxpaint | [] [] [] [] [] [] [] [] | 483 unicode-han-tra... | | 484 unicode-transla... | [] [] | 485 util-linux | [] [] [] [] [] | 486 vorbis-tools | [] [] | 487 wastesedge | () | 488 wdiff | [] [] [] [] [] [] [] | 489 wget | [] [] [] [] | 490 xchat | [] [] [] [] [] | 491 xkeyboard-config | | 492 xpad | [] [] [] | 493 +-----------------------------------------------+ 494 eo es et eu fa fi fr ga gl he hi hr hu id is 495 15 85 21 15 2 35 115 45 16 8 1 6 40 27 1 496 497 it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso 498 +--------------------------------------------------+ 499 GNUnet | | 500 a2ps | () () [] [] () | 501 aegis | () | 502 ant-phone | [] | 503 anubis | [] [] [] | 504 ap-utils | | 505 aspell | [] [] | 506 bash | [] | 507 batchelor | [] | 508 bfd | | 509 bibshelf | [] | 510 binutils | | 511 bison | [] [] [] [] | 512 bluez-pin | [] [] | 513 clisp | [] | 514 console-tools | | 515 coreutils | [] [] | 516 cpio | | 517 cpplib | [] | 518 darkstat | [] [] | 519 dialog | [] [] | 520 diffutils | [] [] [] [] | 521 doodle | [] | 522 e2fsprogs | [] | 523 enscript | [] | 524 error | [] | 525 fetchmail | [] [] | 526 fileutils | [] [] [] | 527 findutils | [] [] | 528 flex | [] [] | 529 fslint | [] | 530 gas | | 531 gawk | [] [] | 532 gbiff | [] | 533 gcal | | 534 gcc | | 535 gettext-examples | [] [] [] | 536 gettext-runtime | [] [] [] [] | 537 gettext-tools | [] [] [] | 538 gimp-print | [] [] | 539 gip | [] | 540 gliv | [] | 541 glunarclock | [] [] | 542 gmult | [] [] | 543 gnubiff | () | 544 gnucash | [] () () [] | 545 gnucash-glossary | [] [] | 546 gpe-aerial | [] | 547 gpe-beam | [] | 548 gpe-calendar | [] | 549 gpe-clock | [] | 550 gpe-conf | [] | 551 gpe-contacts | | 552 gpe-edit | [] | 553 gpe-go | [] | 554 gpe-login | [] | 555 gpe-ownerinfo | [] | 556 gpe-sketchbook | [] | 557 gpe-su | [] | 558 gpe-taskmanager | [] [] | 559 gpe-timesheet | [] | 560 gpe-today | [] | 561 gpe-todo | [] | 562 gphoto2 | [] [] [] | 563 gprof | | 564 gpsdrive | () () () () | 565 gramadoir | () | 566 grep | [] [] [] [] | 567 gretl | [] | 568 gsasl | [] | 569 gss | | 570 gst-plugins | [] [] | 571 gstreamer | [] [] | 572 gtick | [] [] | 573 gtkspell | [] [] [] | 574 hello | [] [] [] [] [] [] [] [] [] | 575 id-utils | [] [] | 576 impost | | 577 indent | [] [] [] | 578 iso_3166 | [] | 579 iso_3166_1 | [] [] | 580 iso_3166_2 | [] | 581 iso_3166_3 | [] | 582 iso_4217 | [] [] [] | 583 iso_639 | [] [] [] | 584 jpilot | () () () | 585 jtag | | 586 jwhois | [] [] | 587 kbd | [] | 588 latrine | [] [] | 589 ld | | 590 libc | [] [] [] [] [] | 591 libextractor | | 592 libgpewidget | [] | 593 libgphoto2 | [] [] | 594 libgphoto2_port | [] [] | 595 libgsasl | [] | 596 libiconv | [] [] | 597 libidn | [] | 598 lifelines | [] | 599 lilypond | | 600 lingoteach | [] [] | 601 lynx | [] [] [] | 602 m4 | [] [] | 603 mailutils | | 604 make | [] [] [] | 605 man-db | () | 606 minicom | [] | 607 mysecretdiary | [] | 608 nano | [] [] [] | 609 nano_1_0 | [] [] [] [] | 610 opcodes | [] | 611 parted | [] [] [] [] | 612 psmisc | [] [] [] | 613 ptx | [] [] [] | 614 pwdutils | | 615 python | | 616 radius | | 617 recode | [] [] | 618 rpm | [] [] | 619 screem | [] | 620 scrollkeeper | [] [] [] | 621 sed | [] [] | 622 sh-utils | [] [] [] | 623 shared-mime-info | [] [] [] [] | 624 sharutils | [] [] [] | 625 silky | [] | 626 skencil | | 627 sketch | | 628 solfege | [] [] [] | 629 soundtracker | [] | 630 sp | () | 631 stardict | [] [] | 632 tar | [] [] [] | 633 texinfo | [] [] [] | 634 textutils | [] [] [] | 635 tin | | 636 tp-robot | [] | 637 tuxpaint | [] [] [] [] [] [] [] | 638 unicode-han-tra... | | 639 unicode-transla... | | 640 util-linux | [] [] [] | 641 vorbis-tools | [] | 642 wastesedge | [] | 643 wdiff | [] [] [] | 644 wget | [] | 645 xchat | [] [] [] [] [] | 646 xkeyboard-config | [] | 647 xpad | [] | 648 +--------------------------------------------------+ 649 it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso 650 46 35 11 2 1 1 2 2 3 11 0 15 96 7 5 0 651 652 or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv 653 +----------------------------------------------+ 654 GNUnet | | 655 a2ps | () [] [] [] [] [] [] | 656 aegis | () () | 657 ant-phone | [] | 658 anubis | [] [] [] | 659 ap-utils | () | 660 aspell | [] [] | 661 bash | [] [] [] | 662 batchelor | [] | 663 bfd | | 664 bibshelf | | 665 binutils | [] [] | 666 bison | [] [] [] [] [] | 667 bluez-pin | [] [] [] [] [] [] [] [] | 668 clisp | [] | 669 console-tools | [] | 670 coreutils | [] [] [] [] | 671 cpio | [] [] | 672 cpplib | | 673 darkstat | [] [] [] [] [] [] | 674 dialog | [] [] [] [] [] [] [] | 675 diffutils | [] [] [] [] [] [] | 676 doodle | [] | 677 e2fsprogs | [] [] | 678 enscript | [] [] [] [] | 679 error | [] [] [] | 680 fetchmail | [] [] [] [] | 681 fileutils | [] [] [] [] [] | 682 findutils | [] [] [] [] [] [] | 683 flex | [] [] [] [] [] | 684 fslint | [] [] [] | 685 gas | | 686 gawk | [] [] [] [] | 687 gbiff | [] | 688 gcal | [] | 689 gcc | | 690 gettext-examples | [] [] [] [] [] [] | 691 gettext-runtime | [] [] [] [] [] [] [] | 692 gettext-tools | [] [] [] [] [] [] [] | 693 gimp-print | [] [] | 694 gip | [] [] [] | 695 gliv | [] [] [] | 696 glunarclock | [] [] [] [] [] [] | 697 gmult | [] [] [] [] | 698 gnubiff | () [] | 699 gnucash | () [] [] [] [] | 700 gnucash-glossary | [] [] [] | 701 gpe-aerial | [] [] [] [] [] [] | 702 gpe-beam | [] [] [] [] [] [] | 703 gpe-calendar | [] [] [] [] [] [] [] | 704 gpe-clock | [] [] [] [] [] [] [] | 705 gpe-conf | [] [] [] [] [] [] | 706 gpe-contacts | [] [] [] [] | 707 gpe-edit | [] [] [] [] [] [] [] | 708 gpe-go | [] [] [] [] [] | 709 gpe-login | [] [] [] [] [] [] [] | 710 gpe-ownerinfo | [] [] [] [] [] [] [] | 711 gpe-sketchbook | [] [] [] [] [] [] [] | 712 gpe-su | [] [] [] [] [] [] [] | 713 gpe-taskmanager | [] [] [] [] [] [] [] | 714 gpe-timesheet | [] [] [] [] [] [] [] | 715 gpe-today | [] [] [] [] [] [] [] | 716 gpe-todo | [] [] [] [] [] [] [] [] | 717 gphoto2 | [] [] [] [] | 718 gprof | [] [] [] | 719 gpsdrive | [] [] | 720 gramadoir | [] | 721 grep | [] [] [] [] [] [] [] | 722 gretl | [] | 723 gsasl | [] [] [] [] [] | 724 gss | [] [] [] | 725 gst-plugins | [] [] [] [] | 726 gstreamer | [] [] [] [] | 727 gtick | [] [] [] | 728 gtkspell | [] [] [] [] [] [] | 729 hello | [] [] [] [] [] [] [] | 730 id-utils | [] [] [] [] | 731 impost | | 732 indent | [] [] [] [] [] [] | 733 iso_3166 | [] [] [] [] [] | 734 iso_3166_1 | [] [] [] [] | 735 iso_3166_2 | | 736 iso_3166_3 | [] [] [] | 737 iso_4217 | [] [] | 738 iso_639 | [] [] [] | 739 jpilot | | 740 jtag | [] | 741 jwhois | [] [] [] () () | 742 kbd | [] [] [] | 743 latrine | [] [] | 744 ld | [] | 745 libc | [] [] [] [] [] | 746 libextractor | [] | 747 libgpewidget | [] [] [] [] [] [] | 748 libgphoto2 | [] [] | 749 libgphoto2_port | [] | 750 libgsasl | [] [] [] | 751 libiconv | [] [] [] [] [] [] [] [] [] [] | 752 libidn | [] () | 753 lifelines | [] [] | 754 lilypond | | 755 lingoteach | [] | 756 lynx | [] [] [] | 757 m4 | [] [] [] [] [] | 758 mailutils | [] [] [] | 759 make | [] [] [] [] | 760 man-db | [] [] | 761 minicom | [] [] [] [] | 762 mysecretdiary | [] [] [] [] | 763 nano | [] [] [] | 764 nano_1_0 | [] [] [] [] | 765 opcodes | [] [] | 766 parted | [] [] [] [] | 767 psmisc | [] [] | 768 ptx | [] [] [] [] [] [] | 769 pwdutils | [] | 770 python | | 771 radius | [] [] | 772 recode | [] [] [] [] [] [] | 773 rpm | [] [] [] [] | 774 screem | | 775 scrollkeeper | [] [] [] [] [] [] [] | 776 sed | [] [] [] [] [] [] [] [] | 777 sh-utils | [] [] [] | 778 shared-mime-info | [] [] [] [] [] [] | 779 sharutils | [] [] [] | 780 silky | [] | 781 skencil | [] [] [] | 782 sketch | [] [] [] | 783 solfege | | 784 soundtracker | [] [] | 785 sp | | 786 stardict | [] [] | 787 tar | [] [] [] [] | 788 texinfo | [] [] [] [] | 789 textutils | [] [] [] | 790 tin | | 791 tp-robot | [] | 792 tuxpaint | [] [] [] [] [] [] [] [] | 793 unicode-han-tra... | | 794 unicode-transla... | | 795 util-linux | [] [] [] | 796 vorbis-tools | [] [] | 797 wastesedge | | 798 wdiff | [] [] [] [] [] [] | 799 wget | | 800 xchat | [] [] [] [] [] [] [] | 801 xkeyboard-config | | 802 xpad | | 803 +----------------------------------------------+ 804 or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv 805 1 3 47 29 57 6 78 73 5 44 12 12 50 85 806 807 ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu 808 +-----------------------------------------------+ 809 GNUnet | | 0 810 a2ps | [] [] [] | 19 811 aegis | | 0 812 ant-phone | [] [] | 5 813 anubis | [] [] [] | 11 814 ap-utils | () [] | 2 815 aspell | [] [] [] | 13 816 bash | [] | 11 817 batchelor | [] [] | 7 818 bfd | | 1 819 bibshelf | [] | 5 820 binutils | [] | 6 821 bison | [] [] | 18 822 bluez-pin | [] [] [] [] [] | 25 823 clisp | | 7 824 console-tools | [] [] | 5 825 coreutils | [] [] | 17 826 cpio | [] [] [] | 7 827 cpplib | [] [] | 8 828 darkstat | [] () () | 15 829 dialog | [] [] [] | 25 830 diffutils | [] [] [] [] | 28 831 doodle | [] | 5 832 e2fsprogs | [] | 8 833 enscript | [] | 12 834 error | [] [] [] | 16 835 fetchmail | [] | 12 836 fileutils | [] [] [] | 18 837 findutils | [] [] | 17 838 flex | [] [] | 15 839 fslint | [] | 7 840 gas | [] | 3 841 gawk | [] | 14 842 gbiff | [] | 5 843 gcal | [] | 5 844 gcc | [] [] | 4 845 gettext-examples | [] [] [] [] [] | 21 846 gettext-runtime | [] [] [] [] [] | 25 847 gettext-tools | [] [] [] [] [] | 19 848 gimp-print | [] | 11 849 gip | [] | 8 850 gliv | [] [] | 7 851 glunarclock | [] [] | 13 852 gmult | [] [] [] | 13 853 gnubiff | [] | 3 854 gnucash | () [] | 10 855 gnucash-glossary | [] [] | 9 856 gpe-aerial | [] [] | 13 857 gpe-beam | [] [] | 13 858 gpe-calendar | [] [] [] [] | 18 859 gpe-clock | [] [] [] [] | 17 860 gpe-conf | [] [] | 12 861 gpe-contacts | [] [] | 7 862 gpe-edit | [] [] [] [] | 15 863 gpe-go | [] [] | 11 864 gpe-login | [] [] [] [] [] | 18 865 gpe-ownerinfo | [] [] [] [] | 19 866 gpe-sketchbook | [] [] | 14 867 gpe-su | [] [] [] | 16 868 gpe-taskmanager | [] [] [] | 17 869 gpe-timesheet | [] [] [] [] | 17 870 gpe-today | [] [] [] [] [] | 19 871 gpe-todo | [] [] [] | 17 872 gphoto2 | [] [] [] | 18 873 gprof | [] [] | 10 874 gpsdrive | | 3 875 gramadoir | [] | 6 876 grep | [] [] [] [] | 32 877 gretl | | 4 878 gsasl | [] [] | 12 879 gss | [] | 5 880 gst-plugins | [] [] [] | 17 881 gstreamer | [] [] [] [] | 15 882 gtick | [] | 11 883 gtkspell | [] [] [] [] | 21 884 hello | [] [] [] [] | 37 885 id-utils | [] [] | 13 886 impost | [] | 3 887 indent | [] [] [] [] | 25 888 iso_3166 | [] [] [] | 12 889 iso_3166_1 | [] [] | 20 890 iso_3166_2 | | 2 891 iso_3166_3 | [] [] | 8 892 iso_4217 | [] [] | 10 893 iso_639 | [] [] | 12 894 jpilot | [] [] [] | 6 895 jtag | | 2 896 jwhois | [] [] [] | 12 897 kbd | [] [] | 12 898 latrine | [] [] | 8 899 ld | [] | 5 900 libc | [] [] | 22 901 libextractor | | 1 902 libgpewidget | [] [] | 17 903 libgphoto2 | [] | 9 904 libgphoto2_port | | 5 905 libgsasl | [] | 7 906 libiconv | [] [] [] [] [] | 32 907 libidn | [] [] | 6 908 lifelines | | 4 909 lilypond | | 1 910 lingoteach | [] | 6 911 lynx | [] [] [] | 15 912 m4 | [] [] | 17 913 mailutils | [] | 7 914 make | [] [] | 18 915 man-db | | 5 916 minicom | | 11 917 mysecretdiary | [] [] | 12 918 nano | [] [] | 13 919 nano_1_0 | [] [] [] | 18 920 opcodes | [] [] | 9 921 parted | [] [] [] | 18 922 psmisc | [] | 7 923 ptx | [] [] | 23 924 pwdutils | | 1 925 python | | 0 926 radius | [] | 6 927 recode | [] [] | 22 928 rpm | [] [] | 11 929 screem | | 1 930 scrollkeeper | [] [] [] | 24 931 sed | [] [] [] | 21 932 sh-utils | [] | 15 933 shared-mime-info | [] [] [] | 21 934 sharutils | [] [] [] | 20 935 silky | | 3 936 skencil | | 6 937 sketch | | 6 938 solfege | | 4 939 soundtracker | [] | 8 940 sp | [] | 3 941 stardict | [] [] [] [] | 10 942 tar | [] [] [] [] | 15 943 texinfo | [] [] | 14 944 textutils | [] [] [] | 17 945 tin | | 1 946 tp-robot | [] [] [] | 8 947 tuxpaint | [] [] [] [] | 34 948 unicode-han-tra... | | 0 949 unicode-transla... | | 2 950 util-linux | [] [] [] | 18 951 vorbis-tools | [] | 10 952 wastesedge | | 1 953 wdiff | [] [] | 22 954 wget | [] [] | 7 955 xchat | [] [] [] [] | 26 956 xkeyboard-config | [] | 2 957 xpad | [] | 5 958 +-----------------------------------------------+ 959 73 teams ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu 960 149 domains 0 0 0 1 77 30 0 92 16 0 42 32 0 1746 289 961 290 962 Some counters in the preceding matrix are higher than the number of … … 299 971 distribution. 300 972 301 If September 2001 seems to be old, you may fetch a more recent copy302 of this `ABOUT-NLS' file on most GNU archive sites. The most 303 up-to-datematrix with full percentage details can be found at973 If May 2005 seems to be old, you may fetch a more recent copy of 974 this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date 975 matrix with full percentage details can be found at 304 976 `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. 305 977 306 Using `gettext' in new packages307 =============================== 308 309 If you are writing a freely available program and want to978 1.6 Using `gettext' in new packages 979 =================================== 980 981 If you are writing a freely available program and want to 310 982 internationalize it you are welcome to use GNU `gettext' in your 311 983 package. Of course you have to respect the GNU Library General Public … … 316 988 317 989 Once the sources are changed appropriately and the setup can handle 318 t ouse of `gettext' the only thing missing are the translations. The990 the use of `gettext' the only thing missing are the translations. The 319 991 Free Translation Project is also available for packages which are not 320 992 developed inside the GNU project. Therefore the information given above sweep/trunk/ChangeLog
r144 r183 1 2005-07-27 gettextize <bug-gnu-gettext@gnu.org> 2 3 * m4/codeset.m4: New file, from gettext-0.14.5. 4 * m4/gettext.m4: New file, from gettext-0.14.5. 5 * m4/glibc2.m4: New file, from gettext-0.14.5. 6 * m4/glibc21.m4: New file, from gettext-0.14.5. 7 * m4/iconv.m4: New file, from gettext-0.14.5. 8 * m4/intdiv0.m4: New file, from gettext-0.14.5. 9 * m4/intmax.m4: New file, from gettext-0.14.5. 10 * m4/inttypes.m4: New file, from gettext-0.14.5. 11 * m4/inttypes_h.m4: New file, from gettext-0.14.5. 12 * m4/inttypes-pri.m4: New file, from gettext-0.14.5. 13 * m4/isc-posix.m4: New file, from gettext-0.14.5. 14 * m4/lcmessage.m4: New file, from gettext-0.14.5. 15 * m4/lib-ld.m4: New file, from gettext-0.14.5. 16 * m4/lib-link.m4: New file, from gettext-0.14.5. 17 * m4/lib-prefix.m4: New file, from gettext-0.14.5. 18 * m4/longdouble.m4: New file, from gettext-0.14.5. 19 * m4/longlong.m4: New file, from gettext-0.14.5. 20 * m4/nls.m4: New file, from gettext-0.14.5. 21 * m4/po.m4: New file, from gettext-0.14.5. 22 * m4/printf-posix.m4: New file, from gettext-0.14.5. 23 * m4/progtest.m4: New file, from gettext-0.14.5. 24 * m4/signed.m4: New file, from gettext-0.14.5. 25 * m4/size_max.m4: New file, from gettext-0.14.5. 26 * m4/stdint_h.m4: New file, from gettext-0.14.5. 27 * m4/uintmax_t.m4: New file, from gettext-0.14.5. 28 * m4/ulonglong.m4: New file, from gettext-0.14.5. 29 * m4/wchar_t.m4: New file, from gettext-0.14.5. 30 * m4/wint_t.m4: New file, from gettext-0.14.5. 31 * m4/xsize.m4: New file, from gettext-0.14.5. 32 * m4/Makefile.am (EXTRA_DIST): Add the new files. 33 * Makefile.am (EXTRA_DIST): Add config.rpath, mkinstalldirs. 34 1 35 Fri Apr 30 15:06:10 EST 2004 Conrad Parker <conrad@metadecks.org> 2 36 sweep/trunk/Makefile.am
r148 r183 13 13 pixmap_DATA = sweep.png 14 14 15 EXTRA_DIST = $(desktop_DATA) $(pkgdata_DATA) $(pixmap_DATA) \15 EXTRA_DIST = config.rpath mkinstalldirs $(desktop_DATA) $(pkgdata_DATA) $(pixmap_DATA) \ 16 16 sweep.spec README.Solaris README.ALSA README.i18n acconfig.h TODO 17 17 sweep/trunk/intl/ChangeLog
r124 r183 1 200 1-09-13 GNU <bug-gnu-utils@gnu.org>1 2005-05-23 GNU <bug-gnu-gettext@gnu.org> 2 2 3 * Version 0.1 0.40released.3 * Version 0.14.5 released. 4 4 sweep/trunk/intl/Makefile.in
r124 r183 1 # Makefile for directory with message catalog handling in GNU NLS Utilities.2 # Copyright (C) 1995-1998, 2000 , 2001Free Software Foundation, Inc.1 # Makefile for directory with message catalog handling library of GNU gettext 2 # Copyright (C) 1995-1998, 2000-2005 Free Software Foundation, Inc. 3 3 # 4 4 # This program is free software; you can redistribute it and/or modify it … … 14 14 # You should have received a copy of the GNU Library General Public 15 15 # License along with this program; if not, write to the Free Software 16 # Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 # USA. 18 18 … … 25 25 top_srcdir = @top_srcdir@ 26 26 top_builddir = .. 27 VPATH = @srcdir@27 VPATH = $(srcdir) 28 28 29 29 prefix = @prefix@ … … 41 41 INSTALL_DATA = @INSTALL_DATA@ 42 42 MKINSTALLDIRS = @MKINSTALLDIRS@ 43 mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`43 mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) 44 44 45 45 l = @INTL_LIBTOOL_SUFFIX_PREFIX@ … … 53 53 54 54 DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ 55 -DLIBDIR=\"$(libdir)\" @DEFS@ 55 -DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \ 56 -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ 57 -Dset_relocation_prefix=libintl_set_relocation_prefix \ 58 -Drelocate=libintl_relocate \ 59 -DDEPENDS_ON_LIBICONV=1 @DEFS@ 56 60 CPPFLAGS = @CPPFLAGS@ 57 61 CFLAGS = @CFLAGS@ 58 62 LDFLAGS = @LDFLAGS@ 63 LIBS = @LIBS@ 59 64 60 65 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) 61 66 62 HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h 63 COMHDRS = gettext.h gettextP.h hash-string.h 64 SOURCES = $(COMSRCS) intl-compat.c 65 COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ 66 finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ 67 explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \ 68 localcharset.c 69 OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ 70 finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ 71 explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \ 72 plural.$lo localcharset.$lo 73 GETTOBJS = intl-compat.$lo 67 HEADERS = \ 68 gmo.h \ 69 gettextP.h \ 70 hash-string.h \ 71 loadinfo.h \ 72 plural-exp.h \ 73 eval-plural.h \ 74 localcharset.h \ 75 relocatable.h \ 76 xsize.h \ 77 printf-args.h printf-args.c \ 78 printf-parse.h wprintf-parse.h printf-parse.c \ 79 vasnprintf.h vasnwprintf.h vasnprintf.c \ 80 os2compat.h \ 81 libgnuintl.h.in 82 SOURCES = \ 83 bindtextdom.c \ 84 dcgettext.c \ 85 dgettext.c \ 86 gettext.c \ 87 finddomain.c \ 88 loadmsgcat.c \ 89 localealias.c \ 90 textdomain.c \ 91 l10nflist.c \ 92 explodename.c \ 93 dcigettext.c \ 94 dcngettext.c \ 95 dngettext.c \ 96 ngettext.c \ 97 plural.y \ 98 plural-exp.c \ 99 localcharset.c \ 100 relocatable.c \ 101 langprefs.c \ 102 localename.c \ 103 log.c \ 104 printf.c \ 105 osdep.c \ 106 os2compat.c \ 107 intl-compat.c 108 OBJECTS = \ 109 bindtextdom.$lo \ 110 dcgettext.$lo \ 111 dgettext.$lo \ 112 gettext.$lo \ 113 finddomain.$lo \ 114 loadmsgcat.$lo \ 115 localealias.$lo \ 116 textdomain.$lo \ 117 l10nflist.$lo \ 118 explodename.$lo \ 119 dcigettext.$lo \ 120 dcngettext.$lo \ 121 dngettext.$lo \ 122 ngettext.$lo \ 123 plural.$lo \ 124 plural-exp.$lo \ 125 localcharset.$lo \ 126 relocatable.$lo \ 127 langprefs.$lo \ 128 localename.$lo \ 129 log.$lo \ 130 printf.$lo \ 131 osdep.$lo \ 132 intl-compat.$lo 74 133 DISTFILES.common = Makefile.in \ 75 134 config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) 76 135 DISTFILES.generated = plural.c 77 136 DISTFILES.normal = VERSION 78 DISTFILES.gettext = COPYING.LIB-2 COPYING.LIB-2.1 libintl.glibc 79 DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c 137 DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \ 138 libgnuintl.h_vms Makefile.vms \ 139 libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc 140 DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ 141 COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h 142 143 all: all-@USE_INCLUDED_LIBINTL@ 144 all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed 145 all-no: all-no-@BUILD_INCLUDED_LIBINTL@ 146 all-no-yes: libgnuintl.$la 147 all-no-no: 148 149 libintl.a libgnuintl.a: $(OBJECTS) 150 rm -f $@ 151 $(AR) cru $@ $(OBJECTS) 152 $(RANLIB) $@ 153 154 libintl.la libgnuintl.la: $(OBJECTS) 155 $(LIBTOOL) --mode=link \ 156 $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ 157 $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) -lc \ 158 -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ 159 -rpath $(libdir) \ 160 -no-undefined 80 161 81 162 # Libtool's library version information for libintl. … … 84 165 # Maintainers of other packages that include the intl directory must *not* 85 166 # change these values. 86 LTV_CURRENT= 187 LTV_REVISION= 188 LTV_AGE= 0167 LTV_CURRENT=7 168 LTV_REVISION=3 169 LTV_AGE=4 89 170 90 171 .SUFFIXES: 91 172 .SUFFIXES: .c .y .o .lo .sin .sed 173 92 174 .c.o: 93 175 $(COMPILE) $< 94 .c.lo:95 $(LIBTOOL) --mode=compile $(COMPILE) $<96 176 97 177 .y.c: … … 99 179 rm -f $*.h 100 180 101 .sin.sed: 102 sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@ 103 mv t-$@ $@ 104 105 INCLUDES = -I.. -I. -I$(top_srcdir)/intl 106 107 all: all-@USE_INCLUDED_LIBINTL@ 108 all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed 109 all-no: all-no-@BUILD_INCLUDED_LIBINTL@ 110 all-no-yes: libgnuintl.$la 111 all-no-no: 112 113 libintl.a libgnuintl.a: $(OBJECTS) 114 rm -f $@ 115 $(AR) cru $@ $(OBJECTS) 116 $(RANLIB) $@ 117 118 libintl.la libgnuintl.la: $(OBJECTS) 119 $(LIBTOOL) --mode=link \ 120 $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ 121 $(OBJECTS) @LIBICONV@ \ 122 -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ 123 -rpath $(libdir) \ 124 -no-undefined 181 bindtextdom.lo: $(srcdir)/bindtextdom.c 182 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c 183 dcgettext.lo: $(srcdir)/dcgettext.c 184 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c 185 dgettext.lo: $(srcdir)/dgettext.c 186 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c 187 gettext.lo: $(srcdir)/gettext.c 188 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c 189 finddomain.lo: $(srcdir)/finddomain.c 190 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c 191 loadmsgcat.lo: $(srcdir)/loadmsgcat.c 192 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c 193 localealias.lo: $(srcdir)/localealias.c 194 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c 195 textdomain.lo: $(srcdir)/textdomain.c 196 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c 197 l10nflist.lo: $(srcdir)/l10nflist.c 198 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c 199 explodename.lo: $(srcdir)/explodename.c 200 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c 201 dcigettext.lo: $(srcdir)/dcigettext.c 202 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c 203 dcngettext.lo: $(srcdir)/dcngettext.c 204 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c 205 dngettext.lo: $(srcdir)/dngettext.c 206 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c 207 ngettext.lo: $(srcdir)/ngettext.c 208 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c 209 plural.lo: $(srcdir)/plural.c 210 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c 211 plural-exp.lo: $(srcdir)/plural-exp.c 212 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c 213 localcharset.lo: $(srcdir)/localcharset.c 214 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c 215 relocatable.lo: $(srcdir)/relocatable.c 216 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c 217 langprefs.lo: $(srcdir)/langprefs.c 218 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/langprefs.c 219 localename.lo: $(srcdir)/localename.c 220 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c 221 log.lo: $(srcdir)/log.c 222 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c 223 printf.lo: $(srcdir)/printf.c 224 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c 225 osdep.lo: $(srcdir)/osdep.c 226 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c 227 intl-compat.lo: $(srcdir)/intl-compat.c 228 $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c 229 230 ref-add.sed: $(srcdir)/ref-add.sin 231 sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed 232 mv t-ref-add.sed ref-add.sed 233 ref-del.sed: $(srcdir)/ref-del.sin 234 sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed 235 mv t-ref-del.sed ref-del.sed 236 237 INCLUDES = -I. -I$(srcdir) -I.. 238 239 libgnuintl.h: $(srcdir)/libgnuintl.h.in 240 sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \ 241 -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ 242 -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ 243 -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ 244 < $(srcdir)/libgnuintl.h.in > libgnuintl.h 125 245 126 246 libintl.h: libgnuintl.h 127 cp $(srcdir)/libgnuintl.h libintl.h128 129 charset.alias: config.charset247 cp libgnuintl.h libintl.h 248 249 charset.alias: $(srcdir)/config.charset 130 250 $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ 131 251 mv t-$@ $@ 132 252 133 253 check: all 134 135 # This installation goal is only used in GNU gettext. Packages which136 # only use the library should use install instead.137 254 138 255 # We must not install the libintl.h/libintl.a files if we are on a … … 143 260 install: install-exec install-data 144 261 install-exec: all 145 if test "$(PACKAGE)" = "gettext"\146 && test '@ INTLOBJS@' = '$(GETTOBJS)'; then \262 if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ 263 && test '@USE_INCLUDED_LIBINTL@' = yes; then \ 147 264 $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ 148 265 $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ 149 266 $(LIBTOOL) --mode=install \ 150 267 $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ 268 if test "@RELOCATABLE@" = yes; then \ 269 dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \ 270 if test -n "$$dependencies"; then \ 271 rm -f $(DESTDIR)$(libdir)/libintl.la; \ 272 fi; \ 273 fi; \ 274 else \ 275 : ; \ 276 fi 277 if test "$(PACKAGE)" = "gettext-tools" \ 278 && test '@USE_INCLUDED_LIBINTL@' = no \ 279 && test @GLIBC2@ != no; then \ 280 $(mkinstalldirs) $(DESTDIR)$(libdir); \ 281 $(LIBTOOL) --mode=install \ 282 $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \ 283 rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ 284 $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \ 285 $(LIBTOOL) --mode=uninstall \ 286 rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \ 151 287 else \ 152 288 : ; \ 153 289 fi 154 290 if test '@USE_INCLUDED_LIBINTL@' = yes; then \ 155 $(mkinstalldirs) $(DESTDIR)$(libdir); \291 test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ 156 292 temp=$(DESTDIR)$(libdir)/t-charset.alias; \ 157 293 dest=$(DESTDIR)$(libdir)/charset.alias; \ … … 182 318 fi 183 319 install-data: all 184 if test "$(PACKAGE)" = "gettext "; then \320 if test "$(PACKAGE)" = "gettext-tools"; then \ 185 321 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ 186 322 $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ 187 323 $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ 188 dists="COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common)"; \324 dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \ 189 325 for file in $$dists; do \ 190 326 $(INSTALL_DATA) $(srcdir)/$$file \ … … 206 342 fi 207 343 344 install-strip: install 345 346 installdirs: 347 if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ 348 && test '@USE_INCLUDED_LIBINTL@' = yes; then \ 349 $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ 350 else \ 351 : ; \ 352 fi 353 if test "$(PACKAGE)" = "gettext-tools" \ 354 && test '@USE_INCLUDED_LIBINTL@' = no \ 355 && test @GLIBC2@ != no; then \ 356 $(mkinstalldirs) $(DESTDIR)$(libdir); \ 357 else \ 358 : ; \ 359 fi 360 if test '@USE_INCLUDED_LIBINTL@' = yes; then \ 361 test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ 362 $(mkinstalldirs) $(DESTDIR)$(localedir); \ 363 else \ 364 : ; \ 365 fi 366 if test "$(PACKAGE)" = "gettext-tools"; then \ 367 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ 368 else \ 369 : ; \ 370 fi 371 208 372 # Define this as empty until I found a useful application. 209 373 installcheck: 210 374 211 375 uninstall: 212 if test "$(PACKAGE)" = "gettext"\213 && test '@ INTLOBJS@' = '$(GETTOBJS)'; then \376 if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ 377 && test '@USE_INCLUDED_LIBINTL@' = yes; then \ 214 378 rm -f $(DESTDIR)$(includedir)/libintl.h; \ 215 379 $(LIBTOOL) --mode=uninstall \ 216 380 rm -f $(DESTDIR)$(libdir)/libintl.$la; \ 381 else \ 382 : ; \ 383 fi 384 if test "$(PACKAGE)" = "gettext-tools" \ 385 && test '@USE_INCLUDED_LIBINTL@' = no \ 386 && test @GLIBC2@ != no; then \ 387 rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ 217 388 else \ 218 389 : ; \ … … 244 415 : ; \ 245 416 fi 246 if test "$(PACKAGE)" = "gettext "; then \247 for file in VERSION ChangeLog COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \417 if test "$(PACKAGE)" = "gettext-tools"; then \ 418 for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ 248 419 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ 249 420 done; \ … … 252 423 fi 253 424 254 info dvi :425 info dvi ps pdf html: 255 426 256 427 $(OBJECTS): ../config.h libgnuintl.h 257 bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h 258 dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h 428 bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h 429 dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h 430 explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h 431 dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h 432 dcigettext.$lo: $(srcdir)/eval-plural.h 433 localcharset.$lo: $(srcdir)/localcharset.h 434 localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h 435 printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c 259 436 260 437 tags: TAGS … … 263 440 here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) 264 441 442 ctags: CTAGS 443 444 CTAGS: $(HEADERS) $(SOURCES) 445 here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) 446 265 447 id: ID 266 448 … … 270 452 271 453 mostlyclean: 272 rm -f *.a *.la *.o *. lo core core.*273 rm -f lib intl.h charset.alias ref-add.sed ref-del.sed454 rm -f *.a *.la *.o *.obj *.lo core core.* 455 rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed 274 456 rm -f -r .libs _libs 275 457 … … 278 460 distclean: clean 279 461 rm -f Makefile ID TAGS 280 if test "$(PACKAGE)" = gettext; then \462 if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \ 281 463 rm -f ChangeLog.inst $(DISTFILES.normal); \ 282 464 else \ … … 293 475 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) 294 476 dist distdir: Makefile 295 if test "$(PACKAGE)" = gettext; then \ 296 additional="$(DISTFILES.gettext)"; \ 297 else \ 298 additional="$(DISTFILES.normal)"; \ 299 fi; \ 300 $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ 301 for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ 302 if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ 303 ln $$dir/$$file $(distdir) 2> /dev/null \ 304 || cp -p $$dir/$$file $(distdir); \ 305 done 306 307 Makefile: Makefile.in ../config.status 308 cd .. \ 309 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 477 if test "$(PACKAGE)" = "gettext-tools"; then \ 478 : ; \ 479 else \ 480 if test "$(PACKAGE)" = "gettext-runtime"; then \ 481 additional="$(DISTFILES.gettext)"; \ 482 else \ 483 additional="$(DISTFILES.normal)"; \ 484 fi; \ 485 $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ 486 for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ 487 if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ 488 cp -p $$dir/$$file $(distdir) || test $$file = Makefile.in || exit 1; \ 489 done; \ 490 fi 491 492 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 493 cd $(top_builddir) && $(SHELL) ./config.status 494 # This would be more efficient, but doesn't work any more with autoconf-2.57, 495 # when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used. 496 # cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 310 497 311 498 # Tell versions [3.59,3.63) of GNU make not to export all variables. sweep/trunk/intl/VERSION
r124 r183 1 GNU gettext library from gettext-0.1 0.401 GNU gettext library from gettext-0.14.5 sweep/trunk/intl/bindtextdom.c
r124 r183 1 1 /* Implementation of the bindtextdomain(3) function 2 Copyright (C) 1995-1998, 2000 , 2001Free Software Foundation, Inc.2 Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify it … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 … … 46 46 using libintl.a cannot be linked statically. */ 47 47 #if !defined _LIBC 48 # define _nl_default_dirname _nl_default_dirname__49 # define _nl_domain_bindings _nl_domain_bindings__48 # define _nl_default_dirname libintl_nl_default_dirname 49 # define _nl_domain_bindings libintl_nl_domain_bindings 50 50 #endif 51 51 … … 59 59 /* Contains the default location of the message catalogs. */ 60 60 extern const char _nl_default_dirname[]; 61 #ifdef _LIBC 62 extern const char _nl_default_dirname_internal[] attribute_hidden; 63 #else 64 # define INTUSE(name) name 65 #endif 61 66 62 67 /* List with bindings of specific domains. */ … … 64 69 65 70 /* Lock variable to protect the global data in the gettext implementation. */ 66 __libc_rwlock_define (extern, _nl_state_lock )71 __libc_rwlock_define (extern, _nl_state_lock attribute_hidden) 67 72 68 73 … … 78 83 # endif 79 84 #else 80 # define BINDTEXTDOMAIN bindtextdomain__ 81 # define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__ 82 #endif 83 84 /* Prototypes for local functions. */ 85 static void set_binding_values PARAMS ((const char *domainname, 86 const char **dirnamep, 87 const char **codesetp)); 88 85 # define BINDTEXTDOMAIN libintl_bindtextdomain 86 # define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset 87 #endif 88 89 89 /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP 90 90 to be used for the DOMAINNAME message catalog. … … 94 94 modified nor returned. */ 95 95 static void 96 set_binding_values (domainname, dirnamep, codesetp) 97 const char *domainname; 98 const char **dirnamep; 99 const char **codesetp; 96 set_binding_values (const char *domainname, 97 const char **dirnamep, const char **codesetp) 100 98 { 101 99 struct binding *binding; … … 147 145 if (strcmp (dirname, result) != 0) 148 146 { 149 if (strcmp (dirname, _nl_default_dirname) == 0)150 result = (char *) _nl_default_dirname;147 if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) 148 result = (char *) INTUSE(_nl_default_dirname); 151 149 else 152 150 { … … 163 161 if (__builtin_expect (result != NULL, 1)) 164 162 { 165 if (binding->dirname != _nl_default_dirname)163 if (binding->dirname != INTUSE(_nl_default_dirname)) 166 164 free (binding->dirname); 167 165 … … 217 215 /* Simply return the default values. */ 218 216 if (dirnamep) 219 *dirnamep = _nl_default_dirname;217 *dirnamep = INTUSE(_nl_default_dirname); 220 218 if (codesetp) 221 219 *codesetp = NULL; … … 239 237 if (dirname == NULL) 240 238 /* The default value. */ 241 dirname = _nl_default_dirname;239 dirname = INTUSE(_nl_default_dirname); 242 240 else 243 241 { 244 if (strcmp (dirname, _nl_default_dirname) == 0)245 dirname = _nl_default_dirname;242 if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) 243 dirname = INTUSE(_nl_default_dirname); 246 244 else 247 245 { … … 266 264 else 267 265 /* The default value. */ 268 new_binding->dirname = (char *) _nl_default_dirname;266 new_binding->dirname = (char *) INTUSE(_nl_default_dirname); 269 267 270 268 new_binding->codeset_cntr = 0; … … 322 320 { 323 321 failed_codeset: 324 if (new_binding->dirname != _nl_default_dirname)322 if (new_binding->dirname != INTUSE(_nl_default_dirname)) 325 323 free (new_binding->dirname); 326 324 failed_dirname: … … 344 342 in DIRNAME rather than in the system locale data base. */ 345 343 char * 346 BINDTEXTDOMAIN (domainname, dirname) 347 const char *domainname; 348 const char *dirname; 344 BINDTEXTDOMAIN (const char *domainname, const char *dirname) 349 345 { 350 346 set_binding_values (domainname, &dirname, NULL); … … 355 351 DOMAINNAME message catalog will be returned. */ 356 352 char * 357 BIND_TEXTDOMAIN_CODESET (domainname, codeset) 358 const char *domainname; 359 const char *codeset; 353 BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset) 360 354 { 361 355 set_binding_values (domainname, NULL, &codeset); sweep/trunk/intl/dcgettext.c
r124 r183 1 1 /* Implementation of the dcgettext(3) function. 2 Copyright (C) 1995-1999, 2000 , 2001Free Software Foundation, Inc.2 Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify it … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 … … 38 38 # define DCIGETTEXT __dcigettext 39 39 #else 40 # define DCGETTEXT dcgettext__41 # define DCIGETTEXT dcigettext__40 # define DCGETTEXT libintl_dcgettext 41 # define DCIGETTEXT libintl_dcigettext 42 42 #endif 43 43 … … 45 45 locale. */ 46 46 char * 47 DCGETTEXT (domainname, msgid, category) 48 const char *domainname; 49 const char *msgid; 50 int category; 47 DCGETTEXT (const char *domainname, const char *msgid, int category) 51 48 { 52 49 return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); … … 55 52 #ifdef _LIBC 56 53 /* Alias for function name in GNU C Library. */ 54 INTDEF(__dcgettext) 57 55 weak_alias (__dcgettext, dcgettext); 58 56 #endif sweep/trunk/intl/dgettext.c
r124 r183 1 1 /* Implementation of the dgettext(3) function. 2 Copyright (C) 1995-1997, 2000 , 2001Free Software Foundation, Inc.2 Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify it … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 … … 21 21 #endif 22 22 23 #include "gettextP.h" 24 23 25 #include <locale.h> 24 26 25 #include "gettextP.h"26 27 #ifdef _LIBC 27 28 # include <libintl.h> … … 38 39 #ifdef _LIBC 39 40 # define DGETTEXT __dgettext 40 # define DCGETTEXT __dcgettext41 # define DCGETTEXT INTUSE(__dcgettext) 41 42 #else 42 # define DGETTEXT dgettext__43 # define DCGETTEXT dcgettext__43 # define DGETTEXT libintl_dgettext 44 # define DCGETTEXT libintl_dcgettext 44 45 #endif 45 46 … … 47 48 LC_MESSAGES locale. */ 48 49 char * 49 DGETTEXT (domainname, msgid) 50 const char *domainname; 51 const char *msgid; 50 DGETTEXT (const char *domainname, const char *msgid) 52 51 { 53 52 return DCGETTEXT (domainname, msgid, LC_MESSAGES); sweep/trunk/intl/explodename.c
r124 r183 1 /* Copyright (C) 1995-1998, 2000 , 2001Free Software Foundation, Inc.1 /* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc. 2 2 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. 3 3 … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 … … 39 39 40 40 char * 41 _nl_find_language (name) 42 const char *name; 41 _nl_find_language (const char *name) 43 42 { 44 43 while (name[0] != '\0' && name[0] != '_' && name[0] != '@' … … 51 50 52 51 int 53 _nl_explode_name (name, language, modifier, territory, codeset, 54 normalized_codeset, special, sponsor, revision) 55 char *name; 56 const char **language; 57 const char **modifier; 58 const char **territory; 59 const char **codeset; 60 const char **normalized_codeset; 61 const char **special; 62 const char **sponsor; 63 const char **revision; 52 _nl_explode_name (char *name, 53 const char **language, const char **modifier, 54 const char **territory, const char **codeset, 55 const char **normalized_codeset, const char **special, 56 const char **sponsor, const char **revision) 64 57 { 65 58 enum { undecided, xpg, cen } syntax; sweep/trunk/intl/finddomain.c
r124 r183 1 1 /* Handle list of needed message catalogs 2 Copyright (C) 1995-1999, 2000 , 2001Free Software Foundation, Inc.2 Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc. 3 3 Written by Ulrich Drepper <drepper@gnu.org>, 1995. 4 4 … … 15 15 You should have received a copy of the GNU Library General Public 16 16 License along with this program; if not, write to the Free Software 17 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 18 USA. */ 19 19 … … 48 48 struct loaded_l10nfile * 49 49 internal_function 50 _nl_find_domain (dirname, locale, domainname, domainbinding) 51 const char *dirname; 52 char *locale; 53 const char *domainname; 54 struct binding *domainbinding; 50 _nl_find_domain (const char *dirname, char *locale, 51 const char *domainname, struct binding *domainbinding) 55 52 { 56 53 struct loaded_l10nfile *retval; … … 179 176 180 177 #ifdef _LIBC 181 static void __attribute__ ((unused)) 182 free_mem (void) 178 libc_freeres_fn (free_mem) 183 179 { 184 180 struct loaded_l10nfile *runp = _nl_loaded_domains; … … 194 190 } 195 191 } 196 197 text_set_element (__libc_subfreeres, free_mem);198 192 #endif sweep/trunk/intl/gettext.c
r124 r183 1 1 /* Implementation of gettext(3) function. 2 Copyright (C) 1995, 1997, 2000 , 2001Free Software Foundation, Inc.2 Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify it … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 … … 43 43 #ifdef _LIBC 44 44 # define GETTEXT __gettext 45 # define DCGETTEXT __dcgettext45 # define DCGETTEXT INTUSE(__dcgettext) 46 46 #else 47 # define GETTEXT gettext__48 # define DCGETTEXT dcgettext__47 # define GETTEXT libintl_gettext 48 # define DCGETTEXT libintl_dcgettext 49 49 #endif 50 50 … … 53 53 text). */ 54 54 char * 55 GETTEXT (msgid) 56 const char *msgid; 55 GETTEXT (const char *msgid) 57 56 { 58 57 return DCGETTEXT (NULL, msgid, LC_MESSAGES); sweep/trunk/intl/gettextP.h
r124 r183 1 1 /* Header describing internals of libintl library. 2 Copyright (C) 1995-1999, 2000 , 2001Free Software Foundation, Inc.2 Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc. 3 3 Written by Ulrich Drepper <drepper@cygnus.com>, 1995. 4 4 … … 15 15 You should have received a copy of the GNU Library General Public 16 16 License along with this program; if not, write to the Free Software 17 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 18 USA. */ 19 19 … … 33 33 #include "loadinfo.h" 34 34 35 #include "g ettext.h" /* Get nls_uint32. */35 #include "gmo.h" /* Get nls_uint32. */ 36 36 37 37 /* @@ end of prolog @@ */ 38 39 #ifndef PARAMS40 # if __STDC__41 # define PARAMS(args) args42 # else43 # define PARAMS(args) ()44 # endif45 #endif46 38 47 39 #ifndef internal_function 48 40 # define internal_function 41 #endif 42 43 #ifndef attribute_hidden 44 # define attribute_hidden 49 45 #endif 50 46 … … 73 69 74 70 75 /* This is the representation of the expressions to determine the 76 plural form. */ 77 struct expression 78 { 79 int nargs; /* Number of arguments. */ 80 enum operator 81 { 82 /* Without arguments: */ 83 var, /* The variable "n". */ 84 num, /* Decimal number. */ 85 /* Unary operators: */ 86 lnot, /* Logical NOT. */ 87 /* Binary operators: */ 88 mult, /* Multiplication. */ 89 divide, /* Division. */ 90 module, /* Module operation. */ 91 plus, /* Addition. */ 92 minus, /* Subtraction. */ 93 less_than, /* Comparison. */ 94 greater_than, /* Comparison. */ 95 less_or_equal, /* Comparison. */ 96 greater_or_equal, /* Comparison. */ 97 equal, /* Comparision for equality. */ 98 not_equal, /* Comparision for inequality. */ 99 land, /* Logical AND. */ 100 lor, /* Logical OR. */ 101 /* Ternary operators: */ 102 qmop /* Question mark operator. */ 103 } operation; 104 union 105 { 106 unsigned long int num; /* Number value for `num'. */ 107 struct expression *args[3]; /* Up to three arguments. */ 108 } val; 71 /* In-memory representation of system dependent string. */ 72 struct sysdep_string_desc 73 { 74 /* Length of addressed string, including the trailing NUL. */ 75 size_t length; 76 /* Pointer to addressed string. */ 77 const char *pointer; 109 78 }; 110 111 /* This is the data structure to pass information to the parser and get112 the result in a thread-safe way. */113 struct parse_args114 {115 const char *cp;116 struct expression *res;117 };118 119 79 120 80 /* The representation of an opened message catalog. */ 121 81 struct loaded_domain 122 82 { 83 /* Pointer to memory containing the .mo file. */ 123 84 const char *data; 85 /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */ 124 86 int use_mmap; 87 /* Size of mmap()ed memory. */ 125 88 size_t mmap_size; 89 /* 1 if the .mo file uses a different endianness than this machine. */ 126 90 int must_swap; 91 /* Pointer to additional malloc()ed memory. */ 92 void *malloced; 93 94 /* Number of static strings pairs. */ 127 95 nls_uint32 nstrings; 128 struct string_desc *orig_tab; 129 struct string_desc *trans_tab; 96 /* Pointer to descriptors of original strings in the file. */ 97 const struct string_desc *orig_tab; 98 /* Pointer to descriptors of translated strings in the file. */ 99 const struct string_desc *trans_tab; 100 101 /* Number of system dependent strings pairs. */ 102 nls_uint32 n_sysdep_strings; 103 /* Pointer to descriptors of original sysdep strings. */ 104 const struct sysdep_string_desc *orig_sysdep_tab; 105 /* Pointer to descriptors of translated sysdep strings. */ 106 const struct sysdep_string_desc *trans_sysdep_tab; 107 108 /* Size of hash table. */ 130 109 nls_uint32 hash_size; 131 nls_uint32 *hash_tab; 110 /* Pointer to hash table. */ 111 const nls_uint32 *hash_tab; 112 /* 1 if the hash table uses a different endianness than this machine. */ 113 int must_swap_hash_tab; 114 132 115 int codeset_cntr; 133 116 #ifdef _LIBC … … 168 151 extern int _nl_msg_cat_cntr; 169 152 170 struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, 171 char *__locale, 172 const char *__domainname, 173 struct binding *__domainbinding)) 174 internal_function; 175 void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain, 176 struct binding *__domainbinding)) 177 internal_function; 178 void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) 179 internal_function; 180 const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file, 181 struct loaded_domain *__domain, 182 struct binding *__domainbinding)) 183 internal_function; 184 void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain)) 185 internal_function; 186 187 char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file, 188 struct binding *domainbinding, 189 const char *msgid, size_t *lengthp)) 190 internal_function; 191 192 #ifdef _LIBC 193 extern char *__gettext PARAMS ((const char *__msgid)); 194 extern char *__dgettext PARAMS ((const char *__domainname, 195 const char *__msgid)); 196 extern char *__dcgettext PARAMS ((const char *__domainname, 197 const char *__msgid, int __category)); 198 extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2, 199 unsigned long int __n)); 200 extern char *__dngettext PARAMS ((const char *__domainname, 201 const char *__msgid1, const char *__msgid2, 202 unsigned long int n)); 203 extern char *__dcngettext PARAMS ((const char *__domainname, 204 const char *__msgid1, const char *__msgid2, 205 unsigned long int __n, int __category)); 206 extern char *__dcigettext PARAMS ((const char *__domainname, 207 const char *__msgid1, const char *__msgid2, 208 int __plural, unsigned long int __n, 209 int __category)); 210 extern char *__textdomain PARAMS ((const char *__domainname)); 211 extern char *__bindtextdomain PARAMS ((const char *__domainname, 212 const char *__dirname)); 213 extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname, 214 const char *__codeset)); 215 #else 216 extern char *gettext__ PARAMS ((const char *__msgid)); 217 extern char *dgettext__ PARAMS ((const char *__domainname, 218 const char *__msgid)); 219 extern char *dcgettext__ PARAMS ((const char *__domainname, 220 const char *__msgid, int __category)); 221 extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2, 222 unsigned long int __n)); 223 extern char *dngettext__ PARAMS ((const char *__domainname, 224 const char *__msgid1, const char *__msgid2, 225 unsigned long int __n)); 226 extern char *dcngettext__ PARAMS ((const char *__domainname, 227 const char *__msgid1, const char *__msgid2, 228 unsigned long int __n, int __category)); 229 extern char *dcigettext__ PARAMS ((const char *__domainname, 230 const char *__msgid1, const char *__msgid2, 231 int __plural, unsigned long int __n, 232 int __category)); 233 extern char *textdomain__ PARAMS ((const char *__domainname)); 234 extern char *bindtextdomain__ PARAMS ((const char *__domainname, 235 const char *__dirname)); 236 extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname, 237 const char *__codeset)); 238 #endif 239 240 #ifdef _LIBC 241 extern void __gettext_free_exp PARAMS ((struct expression *exp)) 242 internal_function; 243 extern int __gettextparse PARAMS ((void *arg)); 244 #else 245 extern void gettext_free_exp__ PARAMS ((struct expression *exp)) 246 internal_function; 247 extern int gettextparse__ PARAMS ((void *arg)); 153 #ifndef _LIBC 154 const char *_nl_language_preferences_default (void); 155 const char *_nl_locale_name_posix (int category, const char *categoryname); 156 const char *_nl_locale_name_default (void); 157 const char *_nl_locale_name (int category, const char *categoryname); 158 #endif 159 160 struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale, 161 const char *__domainname, 162 struct binding *__domainbinding) 163 internal_function; 164 void _nl_load_domain (struct loaded_l10nfile *__domain, 165 struct binding *__domainbinding) 166 internal_function; 167 void _nl_unload_domain (struct loaded_domain *__domain) 168 internal_function; 169 const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file, 170 struct loaded_domain *__domain, 171 struct binding *__domainbinding) 172 internal_function; 173 void _nl_free_domain_conv (struct loaded_domain *__domain) 174 internal_function; 175 176 char *_nl_find_msg (struct loaded_l10nfile *domain_file, 177 struct binding *domainbinding, const char *msgid, 178 size_t *lengthp) 179 internal_function; 180 181 #ifdef _LIBC 182 extern char *__gettext (const char *__msgid); 183 extern char *__dgettext (const char *__domainname, const char *__msgid); 184 extern char *__dcgettext (const char *__domainname, const char *__msgid, 185 int __category); 186 extern char *__ngettext (const char *__msgid1, const char *__msgid2, 187 unsigned long int __n); 188 extern char *__dngettext (const char *__domainname, 189 const char *__msgid1, const char *__msgid2, 190 unsigned long int n); 191 extern char *__dcngettext (const char *__domainname, 192 const char *__msgid1, const char *__msgid2, 193 unsigned long int __n, int __category); 194 extern char *__dcigettext (const char *__domainname, 195 const char *__msgid1, const char *__msgid2, 196 int __plural, unsigned long int __n, 197 int __category); 198 extern char *__textdomain (const char *__domainname); 199 extern char *__bindtextdomain (const char *__domainname, 200 const char *__dirname); 201 extern char *__bind_textdomain_codeset (const char *__domainname, 202 const char *__codeset); 203 #else 204 /* Declare the exported libintl_* functions, in a way that allows us to 205 call them under their real name. */ 206 # undef _INTL_REDIRECT_INLINE 207 # undef _INTL_REDIRECT_MACROS 208 # define _INTL_REDIRECT_MACROS 209 # include "libgnuintl.h" 210 extern char *libintl_dcigettext (const char *__domainname, 211 const char *__msgid1, const char *__msgid2, 212 int __plural, unsigned long int __n, 213 int __category); 248 214 #endif 249 215 sweep/trunk/intl/hash-string.h
r124 r183 1 1 /* Description of GNU message catalog format: string hashing function. 2 Copyright (C) 1995, 1997 , 1998, 2000, 2001Free Software Foundation, Inc.2 Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify it … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 19 19 /* @@ end of prolog @@ */ 20 21 #ifndef PARAMS22 # if __STDC__23 # define PARAMS(Args) Args24 # else25 # define PARAMS(Args) ()26 # endif27 #endif28 20 29 21 /* We assume to have `unsigned long int' value with at least 32 bits. */ … … 34 26 [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 35 27 1986, 1987 Bell Telephone Laboratories, Inc.] */ 36 static unsigned long int hash_string PARAMS ((const char *__str_param));37 38 28 static inline unsigned long int 39 hash_string (str_param) 40 const char *str_param; 29 hash_string (const char *str_param) 41 30 { 42 31 unsigned long int hval, g; … … 48 37 { 49 38 hval <<= 4; 50 hval += (unsigned long int) *str++;39 hval += (unsigned char) *str++; 51 40 g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); 52 41 if (g != 0) sweep/trunk/intl/intl-compat.c
r124 r183 1 1 /* intl-compat.c - Stub functions to call gettext functions from GNU gettext 2 2 Library. 3 Copyright (C) 1995, 2000 , 2001Software Foundation, Inc.3 Copyright (C) 1995, 2000-2003 Software Foundation, Inc. 4 4 5 5 This program is free software; you can redistribute it and/or modify it … … 15 15 You should have received a copy of the GNU Library General Public 16 16 License along with this program; if not, write to the Free Software 17 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 18 USA. */ 19 19 … … 22 22 #endif 23 23 24 #include "libgnuintl.h"25 24 #include "gettextP.h" 26 25 27 26 /* @@ end of prolog @@ */ 28 27 29 /* This file redirects the gettext functions (without prefix or suffix) to 30 those defined in the included GNU gettext library (with "__" suffix). 31 It is compiled into libintl when the included GNU gettext library is 32 configured --with-included-gettext. 33 34 This redirection works also in the case that the system C library or 35 the system libintl library contain gettext/textdomain/... functions. 36 If it didn't, we would need to add preprocessor level redirections to 37 libgnuintl.h of the following form: 38 39 # define gettext gettext__ 40 # define dgettext dgettext__ 41 # define dcgettext dcgettext__ 42 # define ngettext ngettext__ 43 # define dngettext dngettext__ 44 # define dcngettext dcngettext__ 45 # define textdomain textdomain__ 46 # define bindtextdomain bindtextdomain__ 47 # define bind_textdomain_codeset bind_textdomain_codeset__ 48 49 How does this redirection work? There are two cases. 50 A. When libintl.a is linked into an executable, it works because 51 functions defined in the executable always override functions in 52 the shared libraries. 53 B. When libintl.so is used, it works because 54 1. those systems defining gettext/textdomain/... in the C library 55 (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are 56 ELF systems and define these symbols as weak, thus explicitly 57 letting other shared libraries override it. 58 2. those systems defining gettext/textdomain/... in a standalone 59 libintl.so library (namely, Solaris 2.3 and newer) have this 60 shared library in /usr/lib, and the linker will search /usr/lib 61 *after* the directory where the GNU gettext library is installed. 62 63 A third case, namely when libintl.a is linked into a shared library 64 whose name is not libintl.so, is not supported. In this case, on 65 Solaris, when -lintl precedes the linker option for the shared library 66 containing GNU gettext, the system's gettext would indeed override 67 the GNU gettext. Anyone doing this kind of stuff must be clever enough 68 to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker 69 command line. */ 28 /* This file redirects the gettext functions (without prefix) to those 29 defined in the included GNU libintl library (with "libintl_" prefix). 30 It is compiled into libintl in order to make the AM_GNU_GETTEXT test 31 of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which 32 has the redirections primarily in the <libintl.h> include file. 33 It is also compiled into libgnuintl so that libgnuintl.so can be used 34 as LD_PRELOADable library on glibc systems, to provide the extra 35 features that the functions in the libc don't have (namely, logging). */ 70 36 71 37 … … 81 47 82 48 49 /* When building a DLL, we must export some functions. Note that because 50 the functions are only defined for binary backward compatibility, we 51 don't need to use __declspec(dllimport) in any case. */ 52 #if defined _MSC_VER && BUILDING_DLL 53 # define DLL_EXPORTED __declspec(dllexport) 54 #else 55 # define DLL_EXPORTED 56 #endif 57 58 59 DLL_EXPORTED 83 60 char * 84 gettext (msgid) 85 const char *msgid; 61 gettext (const char *msgid) 86 62 { 87 return gettext__(msgid);63 return libintl_gettext (msgid); 88 64 } 89 65 90 66 67 DLL_EXPORTED 91 68 char * 92 dgettext (domainname, msgid) 93 const char *domainname; 94 const char *msgid; 69 dgettext (const char *domainname, const char *msgid) 95 70 { 96 return dgettext__(domainname, msgid);71 return libintl_dgettext (domainname, msgid); 97 72 } 98 73 99 74 75 DLL_EXPORTED 100 76 char * 101 dcgettext (domainname, msgid, category) 102 const char *domainname; 103 const char *msgid; 104 int category; 77 dcgettext (const char *domainname, const char *msgid, int category) 105 78 { 106 return dcgettext__(domainname, msgid, category);79 return libintl_dcgettext (domainname, msgid, category); 107 80 } 108 81 109 82 83 DLL_EXPORTED 110 84 char * 111 ngettext (msgid1, msgid2, n) 112 const char *msgid1; 113 const char *msgid2; 114 unsigned long int n; 85 ngettext (const char *msgid1, const char *msgid2, unsigned long int n) 115 86 { 116 return ngettext__(msgid1, msgid2, n);87 return libintl_ngettext (msgid1, msgid2, n); 117 88 } 118 89 119 90 91 DLL_EXPORTED 120 92 char * 121 dngettext (domainname, msgid1, msgid2, n) 122 const char *domainname; 123 const char *msgid1; 124 const char *msgid2; 125 unsigned long int n; 93 dngettext (const char *domainname, 94 const char *msgid1, const char *msgid2, unsigned long int n) 126 95 { 127 return dngettext__(domainname, msgid1, msgid2, n);96 return libintl_dngettext (domainname, msgid1, msgid2, n); 128 97 } 129 98 130 99 100 DLL_EXPORTED 131 101 char * 132 dcngettext (domainname, msgid1, msgid2, n, category) 133 const char *domainname; 134 const char *msgid1; 135 const char *msgid2; 136 unsigned long int n; 137 int category; 102 dcngettext (const char *domainname, 103 const char *msgid1, const char *msgid2, unsigned long int n, 104 int category) 138 105 { 139 return dcngettext__(domainname, msgid1, msgid2, n, category);106 return libintl_dcngettext (domainname, msgid1, msgid2, n, category); 140 107 } 141 108 142 109 110 DLL_EXPORTED 143 111 char * 144 textdomain (domainname) 145 const char *domainname; 112 textdomain (const char *domainname) 146 113 { 147 return textdomain__(domainname);114 return libintl_textdomain (domainname); 148 115 } 149 116 150 117 118 DLL_EXPORTED 151 119 char * 152 bindtextdomain (domainname, dirname) 153 const char *domainname; 154 const char *dirname; 120 bindtextdomain (const char *domainname, const char *dirname) 155 121 { 156 return bindtextdomain__(domainname, dirname);122 return libintl_bindtextdomain (domainname, dirname); 157 123 } 158 124 159 125 126 DLL_EXPORTED 160 127 char * 161 bind_textdomain_codeset (domainname, codeset) 162 const char *domainname; 163 const char *codeset; 128 bind_textdomain_codeset (const char *domainname, const char *codeset) 164 129 { 165 return bind_textdomain_codeset__(domainname, codeset);130 return libintl_bind_textdomain_codeset (domainname, codeset); 166 131 } sweep/trunk/intl/l10nflist.c
r124 r183 1 /* Copyright (C) 1995-1999, 2000 , 2001Free Software Foundation, Inc.1 /* Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. 2 2 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. 3 3 … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 … … 29 29 30 30 #include <string.h> 31 #if !HAVE_STRCHR && !defined _LIBC32 # ifndef strchr33 # define strchr index34 # endif35 #endif36 31 37 32 #if defined _LIBC || defined HAVE_ARGZ_H … … 64 59 #else 65 60 # ifndef HAVE_STPCPY 66 static char *stpcpy PARAMS ((char *dest, const char *src));61 static char *stpcpy (char *dest, const char *src); 67 62 # endif 63 #endif 64 65 /* Pathname support. 66 ISSLASH(C) tests whether C is a directory separator character. 67 IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, 68 it may be concatenated to a directory pathname. 69 */ 70 #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ 71 /* Win32, Cygwin, OS/2, DOS */ 72 # define ISSLASH(C) ((C) == '/' || (C) == '\\') 73 # define HAS_DEVICE(P) \ 74 ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ 75 && (P)[1] == ':') 76 # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) 77 #else 78 /* Unix */ 79 # define ISSLASH(C) ((C) == '/') 80 # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) 68 81 #endif 69 82 … … 72 85 #if !defined _LIBC && !defined HAVE___ARGZ_COUNT 73 86 /* Returns the number of strings in ARGZ. */ 74 static size_t argz_count__ PARAMS ((const char *argz, size_t len));75 76 87 static size_t 77 argz_count__ (argz, len) 78 const char *argz; 79 size_t len; 88 argz_count__ (const char *argz, size_t len) 80 89 { 81 90 size_t count = 0; … … 91 100 # undef __argz_count 92 101 # define __argz_count(argz, len) argz_count__ (argz, len) 102 #else 103 # ifdef _LIBC 104 # define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) 105 # endif 93 106 #endif /* !_LIBC && !HAVE___ARGZ_COUNT */ 94 107 … … 96 109 /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's 97 110 except the last into the character SEP. */ 98 static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));99 100 111 static void 101 argz_stringify__ (argz, len, sep) 102 char *argz; 103 size_t len; 104 int sep; 112 argz_stringify__ (char *argz, size_t len, int sep) 105 113 { 106 114 while (len > 0) … … 115 123 # undef __argz_stringify 116 124 # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) 125 #else 126 # ifdef _LIBC 127 # define __argz_stringify(argz, len, sep) \ 128 INTUSE(__argz_stringify) (argz, len, sep) 129 # endif 117 130 #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ 118 131 119 132 #if !defined _LIBC && !defined HAVE___ARGZ_NEXT 120 static char *argz_next__ PARAMS ((char *argz, size_t argz_len,121 const char *entry));122 123 133 static char * 124 argz_next__ (argz, argz_len, entry) 125 char *argz; 126 size_t argz_len; 127 const char *entry; 134 argz_next__ (char *argz, size_t argz_len, const char *entry) 128 135 { 129 136 if (entry) … … 146 153 147 154 /* Return number of bits set in X. */ 148 static int pop PARAMS ((int x));149 150 155 static inline int 151 pop (x) 152 int x; 156 pop (int x) 153 157 { 154 158 /* We assume that no more than 16 bits are used. */ … … 163 167 164 168 struct loaded_l10nfile * 165 _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, 166 territory, codeset, normalized_codeset, modifier, special, 167 sponsor, revision, filename, do_allocate) 168 struct loaded_l10nfile **l10nfile_list; 169 const char *dirlist; 170 size_t dirlist_len; 171 int mask; 172 const char *language; 173 const char *territory; 174 const char *codeset; 175 const char *normalized_codeset; 176 const char *modifier; 177 const char *special; 178 const char *sponsor; 179 const char *revision; 180 const char *filename; 181 int do_allocate; 169 _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, 170 const char *dirlist, size_t dirlist_len, 171 int mask, const char *language, const char *territory, 172 const char *codeset, const char *normalized_codeset, 173 const char *modifier, const char *special, 174 const char *sponsor, const char *revision, 175 const char *filename, int do_allocate) 182 176 { 183 177 char *abs_filename; 184 struct loaded_l10nfile * last = NULL;178 struct loaded_l10nfile **lastp; 185 179 struct loaded_l10nfile *retval; 186 180 char *cp; 181 size_t dirlist_count; 187 182 size_t entries; 188 183 int cnt; 184 185 /* If LANGUAGE contains an absolute directory specification, we ignore 186 DIRLIST. */ 187 if (IS_ABSOLUTE_PATH (language)) 188 dirlist_len = 0; 189 189 190 190 /* Allocate room for the full file name. */ … … 205 205 || (mask & CEN_REVISION) != 0) 206 206 ? (1 + ((mask & CEN_SPONSOR) != 0 207 ? strlen (sponsor) + 1: 0)207 ? strlen (sponsor) : 0) 208 208 + ((mask & CEN_REVISION) != 0 209 209 ? strlen (revision) + 1 : 0)) : 0) … … 213 213 return NULL; 214 214 215 retval = NULL;216 last = NULL;217 218 215 /* Construct file name. */ 219 memcpy (abs_filename, dirlist, dirlist_len); 220 __argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR); 221 cp = abs_filename + (dirlist_len - 1); 222 *cp++ = '/'; 216 cp = abs_filename; 217 if (dirlist_len > 0) 218 { 219 memcpy (cp, dirlist, dirlist_len); 220 __argz_stringify (cp, dirlist_len, PATH_SEPARATOR); 221 cp += dirlist_len; 222 cp[-1] = '/'; 223 } 224 223 225 cp = stpcpy (cp, language); 224 226 … … 267 269 /* Look in list of already loaded domains whether it is already 268 270 available. */ 269 last = NULL;271 lastp = l10nfile_list; 270 272 for (retval = *l10nfile_list; retval != NULL; retval = retval->next) 271 273 if (retval->filename != NULL) … … 282 284 } 283 285 284 last = retval;286 lastp = &retval->next; 285 287 } 286 288 … … 291 293 } 292 294 293 retval = (struct loaded_l10nfile *) 294 malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) 295 * (1 << pop (mask)) 296 * sizeof (struct loaded_l10nfile *))); 295 dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1); 296 297 /* Allocate a new loaded_l10nfile. */ 298 retval = 299 (struct loaded_l10nfile *) 300 malloc (sizeof (*retval) 301 + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0)) 302 * sizeof (struct loaded_l10nfile *))); 297 303 if (retval == NULL) 298 304 return NULL; 299 305 300 306 retval->filename = abs_filename; 301 retval->decided = (__argz_count (dirlist, dirlist_len) != 1 307 308 /* We set retval->data to NULL here; it is filled in later. 309 Setting retval->decided to 1 here means that retval does not 310 correspond to a real file (dirlist_count > 1) or is not worth 311 looking up (if an unnormalized codeset was specified). */ 312 retval->decided = (dirlist_count > 1 302 313 || ((mask & XPG_CODESET) != 0 303 314 && (mask & XPG_NORM_CODESET) != 0)); 304 315 retval->data = NULL; 305 316 306 if (last == NULL) 307 { 308 retval->next = *l10nfile_list; 309 *l10nfile_list = retval; 310 } 311 else 312 { 313 retval->next = last->next; 314 last->next = retval; 315 } 317 retval->next = *lastp; 318 *lastp = retval; 316 319 317 320 entries = 0; 318 /* If the DIRLIST is a real list the RETVAL entry corresponds not to 319 a real file. So we have to use the DIRLIST separation mechanism 320 of the inner loop. */ 321 cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; 322 for (; cnt >= 0; --cnt) 321 /* Recurse to fill the inheritance list of RETVAL. 322 If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL 323 entry does not correspond to a real file; retval->filename contains 324 colons. In this case we loop across all elements of DIRLIST and 325 across all bit patterns dominated by MASK. 326 If the DIRLIST is a single directory or entirely redundant (i.e. 327 DIRLIST_COUNT == 1), we loop across all bit patterns dominated by 328 MASK, excluding MASK itself. 329 In either case, we loop down from MASK to 0. This has the effect 330 that the extra bits in the locale name are dropped in this order: 331 first the modifier, then the territory, then the codeset, then the 332 normalized_codeset. */ 333 for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt) 323 334 if ((cnt & ~mask) == 0 324 335 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) 325 336 && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) 326 337 { 327 /* Iterate over all elements of the DIRLIST. */ 328 char *dir = NULL; 329 330 while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) 331 != NULL) 338 if (dirlist_count > 1) 339 { 340 /* Iterate over all elements of the DIRLIST. */ 341 char *dir = NULL; 342 343 while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) 344 != NULL) 345 retval->successor[entries++] 346 = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, 347 cnt, language, territory, codeset, 348 normalized_codeset, modifier, special, 349 sponsor, revision, filename, 1); 350 } 351 else 332 352 retval->successor[entries++] 333 = _nl_make_l10nflist (l10nfile_list, dir , strlen (dir) + 1, cnt,334 language, territory, codeset,353 = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, 354 cnt, language, territory, codeset, 335 355 normalized_codeset, modifier, special, 336 356 sponsor, revision, filename, 1); … … 346 366 freed by the caller. */ 347 367 const char * 348 _nl_normalize_codeset (codeset, name_len) 349 const char *codeset; 350 size_t name_len; 368 _nl_normalize_codeset (const char *codeset, size_t name_len) 351 369 { 352 370 int len = 0; … … 357 375 358 376 for (cnt = 0; cnt < name_len; ++cnt) 359 if (isalnum ( codeset[cnt]))377 if (isalnum ((unsigned char) codeset[cnt])) 360 378 { 361 379 ++len; 362 380 363 if (isalpha ( codeset[cnt]))381 if (isalpha ((unsigned char) codeset[cnt])) 364 382 only_digit = 0; 365 383 } … … 375 393 376 394 for (cnt = 0; cnt < name_len; ++cnt) 377 if (isalpha ( codeset[cnt]))378 *wp++ = tolower ( codeset[cnt]);379 else if (isdigit ( codeset[cnt]))395 if (isalpha ((unsigned char) codeset[cnt])) 396 *wp++ = tolower ((unsigned char) codeset[cnt]); 397 else if (isdigit ((unsigned char) codeset[cnt])) 380 398 *wp++ = codeset[cnt]; 381 399 … … 395 413 #if !_LIBC && !HAVE_STPCPY 396 414 static char * 397 stpcpy (dest, src) 398 char *dest; 399 const char *src; 415 stpcpy (char *dest, const char *src) 400 416 { 401 417 while ((*dest++ = *src++) != '\0') sweep/trunk/intl/loadinfo.h
r124 r183 1 /* Copyright (C) 1996-1999, 2000 , 2001Free Software Foundation, Inc.1 /* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc. 2 2 This file is part of the GNU C Library. 3 3 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. … … 15 15 You should have received a copy of the GNU Library General Public 16 16 License along with this program; if not, write to the Free Software 17 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 18 USA. */ 19 19 … … 21 21 #define _LOADINFO_H 1 22 22 23 #ifndef PARAMS 24 # if __STDC__ 25 # define PARAMS(args) args 26 # else 27 # define PARAMS(args) () 28 # endif 29 #endif 23 /* Declarations of locale dependent catalog lookup functions. 24 Implemented in 25 26 localealias.c Possibly replace a locale name by another. 27 explodename.c Split a locale name into its various fields. 28 l10nflist.c Generate a list of filenames of possible message catalogs. 29 finddomain.c Find and open the relevant message catalogs. 30 31 The main function _nl_find_domain() in finddomain.c is declared 32 in gettextP.h. 33 */ 30 34 31 35 #ifndef internal_function … … 78 82 names. The return value is dynamically allocated and has to be 79 83 freed by the caller. */ 80 extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,81 size_t name_len));84 extern const char *_nl_normalize_codeset (const char *codeset, 85 size_t name_len); 82 86 87 /* Lookup a locale dependent file. 88 *L10NFILE_LIST denotes a pool of lookup results of locale dependent 89 files of the same kind, sorted in decreasing order of ->filename. 90 DIRLIST and DIRLIST_LEN are an argz list of directories in which to 91 look, containing at least one directory (i.e. DIRLIST_LEN > 0). 92 MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER, 93 SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as 94 produced by _nl_explode_name(). FILENAME is the filename suffix. 95 The return value is the lookup result, either found in *L10NFILE_LIST, 96 or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL. 97 If the return value is non-NULL, it is added to *L10NFILE_LIST, and 98 its ->next field denotes the chaining inside *L10NFILE_LIST, and 99 furthermore its ->successor[] field contains a list of other lookup 100 results from which this lookup result inherits. */ 83 101 extern struct loaded_l10nfile * 84 _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, 85 const char *dirlist, size_t dirlist_len, int mask, 86 const char *language, const char *territory, 87 const char *codeset, 88 const char *normalized_codeset, 89 const char *modifier, const char *special, 90 const char *sponsor, const char *revision, 91 const char *filename, int do_allocate)); 102 _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, 103 const char *dirlist, size_t dirlist_len, int mask, 104 const char *language, const char *territory, 105 const char *codeset, const char *normalized_codeset, 106 const char *modifier, const char *special, 107 const char *sponsor, const char *revision, 108 const char *filename, int do_allocate); 92 109 110 /* Lookup the real locale name for a locale alias NAME, or NULL if 111 NAME is not a locale alias (but possibly a real locale name). 112 The return value is statically allocated and must not be freed. */ 113 extern const char *_nl_expand_alias (const char *name); 93 114 94 extern const char *_nl_expand_alias PARAMS ((const char *name)); 115 /* Split a locale name NAME into its pieces: language, modifier, 116 territory, codeset, special, sponsor, revision. 117 NAME gets destructively modified: NUL bytes are inserted here and 118 there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY, 119 *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a 120 pointer into the old NAME string, or NULL. *NORMALIZED_CODESET 121 gets assigned the expanded *CODESET, if it is different from *CODESET; 122 this one is dynamically allocated and has to be freed by the caller. 123 The return value is a bitmask, where each bit corresponds to one 124 filled-in value: 125 XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER, 126 TERRITORY for *TERRITORY, 127 XPG_CODESET for *CODESET, 128 XPG_NORM_CODESET for *NORMALIZED_CODESET, 129 CEN_SPECIAL for *SPECIAL, 130 CEN_SPONSOR for *SPONSOR, 131 CEN_REVISION for *REVISION. 132 */ 133 extern int _nl_explode_name (char *name, const char **language, 134 const char **modifier, const char **territory, 135 const char **codeset, 136 const char **normalized_codeset, 137 const char **special, const char **sponsor, 138 const char **revision); 95 139 96 /* normalized_codeset is dynamically allocated and has to be freed by 97 the caller. */ 98 extern int _nl_explode_name PARAMS ((char *name, const char **language, 99 const char **modifier, 100 const char **territory, 101 const char **codeset, 102 const char **normalized_codeset, 103 const char **special, 104 const char **sponsor, 105 const char **revision)); 106 107 extern char *_nl_find_language PARAMS ((const char *name)); 140 /* Split a locale name NAME into a leading language part and all the 141 rest. Return a pointer to the first character after the language, 142 i.e. to the first byte of the rest. */ 143 extern char *_nl_find_language (const char *name); 108 144 109 145 #endif /* loadinfo.h */ sweep/trunk/intl/loadmsgcat.c
r124 r183 1 1 /* Load needed message catalogs. 2 Copyright (C) 1995-1999, 2000 , 2001Free Software Foundation, Inc.2 Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify it … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 … … 35 35 36 36 #ifdef __GNUC__ 37 # undef alloca 37 38 # define alloca __builtin_alloca 38 39 # define HAVE_ALLOCA 1 39 40 #else 40 # if defined HAVE_ALLOCA_H || defined _LIBC 41 # include <alloca.h> 41 # ifdef _MSC_VER 42 # include <malloc.h> 43 # define alloca _alloca 42 44 # else 43 # ifdef _AIX 45 # if defined HAVE_ALLOCA_H || defined _LIBC 46 # include <alloca.h> 47 # else 48 # ifdef _AIX 44 49 #pragma alloca 45 # else46 # ifndef alloca50 # else 51 # ifndef alloca 47 52 char *alloca (); 53 # endif 48 54 # endif 49 55 # endif … … 72 78 #endif 73 79 74 #include "gettext.h" 80 #if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC 81 # include <stdint.h> 82 #endif 83 #if defined HAVE_INTTYPES_H || defined _LIBC 84 # include <inttypes.h> 85 #endif 86 87 #include "gmo.h" 75 88 #include "gettextP.h" 89 #include "hash-string.h" 90 #include "plural-exp.h" 76 91 77 92 #ifdef _LIBC 78 93 # include "../locale/localeinfo.h" 94 #endif 95 96 /* Provide fallback values for macros that ought to be defined in <inttypes.h>. 97 Note that our fallback values need not be literal strings, because we don't 98 use them with preprocessor string concatenation. */ 99 #if !defined PRId8 || PRI_MACROS_BROKEN 100 # undef PRId8 101 # define PRId8 "d" 102 #endif 103 #if !defined PRIi8 || PRI_MACROS_BROKEN 104 # undef PRIi8 105 # define PRIi8 "i" 106 #endif 107 #if !defined PRIo8 || PRI_MACROS_BROKEN 108 # undef PRIo8 109 # define PRIo8 "o" 110 #endif 111 #if !defined PRIu8 || PRI_MACROS_BROKEN 112 # undef PRIu8 113 # define PRIu8 "u" 114 #endif 115 #if !defined PRIx8 || PRI_MACROS_BROKEN 116 # undef PRIx8 117 # define PRIx8 "x" 118 #endif 119 #if !defined PRIX8 || PRI_MACROS_BROKEN 120 # undef PRIX8 121 # define PRIX8 "X" 122 #endif 123 #if !defined PRId16 || PRI_MACROS_BROKEN 124 # undef PRId16 125 # define PRId16 "d" 126 #endif 127 #if !defined PRIi16 || PRI_MACROS_BROKEN 128 # undef PRIi16 129 # define PRIi16 "i" 130 #endif 131 #if !defined PRIo16 || PRI_MACROS_BROKEN 132 # undef PRIo16 133 # define PRIo16 "o" 134 #endif 135 #if !defined PRIu16 || PRI_MACROS_BROKEN 136 # undef PRIu16 137 # define PRIu16 "u" 138 #endif 139 #if !defined PRIx16 || PRI_MACROS_BROKEN 140 # undef PRIx16 141 # define PRIx16 "x" 142 #endif 143 #if !defined PRIX16 || PRI_MACROS_BROKEN 144 # undef PRIX16 145 # define PRIX16 "X" 146 #endif 147 #if !defined PRId32 || PRI_MACROS_BROKEN 148 # undef PRId32 149 # define PRId32 "d" 150 #endif 151 #if !defined PRIi32 || PRI_MACROS_BROKEN 152 # undef PRIi32 153 # define PRIi32 "i" 154 #endif 155 #if !defined PRIo32 || PRI_MACROS_BROKEN 156 # undef PRIo32 157 # define PRIo32 "o" 158 #endif 159 #if !defined PRIu32 || PRI_MACROS_BROKEN 160 # undef PRIu32 161 # define PRIu32 "u" 162 #endif 163 #if !defined PRIx32 || PRI_MACROS_BROKEN 164 # undef PRIx32 165 # define PRIx32 "x" 166 #endif 167 #if !defined PRIX32 || PRI_MACROS_BROKEN 168 # undef PRIX32 169 # define PRIX32 "X" 170 #endif 171 #if !defined PRId64 || PRI_MACROS_BROKEN 172 # undef PRId64 173 # define PRId64 (sizeof (long) == 8 ? "ld" : "lld") 174 #endif 175 #if !defined PRIi64 || PRI_MACROS_BROKEN 176 # undef PRIi64 177 # define PRIi64 (sizeof (long) == 8 ? "li" : "lli") 178 #endif 179 #if !defined PRIo64 || PRI_MACROS_BROKEN 180 # undef PRIo64 181 # define PRIo64 (sizeof (long) == 8 ? "lo" : "llo") 182 #endif 183 #if !defined PRIu64 || PRI_MACROS_BROKEN 184 # undef PRIu64 185 # define PRIu64 (sizeof (long) == 8 ? "lu" : "llu") 186 #endif 187 #if !defined PRIx64 || PRI_MACROS_BROKEN 188 # undef PRIx64 189 # define PRIx64 (sizeof (long) == 8 ? "lx" : "llx") 190 #endif 191 #if !defined PRIX64 || PRI_MACROS_BROKEN 192 # undef PRIX64 193 # define PRIX64 (sizeof (long) == 8 ? "lX" : "llX") 194 #endif 195 #if !defined PRIdLEAST8 || PRI_MACROS_BROKEN 196 # undef PRIdLEAST8 197 # define PRIdLEAST8 "d" 198 #endif 199 #if !defined PRIiLEAST8 || PRI_MACROS_BROKEN 200 # undef PRIiLEAST8 201 # define PRIiLEAST8 "i" 202 #endif 203 #if !defined PRIoLEAST8 || PRI_MACROS_BROKEN 204 # undef PRIoLEAST8 205 # define PRIoLEAST8 "o" 206 #endif 207 #if !defined PRIuLEAST8 || PRI_MACROS_BROKEN 208 # undef PRIuLEAST8 209 # define PRIuLEAST8 "u" 210 #endif 211 #if !defined PRIxLEAST8 || PRI_MACROS_BROKEN 212 # undef PRIxLEAST8 213 # define PRIxLEAST8 "x" 214 #endif 215 #if !defined PRIXLEAST8 || PRI_MACROS_BROKEN 216 # undef PRIXLEAST8 217 # define PRIXLEAST8 "X" 218 #endif 219 #if !defined PRIdLEAST16 || PRI_MACROS_BROKEN 220 # undef PRIdLEAST16 221 # define PRIdLEAST16 "d" 222 #endif 223 #if !defined PRIiLEAST16 || PRI_MACROS_BROKEN 224 # undef PRIiLEAST16 225 # define PRIiLEAST16 "i" 226 #endif 227 #if !defined PRIoLEAST16 || PRI_MACROS_BROKEN 228 # undef PRIoLEAST16 229 # define PRIoLEAST16 "o" 230 #endif 231 #if !defined PRIuLEAST16 || PRI_MACROS_BROKEN 232 # undef PRIuLEAST16 233 # define PRIuLEAST16 "u" 234 #endif 235 #if !defined PRIxLEAST16 || PRI_MACROS_BROKEN 236 # undef PRIxLEAST16 237 # define PRIxLEAST16 "x" 238 #endif 239 #if !defined PRIXLEAST16 || PRI_MACROS_BROKEN 240 # undef PRIXLEAST16 241 # define PRIXLEAST16 "X" 242 #endif 243 #if !defined PRIdLEAST32 || PRI_MACROS_BROKEN 244 # undef PRIdLEAST32 245 # define PRIdLEAST32 "d" 246 #endif 247 #if !defined PRIiLEAST32 || PRI_MACROS_BROKEN 248 # undef PRIiLEAST32 249 # define PRIiLEAST32 "i" 250 #endif 251 #if !defined PRIoLEAST32 || PRI_MACROS_BROKEN 252 # undef PRIoLEAST32 253 # define PRIoLEAST32 "o" 254 #endif 255 #if !defined PRIuLEAST32 || PRI_MACROS_BROKEN 256 # undef PRIuLEAST32 257 # define PRIuLEAST32 "u" 258 #endif 259 #if !defined PRIxLEAST32 || PRI_MACROS_BROKEN 260 # undef PRIxLEAST32 261 # define PRIxLEAST32 "x" 262 #endif 263 #if !defined PRIXLEAST32 || PRI_MACROS_BROKEN 264 # undef PRIXLEAST32 265 # define PRIXLEAST32 "X" 266 #endif 267 #if !defined PRIdLEAST64 || PRI_MACROS_BROKEN 268 # undef PRIdLEAST64 269 # define PRIdLEAST64 PRId64 270 #endif 271 #if !defined PRIiLEAST64 || PRI_MACROS_BROKEN 272 # undef PRIiLEAST64 273 # define PRIiLEAST64 PRIi64 274 #endif 275 #if !defined PRIoLEAST64 || PRI_MACROS_BROKEN 276 # undef PRIoLEAST64 277 # define PRIoLEAST64 PRIo64 278 #endif 279 #if !defined PRIuLEAST64 || PRI_MACROS_BROKEN 280 # undef PRIuLEAST64 281 # define PRIuLEAST64 PRIu64 282 #endif 283 #if !defined PRIxLEAST64 || PRI_MACROS_BROKEN 284 # undef PRIxLEAST64 285 # define PRIxLEAST64 PRIx64 286 #endif 287 #if !defined PRIXLEAST64 || PRI_MACROS_BROKEN 288 # undef PRIXLEAST64 289 # define PRIXLEAST64 PRIX64 290 #endif 291 #if !defined PRIdFAST8 || PRI_MACROS_BROKEN 292 # undef PRIdFAST8 293 # define PRIdFAST8 "d" 294 #endif 295 #if !defined PRIiFAST8 || PRI_MACROS_BROKEN 296 # undef PRIiFAST8 297 # define PRIiFAST8 "i" 298 #endif 299 #if !defined PRIoFAST8 || PRI_MACROS_BROKEN 300 # undef PRIoFAST8 301 # define PRIoFAST8 "o" 302 #endif 303 #if !defined PRIuFAST8 || PRI_MACROS_BROKEN 304 # undef PRIuFAST8 305 # define PRIuFAST8 "u" 306 #endif 307 #if !defined PRIxFAST8 || PRI_MACROS_BROKEN 308 # undef PRIxFAST8 309 # define PRIxFAST8 "x" 310 #endif 311 #if !defined PRIXFAST8 || PRI_MACROS_BROKEN 312 # undef PRIXFAST8 313 # define PRIXFAST8 "X" 314 #endif 315 #if !defined PRIdFAST16 || PRI_MACROS_BROKEN 316 # undef PRIdFAST16 317 # define PRIdFAST16 "d" 318 #endif 319 #if !defined PRIiFAST16 || PRI_MACROS_BROKEN 320 # undef PRIiFAST16 321 # define PRIiFAST16 "i" 322 #endif 323 #if !defined PRIoFAST16 || PRI_MACROS_BROKEN 324 # undef PRIoFAST16 325 # define PRIoFAST16 "o" 326 #endif 327 #if !defined PRIuFAST16 || PRI_MACROS_BROKEN 328 # undef PRIuFAST16 329 # define PRIuFAST16 "u" 330 #endif 331 #if !defined PRIxFAST16 || PRI_MACROS_BROKEN 332 # undef PRIxFAST16 333 # define PRIxFAST16 "x" 334 #endif 335 #if !defined PRIXFAST16 || PRI_MACROS_BROKEN 336 # undef PRIXFAST16 337 # define PRIXFAST16 "X" 338 #endif 339 #if !defined PRIdFAST32 || PRI_MACROS_BROKEN 340 # undef PRIdFAST32 341 # define PRIdFAST32 "d" 342 #endif 343 #if !defined PRIiFAST32 || PRI_MACROS_BROKEN 344 # undef PRIiFAST32 345 # define PRIiFAST32 "i" 346 #endif 347 #if !defined PRIoFAST32 || PRI_MACROS_BROKEN 348 # undef PRIoFAST32 349 # define PRIoFAST32 "o" 350 #endif 351 #if !defined PRIuFAST32 || PRI_MACROS_BROKEN 352 # undef PRIuFAST32 353 # define PRIuFAST32 "u" 354 #endif 355 #if !defined PRIxFAST32 || PRI_MACROS_BROKEN 356 # undef PRIxFAST32 357 # define PRIxFAST32 "x" 358 #endif 359 #if !defined PRIXFAST32 || PRI_MACROS_BROKEN 360 # undef PRIXFAST32 361 # define PRIXFAST32 "X" 362 #endif 363 #if !defined PRIdFAST64 || PRI_MACROS_BROKEN 364 # undef PRIdFAST64 365 # define PRIdFAST64 PRId64 366 #endif 367 #if !defined PRIiFAST64 || PRI_MACROS_BROKEN 368 # undef PRIiFAST64 369 # define PRIiFAST64 PRIi64 370 #endif 371 #if !defined PRIoFAST64 || PRI_MACROS_BROKEN 372 # undef PRIoFAST64 373 # define PRIoFAST64 PRIo64 374 #endif 375 #if !defined PRIuFAST64 || PRI_MACROS_BROKEN 376 # undef PRIuFAST64 377 # define PRIuFAST64 PRIu64 378 #endif 379 #if !defined PRIxFAST64 || PRI_MACROS_BROKEN 380 # undef PRIxFAST64 381 # define PRIxFAST64 PRIx64 382 #endif 383 #if !defined PRIXFAST64 || PRI_MACROS_BROKEN 384 # undef PRIXFAST64 385 # define PRIXFAST64 PRIX64 386 #endif 387 #if !defined PRIdMAX || PRI_MACROS_BROKEN 388 # undef PRIdMAX 389 # define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld") 390 #endif 391 #if !defined PRIiMAX || PRI_MACROS_BROKEN 392 # undef PRIiMAX 393 # define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli") 394 #endif 395 #if !defined PRIoMAX || PRI_MACROS_BROKEN 396 # undef PRIoMAX 397 # define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo") 398 #endif 399 #if !defined PRIuMAX || PRI_MACROS_BROKEN 400 # undef PRIuMAX 401 # define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu") 402 #endif 403 #if !defined PRIxMAX || PRI_MACROS_BROKEN 404 # undef PRIxMAX 405 # define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx") 406 #endif 407 #if !defined PRIXMAX || PRI_MACROS_BROKEN 408 # undef PRIXMAX 409 # define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX") 410 #endif 411 #if !defined PRIdPTR || PRI_MACROS_BROKEN 412 # undef PRIdPTR 413 # define PRIdPTR \ 414 (sizeof (void *) == sizeof (long) ? "ld" : \ 415 sizeof (void *) == sizeof (int) ? "d" : \ 416 "lld") 417 #endif 418 #if !defined PRIiPTR || PRI_MACROS_BROKEN 419 # undef PRIiPTR 420 # define PRIiPTR \ 421 (sizeof (void *) == sizeof (long) ? "li" : \ 422 sizeof (void *) == sizeof (int) ? "i" : \ 423 "lli") 424 #endif 425 #if !defined PRIoPTR || PRI_MACROS_BROKEN 426 # undef PRIoPTR 427 # define PRIoPTR \ 428 (sizeof (void *) == sizeof (long) ? "lo" : \ 429 sizeof (void *) == sizeof (int) ? "o" : \ 430 "llo") 431 #endif 432 #if !defined PRIuPTR || PRI_MACROS_BROKEN 433 # undef PRIuPTR 434 # define PRIuPTR \ 435 (sizeof (void *) == sizeof (long) ? "lu" : \ 436 sizeof (void *) == sizeof (int) ? "u" : \ 437 "llu") 438 #endif 439 #if !defined PRIxPTR || PRI_MACROS_BROKEN 440 # undef PRIxPTR 441 # define PRIxPTR \ 442 (sizeof (void *) == sizeof (long) ? "lx" : \ 443 sizeof (void *) == sizeof (int) ? "x" : \ 444 "llx") 445 #endif 446 #if !defined PRIXPTR || PRI_MACROS_BROKEN 447 # undef PRIXPTR 448 # define PRIXPTR \ 449 (sizeof (void *) == sizeof (long) ? "lX" : \ 450 sizeof (void *) == sizeof (int) ? "X" : \ 451 "llX") 79 452 #endif 80 453 … … 92 465 #endif 93 466 94 /* Names for the libintl functions are a problem. They must not clash95 with existing names and they should follow ANSI C. But this source96 code is also used in GNU C Library where the names have a __97 prefix. So we have to make a difference here. */98 #ifdef _LIBC99 # define PLURAL_PARSE __gettextparse100 #else101 # define PLURAL_PARSE gettextparse__102 #endif103 104 467 /* For those losing systems which don't have `alloca' we have to add 105 468 some additional code emulating it. */ … … 128 491 #endif 129 492 493 130 494 /* We need a sign, whether a new catalog was loaded, which can be associated 131 495 with all translations. This is important if the translations are … … 133 497 int _nl_msg_cat_cntr; 134 498 135 #if (defined __GNUC__ && !defined __APPLE_CC__) \ 136 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) 137 138 /* These structs are the constant expression for the germanic plural 139 form determination. It represents the expression "n != 1". */ 140 static const struct expression plvar = 499 500 /* Expand a system dependent string segment. Return NULL if unsupported. */ 501 static const char * 502 get_sysdep_segment_value (const char *name) 141 503 { 142 .nargs = 0, 143 .operation = var, 144 }; 145 static const struct expression plone = 146 { 147 .nargs = 0, 148 .operation = num, 149 .val = 150 { 151 .num = 1 152 } 153 }; 154 static struct expression germanic_plural = 155 { 156 .nargs = 2, 157 .operation = not_equal, 158 .val = 159 { 160 .args = 504 /* Test for an ISO C 99 section 7.8.1 format string directive. 505 Syntax: 506 P R I { d | i | o | u | x | X } 507 { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */ 508 /* We don't use a table of 14 times 6 'const char *' strings here, because 509 data relocations cost startup time. */ 510 if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I') 161 511 { 162 [0] = (struct expression *) &plvar, 163 [1] = (struct expression *) &plone 512 if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u' 513 || name[3] == 'x' || name[3] == 'X') 514 { 515 if (name[4] == '8' && name[5] == '\0') 516 { 517 if (name[3] == 'd') 518 return PRId8; 519 if (name[3] == 'i') 520 return PRIi8; 521 if (name[3] == 'o') 522 return PRIo8; 523 if (name[3] == 'u') 524 return PRIu8; 525 if (name[3] == 'x') 526 return PRIx8; 527 if (name[3] == 'X') 528 return PRIX8; 529 abort (); 530 } 531 if (name[4] == '1' && name[5] == '6' && name[6] == '\0') 532 { 533 if (name[3] == 'd') 534 return PRId16; 535 if (name[3] == 'i') 536 return PRIi16; 537 if (name[3] == 'o') 538 return PRIo16; 539 if (name[3] == 'u') 540 return PRIu16; 541 if (name[3] == 'x') 542 return PRIx16; 543 if (name[3] == 'X') 544 return PRIX16; 545 abort (); 546 } 547 if (name[4] == '3' && name[5] == '2' && name[6] == '\0') 548 { 549 if (name[3] == 'd') 550 return PRId32; 551 if (name[3] == 'i') 552 return PRIi32; 553 if (name[3] == 'o') 554 return PRIo32; 555 if (name[3] == 'u') 556 return PRIu32; 557 if (name[3] == 'x') 558 return PRIx32; 559 if (name[3] == 'X') 560 return PRIX32; 561 abort (); 562 } 563 if (name[4] == '6' && name[5] == '4' && name[6] == '\0') 564 { 565 if (name[3] == 'd') 566 return PRId64; 567 if (name[3] == 'i') 568 return PRIi64; 569 if (name[3] == 'o') 570 return PRIo64; 571 if (name[3] == 'u') 572 return PRIu64; 573 if (name[3] == 'x') 574 return PRIx64; 575 if (name[3] == 'X') 576 return PRIX64; 577 abort (); 578 } 579 if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A' 580 && name[7] == 'S' && name[8] == 'T') 581 { 582 if (name[9] == '8' && name[10] == '\0') 583 { 584 if (name[3] == 'd') 585 return PRIdLEAST8; 586 if (name[3] == 'i') 587 return PRIiLEAST8; 588 if (name[3] == 'o') 589 return PRIoLEAST8; 590 if (name[3] == 'u') 591 return PRIuLEAST8; 592 if (name[3] == 'x') 593 return PRIxLEAST8; 594 if (name[3] == 'X') 595 return PRIXLEAST8; 596 abort (); 597 } 598 if (name[9] == '1' && name[10] == '6' && name[11] == '\0') 599 { 600 if (name[3] == 'd') 601 return PRIdLEAST16; 602 if (name[3] == 'i') 603 return PRIiLEAST16; 604 if (name[3] == 'o') 605 return PRIoLEAST16; 606 if (name[3] == 'u') 607 return PRIuLEAST16; 608 if (name[3] == 'x') 609 return PRIxLEAST16; 610 if (name[3] == 'X') 611 return PRIXLEAST16; 612 abort (); 613 } 614 if (name[9] == '3' && name[10] == '2' && name[11] == '\0') 615 { 616 if (name[3] == 'd') 617 return PRIdLEAST32; 618 if (name[3] == 'i') 619 return PRIiLEAST32; 620 if (name[3] == 'o') 621 return PRIoLEAST32; 622 if (name[3] == 'u') 623 return PRIuLEAST32; 624 if (name[3] == 'x') 625 return PRIxLEAST32; 626 if (name[3] == 'X') 627 return PRIXLEAST32; 628 abort (); 629 } 630 if (name[9] == '6' && name[10] == '4' && name[11] == '\0') 631 { 632 if (name[3] == 'd') 633 return PRIdLEAST64; 634 if (name[3] == 'i') 635 return PRIiLEAST64; 636 if (name[3] == 'o') 637 return PRIoLEAST64; 638 if (name[3] == 'u') 639 return PRIuLEAST64; 640 if (name[3] == 'x') 641 return PRIxLEAST64; 642 if (name[3] == 'X') 643 return PRIXLEAST64; 644 abort (); 645 } 646 } 647 if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S' 648 && name[7] == 'T') 649 { 650 if (name[8] == '8' && name[9] == '\0') 651 { 652 if (name[3] == 'd') 653 return PRIdFAST8; 654 if (name[3] == 'i') 655 return PRIiFAST8; 656 if (name[3] == 'o') 657 return PRIoFAST8; 658 if (name[3] == 'u') 659 return PRIuFAST8; 660 if (name[3] == 'x') 661 return PRIxFAST8; 662 if (name[3] == 'X') 663 return PRIXFAST8; 664 abort (); 665 } 666 if (name[8] == '1' && name[9] == '6' && name[10] == '\0') 667 { 668 if (name[3] == 'd') 669 return PRIdFAST16; 670 if (name[3] == 'i') 671 return PRIiFAST16; 672 if (name[3] == 'o') 673 return PRIoFAST16; 674 if (name[3] == 'u') 675 return PRIuFAST16; 676 if (name[3] == 'x') 677 return PRIxFAST16; 678 if (name[3] == 'X') 679 return PRIXFAST16; 680 abort (); 681 } 682 if (name[8] == '3' && name[9] == '2' && name[10] == '\0') 683 { 684 if (name[3] == 'd') 685 return PRIdFAST32; 686 if (name[3] == 'i') 687 return PRIiFAST32; 688 if (name[3] == 'o') 689 return PRIoFAST32; 690 if (name[3] == 'u') 691 return PRIuFAST32; 692 if (name[3] == 'x') 693 return PRIxFAST32; 694 if (name[3] == 'X') 695 return PRIXFAST32; 696 abort (); 697 } 698 if (name[8] == '6' && name[9] == '4' && name[10] == '\0') 699 { 700 if (name[3] == 'd') 701 return PRIdFAST64; 702 if (name[3] == 'i') 703 return PRIiFAST64; 704 if (name[3] == 'o') 705 return PRIoFAST64; 706 if (name[3] == 'u') 707 return PRIuFAST64; 708 if (name[3] == 'x') 709 return PRIxFAST64; 710 if (name[3] == 'X') 711 return PRIXFAST64; 712 abort (); 713 } 714 } 715 if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X' 716 && name[7] == '\0') 717 { 718 if (name[3] == 'd') 719 return PRIdMAX; 720 if (name[3] == 'i') 721 return PRIiMAX; 722 if (name[3] == 'o') 723 return PRIoMAX; 724 if (name[3] == 'u') 725 return PRIuMAX; 726 if (name[3] == 'x') 727 return PRIxMAX; 728 if (name[3] == 'X') 729 return PRIXMAX; 730 abort (); 731 } 732 if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R' 733 && name[7] == '\0') 734 { 735 if (name[3] == 'd') 736 return PRIdPTR; 737 if (name[3] == 'i') 738 return PRIiPTR; 739 if (name[3] == 'o') 740 return PRIoPTR; 741 if (name[3] == 'u') 742 return PRIuPTR; 743 if (name[3] == 'x') 744 return PRIxPTR; 745 if (name[3] == 'X') 746 return PRIXPTR; 747 abort (); 748 } 749 } 164 750 } 165 } 166 }; 167 168 # define INIT_GERMANIC_PLURAL() 169 751 /* Test for a glibc specific printf() format directive flag. */ 752 if (name[0] == 'I' && name[1] == '\0') 753 { 754 #if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) 755 /* The 'I' flag, in numeric format directives, replaces ASCII digits 756 with the 'outdigits' defined in the LC_CTYPE locale facet. This is 757 used for Farsi (Persian) and maybe Arabic. */ 758 return "I"; 170 759 #else 171 172 /* For compilers without support for ISO C 99 struct/union initializers: 173 Initialization at run-time. */ 174 175 static struct expression plvar; 176 static struct expression plone; 177 static struct expression germanic_plural; 178 179 static void 180 init_germanic_plural () 181 { 182 if (plone.val.num == 0) 183 { 184 plvar.nargs = 0; 185 plvar.operation = var; 186 187 plone.nargs = 0; 188 plone.operation = num; 189 plone.val.num = 1; 190 191 germanic_plural.nargs = 2; 192 germanic_plural.operation = not_equal; 193 germanic_plural.val.args[0] = &plvar; 194 germanic_plural.val.args[1] = &plone; 760 return ""; 761 #endif 195 762 } 763 /* Other system dependent strings are not valid. */ 764 return NULL; 196 765 } 197 198 # define INIT_GERMANIC_PLURAL() init_germanic_plural ()199 200 #endif201 202 766 203 767 /* Initialize the codeset dependent parts of an opened message catalog. … … 205 769 const char * 206 770 internal_function 207 _nl_init_domain_conv (domain_file, domain, domainbinding) 208 struct loaded_l10nfile *domain_file; 209 struct loaded_domain *domain; 210 struct binding *domainbinding; 771 _nl_init_domain_conv (struct loaded_l10nfile *domain_file, 772 struct loaded_domain *domain, 773 struct binding *domainbinding) 211 774 { 212 775 /* Find out about the character set the file is encoded with. … … 269 832 { 270 833 # ifdef _LIBC 271 outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;834 outcharset = _NL_CURRENT (LC_CTYPE, CODESET); 272 835 # else 273 836 # if HAVE_ICONV … … 289 852 # else 290 853 # if HAVE_ICONV 291 /* When using GNU libiconv, we want to use transliteration. */ 292 # if _LIBICONV_VERSION >= 0x0105 293 len = strlen (outcharset); 294 { 295 char *tmp = (char *) alloca (len + 10 + 1); 296 memcpy (tmp, outcharset, len); 297 memcpy (tmp + len, "//TRANSLIT", 10 + 1); 298 outcharset = tmp; 299 } 854 /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5, 855 we want to use transliteration. */ 856 # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \ 857 || _LIBICONV_VERSION >= 0x0105 858 if (strchr (outcharset, '/') == NULL) 859 { 860 char *tmp; 861 862 len = strlen (outcharset); 863 tmp = (char *) alloca (len + 10 + 1); 864 memcpy (tmp, outcharset, len); 865 memcpy (tmp + len, "//TRANSLIT", 10 + 1); 866 outcharset = tmp; 867 868 domain->conv = iconv_open (outcharset, charset); 869 870 freea (outcharset); 871 } 872 else 300 873 # endif 301 domain->conv = iconv_open (outcharset, charset); 302 # if _LIBICONV_VERSION >= 0x0105 303 freea (outcharset); 304 # endif 874 domain->conv = iconv_open (outcharset, charset); 305 875 # endif 306 876 # endif … … 317 887 void 318 888 internal_function 319 _nl_free_domain_conv (domain) 320 struct loaded_domain *domain; 889 _nl_free_domain_conv (struct loaded_domain *domain) 321 890 { 322 891 if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) … … 338 907 void 339 908 internal_function 340 _nl_load_domain (domain_file, domainbinding) 341 struct loaded_l10nfile *domain_file; 342 struct binding *domainbinding; 909 _nl_load_domain (struct loaded_l10nfile *domain_file, 910 struct binding *domainbinding) 343 911 { 344 912 int fd; … … 352 920 int use_mmap = 0; 353 921 struct loaded_domain *domain; 922 int revision; 354 923 const char *nullentry; 355 924 … … 459 1028 domain->mmap_size = size; 460 1029 domain->must_swap = data->magic != _MAGIC; 1030 domain->malloced = NULL; 461 1031 462 1032 /* Fill in the information about the available tables. */ 463 switch (W (domain->must_swap, data->revision)) 1033 revision = W (domain->must_swap, data->revision); 1034 /* We support only the major revisions 0 and 1. */ 1035 switch (revision >> 16) 464 1036 { 465 1037 case 0: 1038 case 1: 466 1039 domain->nstrings = W (domain->must_swap, data->nstrings); 467 domain->orig_tab = ( struct string_desc *)1040 domain->orig_tab = (const struct string_desc *) 468 1041 ((char *) data + W (domain->must_swap, data->orig_tab_offset)); 469 domain->trans_tab = ( struct string_desc *)1042 domain->trans_tab = (const struct string_desc *) 470 1043 ((char *) data + W (domain->must_swap, data->trans_tab_offset)); 471 1044 domain->hash_size = W (domain->must_swap, data->hash_tab_size); 472 domain->hash_tab = (nls_uint32 *) 473 ((char *) data + W (domain->must_swap, data->hash_tab_offset)); 1045 domain->hash_tab = 1046 (domain->hash_size > 2 1047 ? (const nls_uint32 *) 1048 ((char *) data + W (domain->must_swap, data->hash_tab_offset)) 1049 : NULL); 1050 domain->must_swap_hash_tab = domain->must_swap; 1051 1052 /* Now dispatch on the minor revision. */ 1053 switch (revision & 0xffff) 1054 { 1055 case 0: 1056 domain->n_sysdep_strings = 0; 1057 domain->orig_sysdep_tab = NULL; 1058 domain->trans_sysdep_tab = NULL; 1059 break; 1060 case 1: 1061 default: 1062 { 1063 nls_uint32 n_sysdep_strings; 1064 1065 if (domain->hash_tab == NULL) 1066 /* This is invalid. These minor revisions need a hash table. */ 1067 goto invalid; 1068 1069 n_sysdep_strings = 1070 W (domain->must_swap, data->n_sysdep_strings); 1071 if (n_sysdep_strings > 0) 1072 { 1073 nls_uint32 n_sysdep_segments; 1074 const struct sysdep_segment *sysdep_segments; 1075 const char **sysdep_segment_values; 1076 const nls_uint32 *orig_sysdep_tab; 1077 const nls_uint32 *trans_sysdep_tab; 1078 nls_uint32 n_inmem_sysdep_strings; 1079 size_t memneed; 1080 char *mem; 1081 struct sysdep_string_desc *inmem_orig_sysdep_tab; 1082 struct sysdep_string_desc *inmem_trans_sysdep_tab; 1083 nls_uint32 *inmem_hash_tab; 1084 unsigned int i, j; 1085 1086 /* Get the values of the system dependent segments. */ 1087 n_sysdep_segments = 1088 W (domain->must_swap, data->n_sysdep_segments); 1089 sysdep_segments = (const struct sysdep_segment *) 1090 ((char *) data 1091 + W (domain->must_swap, data->sysdep_segments_offset)); 1092 sysdep_segment_values = 1093 alloca (n_sysdep_segments * sizeof (const char *)); 1094 for (i = 0; i < n_sysdep_segments; i++) 1095 { 1096 const char *name = 1097 (char *) data 1098 + W (domain->must_swap, sysdep_segments[i].offset); 1099 nls_uint32 namelen = 1100 W (domain->must_swap, sysdep_segments[i].length); 1101 1102 if (!(namelen > 0 && name[namelen - 1] == '\0')) 1103 { 1104 freea (sysdep_segment_values); 1105 goto invalid; 1106 } 1107 1108 sysdep_segment_values[i] = get_sysdep_segment_value (name); 1109 } 1110 1111 orig_sysdep_tab = (const nls_uint32 *) 1112 ((char *) data 1113 + W (domain->must_swap, data->orig_sysdep_tab_offset)); 1114 trans_sysdep_tab = (const nls_uint32 *) 1115 ((char *) data 1116 + W (domain->must_swap, data->trans_sysdep_tab_offset)); 1117 1118 /* Compute the amount of additional memory needed for the 1119 system dependent strings and the augmented hash table. 1120 At the same time, also drop string pairs which refer to 1121 an undefined system dependent segment. */ 1122 n_inmem_sysdep_strings = 0; 1123 memneed = domain->hash_size * sizeof (nls_uint32); 1124 for (i = 0; i < n_sysdep_strings; i++) 1125 { 1126 int valid = 1; 1127 size_t needs[2]; 1128 1129 for (j = 0; j < 2; j++) 1130 { 1131 const struct sysdep_string *sysdep_string = 1132 (const struct sysdep_string *) 1133 ((char *) data 1134 + W (domain->must_swap, 1135 j == 0 1136 ? orig_sysdep_tab[i] 1137 : trans_sysdep_tab[i])); 1138 size_t need = 0; 1139 const struct segment_pair *p = sysdep_string->segments; 1140 1141 if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) 1142 for (p = sysdep_string->segments;; p++) 1143 { 1144 nls_uint32 sysdepref; 1145 1146 need += W (domain->must_swap, p->segsize); 1147 1148 sysdepref = W (domain->must_swap, p->sysdepref); 1149 if (sysdepref == SEGMENTS_END) 1150 break; 1151 1152 if (sysdepref >= n_sysdep_segments) 1153 { 1154 /* Invalid. */ 1155 freea (sysdep_segment_values); 1156 goto invalid; 1157 } 1158 1159 if (sysdep_segment_values[sysdepref] == NULL) 1160 { 1161 /* This particular string pair is invalid. */ 1162 valid = 0; 1163 break; 1164 } 1165 1166 need += strlen (sysdep_segment_values[sysdepref]); 1167 } 1168 1169 needs[j] = need; 1170 if (!valid) 1171 break; 1172 } 1173 1174 if (valid) 1175 { 1176 n_inmem_sysdep_strings++; 1177 memneed += needs[0] + needs[1]; 1178 } 1179 } 1180 memneed += 2 * n_inmem_sysdep_strings 1181 * sizeof (struct sysdep_string_desc); 1182 1183 if (n_inmem_sysdep_strings > 0) 1184 { 1185 unsigned int k; 1186 1187 /* Allocate additional memory. */ 1188 mem = (char *) malloc (memneed); 1189 if (mem == NULL) 1190 goto invalid; 1191 1192 domain->malloced = mem; 1193 inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; 1194 mem += n_inmem_sysdep_strings 1195 * sizeof (struct sysdep_string_desc); 1196 inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; 1197 mem += n_inmem_sysdep_strings 1198 * sizeof (struct sysdep_string_desc); 1199 inmem_hash_tab = (nls_uint32 *) mem; 1200 mem += domain->hash_size * sizeof (nls_uint32); 1201 1202 /* Compute the system dependent strings. */ 1203 k = 0; 1204 for (i = 0; i < n_sysdep_strings; i++) 1205 { 1206 int valid = 1; 1207 1208 for (j = 0; j < 2; j++) 1209 { 1210 const struct sysdep_string *sysdep_string = 1211 (const struct sysdep_string *) 1212 ((char *) data 1213 + W (domain->must_swap, 1214 j == 0 1215 ? orig_sysdep_tab[i] 1216 : trans_sysdep_tab[i])); 1217 const struct segment_pair *p = 1218 sysdep_string->segments; 1219 1220 if (W (domain->must_swap, p->sysdepref) 1221 != SEGMENTS_END) 1222 for (p = sysdep_string->segments;; p++) 1223 { 1224 nls_uint32 sysdepref; 1225 1226 sysdepref = 1227 W (domain->must_swap, p->sysdepref); 1228 if (sysdepref == SEGMENTS_END) 1229 break; 1230 1231 if (sysdep_segment_values[sysdepref] == NULL) 1232 { 1233 /* This particular string pair is 1234 invalid. */ 1235 valid = 0; 1236 break; 1237 } 1238 } 1239 1240 if (!valid) 1241 break; 1242 } 1243 1244 if (valid) 1245 { 1246 for (j = 0; j < 2; j++) 1247 { 1248 const struct sysdep_string *sysdep_string = 1249 (const struct sysdep_string *) 1250 ((char *) data 1251 + W (domain->must_swap, 1252 j == 0 1253 ? orig_sysdep_tab[i] 1254 : trans_sysdep_tab[i])); 1255 const char *static_segments = 1256 (char *) data 1257 + W (domain->must_swap, sysdep_string->offset); 1258 const struct segment_pair *p = 1259 sysdep_string->segments; 1260 1261 /* Concatenate the segments, and fill 1262 inmem_orig_sysdep_tab[k] (for j == 0) and 1263 inmem_trans_sysdep_tab[k] (for j == 1). */ 1264 1265 struct sysdep_string_desc *inmem_tab_entry = 1266 (j == 0 1267 ? inmem_orig_sysdep_tab 1268 : inmem_trans_sysdep_tab) 1269 + k; 1270 1271 if (W (domain->must_swap, p->sysdepref) 1272 == SEGMENTS_END) 1273 { 1274 /* Only one static segment. */ 1275 inmem_tab_entry->length = 1276 W (domain->must_swap, p->segsize); 1277 inmem_tab_entry->pointer = static_segments; 1278 } 1279 else 1280 { 1281 inmem_tab_entry->pointer = mem; 1282 1283 for (p = sysdep_string->segments;; p++) 1284 { 1285 nls_uint32 segsize = 1286 W (domain->must_swap, p->segsize); 1287 nls_uint32 sysdepref = 1288 W (domain->must_swap, p->sysdepref); 1289 size_t n; 1290 1291 if (segsize > 0) 1292 { 1293 memcpy (mem, static_segments, segsize); 1294 mem += segsize; 1295 static_segments += segsize; 1296 } 1297 1298 if (sysdepref == SEGMENTS_END) 1299 break; 1300 1301 n = strlen (sysdep_segment_values[sysdepref]); 1302 memcpy (mem, sysdep_segment_values[sysdepref], n); 1303 mem += n; 1304 } 1305 1306 inmem_tab_entry->length = 1307 mem - inmem_tab_entry->pointer; 1308 } 1309 } 1310 1311 k++; 1312 } 1313 } 1314 if (k != n_inmem_sysdep_strings) 1315 abort (); 1316 1317 /* Compute the augmented hash table. */ 1318 for (i = 0; i < domain->hash_size; i++) 1319 inmem_hash_tab[i] = 1320 W (domain->must_swap_hash_tab, domain->hash_tab[i]); 1321 for (i = 0; i < n_inmem_sysdep_strings; i++) 1322 { 1323 const char *msgid = inmem_orig_sysdep_tab[i].pointer; 1324 nls_uint32 hash_val = hash_string (msgid); 1325 nls_uint32 idx = hash_val % domain->hash_size; 1326 nls_uint32 incr = 1327 1 + (hash_val % (domain->hash_size - 2)); 1328 1329 for (;;) 1330 { 1331 if (inmem_hash_tab[idx] == 0) 1332 { 1333 /* Hash table entry is empty. Use it. */ 1334 inmem_hash_tab[idx] = 1 + domain->nstrings + i; 1335 break; 1336 } 1337 1338 if (idx >= domain->hash_size - incr) 1339 idx -= domain->hash_size - incr; 1340 else 1341 idx += incr; 1342 } 1343 } 1344 1345 domain->n_sysdep_strings = n_inmem_sysdep_strings; 1346 domain->orig_sysdep_tab = inmem_orig_sysdep_tab; 1347 domain->trans_sysdep_tab = inmem_trans_sysdep_tab; 1348 1349 domain->hash_tab = inmem_hash_tab; 1350 domain->must_swap_hash_tab = 0; 1351 } 1352 else 1353 { 1354 domain->n_sysdep_strings = 0; 1355 domain->orig_sysdep_tab = NULL; 1356 domain->trans_sysdep_tab = NULL; 1357 } 1358 1359 freea (sysdep_segment_values); 1360 } 1361 else 1362 { 1363 domain->n_sysdep_strings = 0; 1364 domain->orig_sysdep_tab = NULL; 1365 domain->trans_sysdep_tab = NULL; 1366 } 1367 } 1368 break; 1369 } 474 1370 break; 475 1371 default: 476 1372 /* This is an invalid revision. */ 1373 invalid: 1374 /* This is an invalid .mo file. */ 1375 if (domain->malloced) 1376 free (domain->malloced); 477 1377 #ifdef HAVE_MMAP 478 1378 if (use_mmap) … … 492 1392 493 1393 /* Also look for a plural specification. */ 494 if (nullentry != NULL) 495 { 496 const char *plural; 497 const char *nplurals; 498 499 plural = strstr (nullentry, "plural="); 500 nplurals = strstr (nullentry, "nplurals="); 501 if (plural == NULL || nplurals == NULL) 502 goto no_plural; 503 else 504 { 505 /* First get the number. */ 506 char *endp; 507 unsigned long int n; 508 struct parse_args args; 509 510 nplurals += 9; 511 while (*nplurals != '\0' && isspace (*nplurals)) 512 ++nplurals; 513 #if defined HAVE_STRTOUL || defined _LIBC 514 n = strtoul (nplurals, &endp, 10); 515 #else 516 for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++) 517 n = n * 10 + (*endp - '0'); 518 #endif 519 domain->nplurals = n; 520 if (nplurals == endp) 521 goto no_plural; 522 523 /* Due to the restrictions bison imposes onto the interface of the 524 scanner function we have to put the input string and the result 525 passed up from the parser into the same structure which address 526 is passed down to the parser. */ 527 plural += 7; 528 args.cp = plural; 529 if (PLURAL_PARSE (&args) != 0) 530 goto no_plural; 531 domain->plural = args.res; 532 } 533 } 534 else 535 { 536 /* By default we are using the Germanic form: singular form only 537 for `one', the plural form otherwise. Yes, this is also what 538 English is using since English is a Germanic language. */ 539 no_plural: 540 INIT_GERMANIC_PLURAL (); 541 domain->plural = &germanic_plural; 542 domain->nplurals = 2; 543 } 1394 EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals); 544 1395 } 545 1396 … … 548 1399 void 549 1400 internal_function 550 _nl_unload_domain (domain) 551 struct loaded_domain *domain; 1401 _nl_unload_domain (struct loaded_domain *domain) 552 1402 { 553 if (domain->plural != & germanic_plural)1403 if (domain->plural != &__gettext_germanic_plural) 554 1404 __gettext_free_exp (domain->plural); 555 1405 556 1406 _nl_free_domain_conv (domain); 1407 1408 if (domain->malloced) 1409 free (domain->malloced); 557 1410 558 1411 # ifdef _POSIX_MAPPED_FILES sweep/trunk/intl/localealias.c
r124 r183 1 1 /* Handle aliases for locale names. 2 Copyright (C) 1995-1999, 2000 , 2001Free Software Foundation, Inc.2 Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify it … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 … … 30 30 #include <ctype.h> 31 31 #include <stdio.h> 32 #if defined _LIBC || defined HAVE___FSETLOCKING 33 # include <stdio_ext.h> 34 #endif 32 35 #include <sys/types.h> 33 36 34 37 #ifdef __GNUC__ 38 # undef alloca 35 39 # define alloca __builtin_alloca 36 40 # define HAVE_ALLOCA 1 37 41 #else 38 # if defined HAVE_ALLOCA_H || defined _LIBC 39 # include <alloca.h> 42 # ifdef _MSC_VER 43 # include <malloc.h> 44 # define alloca _alloca 40 45 # else 41 # ifdef _AIX 46 # if defined HAVE_ALLOCA_H || defined _LIBC 47 # include <alloca.h> 48 # else 49 # ifdef _AIX 42 50 #pragma alloca 43 # else44 # ifndef alloca51 # else 52 # ifndef alloca 45 53 char *alloca (); 54 # endif 46 55 # endif 47 56 # endif … … 50 59 51 60 #include <stdlib.h> 52 53 61 #include <string.h> 54 #if !HAVE_STRCHR && !defined _LIBC55 # ifndef strchr56 # define strchr index57 # endif58 #endif59 62 60 63 #include "gettextP.h" 64 65 #if ENABLE_RELOCATABLE 66 # include "relocatable.h" 67 #else 68 # define relocate(pathname) (pathname) 69 #endif 61 70 62 71 /* @@ end of prolog @@ */ … … 72 81 # endif 73 82 # define HAVE_MEMPCPY 1 83 # define HAVE___FSETLOCKING 1 74 84 75 85 /* We need locking here since we can be called from different places. */ … … 81 91 #ifndef internal_function 82 92 # define internal_function 93 #endif 94 95 /* Some optimizations for glibc. */ 96 #ifdef _LIBC 97 # define FEOF(fp) feof_unlocked (fp) 98 # define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp) 99 #else 100 # define FEOF(fp) feof (fp) 101 # define FGETS(buf, n, fp) fgets (buf, n, fp) 83 102 #endif 84 103 … … 92 111 #endif 93 112 94 #if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED113 #if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED 95 114 # undef fgets 96 115 # define fgets(buf, len, s) fgets_unlocked (buf, len, s) 97 116 #endif 98 #if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED117 #if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED 99 118 # undef feof 100 119 # define feof(s) feof_unlocked (s) … … 109 128 110 129 111 static char *string_space; 130 #ifndef _LIBC 131 # define libc_freeres_ptr(decl) decl 132 #endif 133 134 libc_freeres_ptr (static char *string_space); 112 135 static size_t string_space_act; 113 136 static size_t string_space_max; 114 static struct alias_map *map;137 libc_freeres_ptr (static struct alias_map *map); 115 138 static size_t nmap; 116 139 static size_t maxmap; … … 118 141 119 142 /* Prototypes for local functions. */ 120 static size_t read_alias_file PARAMS ((const char *fname, int fname_len))143 static size_t read_alias_file (const char *fname, int fname_len) 121 144 internal_function; 122 static int extend_alias_table PARAMS ((void));123 static int alias_compare PARAMS ((const struct alias_map *map1,124 const struct alias_map *map2));145 static int extend_alias_table (void); 146 static int alias_compare (const struct alias_map *map1, 147 const struct alias_map *map2); 125 148 126 149 127 150 const char * 128 _nl_expand_alias (name) 129 const char *name; 151 _nl_expand_alias (const char *name) 130 152 { 131 static const char *locale_alias_path = LOCALE_ALIAS_PATH;153 static const char *locale_alias_path; 132 154 struct alias_map *retval; 133 155 const char *result = NULL; … … 138 160 #endif 139 161 162 if (locale_alias_path == NULL) 163 locale_alias_path = LOCALE_ALIAS_PATH; 164 140 165 do 141 166 { … … 147 172 retval = (struct alias_map *) bsearch (&item, map, nmap, 148 173 sizeof (struct alias_map), 149 (int (*) PARAMS ((const void *,150 const void *))174 (int (*) (const void *, 175 const void *) 151 176 ) alias_compare); 152 177 else … … 190 215 static size_t 191 216 internal_function 192 read_alias_file (fname, fname_len) 193 const char *fname; 194 int fname_len; 217 read_alias_file (const char *fname, int fname_len) 195 218 { 196 219 FILE *fp; … … 208 231 #endif 209 232 210 fp = fopen ( full_fname, "r");233 fp = fopen (relocate (full_fname), "r"); 211 234 freea (full_fname); 212 235 if (fp == NULL) 213 236 return 0; 214 237 238 #ifdef HAVE___FSETLOCKING 239 /* No threads present. */ 240 __fsetlocking (fp, FSETLOCKING_BYCALLER); 241 #endif 242 215 243 added = 0; 216 while (! feof(fp))244 while (!FEOF (fp)) 217 245 { 218 246 /* It is a reasonable approach to use a fix buffer here because … … 220 248 b) these fields must be usable as file names and so must not 221 249 be that long 222 */ 223 char buf[BUFSIZ]; 250 We avoid a multi-kilobyte buffer here since this would use up 251 stack space which we might not have if the program ran out of 252 memory. */ 253 char buf[400]; 224 254 char *alias; 225 255 char *value; 226 256 char *cp; 227 257 228 if ( fgets(buf, sizeof buf, fp) == NULL)258 if (FGETS (buf, sizeof buf, fp) == NULL) 229 259 /* EOF reached. */ 230 260 break; 231 261 232 /* Possibly not the whole line fits into the buffer. Ignore233 the rest of the line. */234 if (strchr (buf, '\n') == NULL)235 {236 char altbuf[BUFSIZ];237 do238 if (fgets (altbuf, sizeof altbuf, fp) == NULL)239 /* Make sure the inner loop will be left. The outer loop240 will exit at the `feof' test. */241 break;242 while (strchr (altbuf, '\n') == NULL);243 }244 245 262 cp = buf; 246 263 /* Ignore leading white space. */ 247 while (isspace ( cp[0]))264 while (isspace ((unsigned char) cp[0])) 248 265 ++cp; 249 266 … … 252 269 { 253 270 alias = cp++; 254 while (cp[0] != '\0' && !isspace ( cp[0]))271 while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) 255 272 ++cp; 256 273 /* Terminate alias name. */ … … 259 276 260 277 /* Now look for the beginning of the value. */ 261 while (isspace ( cp[0]))278 while (isspace ((unsigned char) cp[0])) 262 279 ++cp; 263 280 … … 268 285 269 286 value = cp++; 270 while (cp[0] != '\0' && !isspace ( cp[0]))287 while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) 271 288 ++cp; 272 289 /* Terminate value. */ … … 326 343 } 327 344 } 345 346 /* Possibly not the whole line fits into the buffer. Ignore 347 the rest of the line. */ 348 while (strchr (buf, '\n') == NULL) 349 if (FGETS (buf, sizeof buf, fp) == NULL) 350 /* Make sure the inner loop will be left. The outer loop 351 will exit at the `feof' test. */ 352 break; 328 353 } 329 354 … … 334 359 if (added > 0) 335 360 qsort (map, nmap, sizeof (struct alias_map), 336 (int (*) PARAMS ((const void *, const void *))) alias_compare);361 (int (*) (const void *, const void *)) alias_compare); 337 362 338 363 return added; … … 359 384 360 385 361 #ifdef _LIBC362 static void __attribute__ ((unused))363 free_mem (void)364 {365 if (string_space != NULL)366 free (string_space);367 if (map != NULL)368 free (map);369 }370 text_set_element (__libc_subfreeres, free_mem);371 #endif372 373 374 386 static int 375 alias_compare (map1, map2) 376 const struct alias_map *map1; 377 const struct alias_map *map2; 387 alias_compare (const struct alias_map *map1, const struct alias_map *map2) 378 388 { 379 389 #if defined _LIBC || defined HAVE_STRCASECMP sweep/trunk/intl/textdomain.c
r124 r183 1 1 /* Implementation of the textdomain(3) function. 2 Copyright (C) 1995-1998, 2000 , 2001Free Software Foundation, Inc.2 Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify it … … 14 14 You should have received a copy of the GNU Library General Public 15 15 License along with this program; if not, write to the Free Software 16 Foundation, Inc., 5 9 Temple Place - Suite 330, Boston, MA 02111-1307,16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 17 USA. */ 18 18 … … 45 45 using libintl.a cannot be linked statically. */ 46 46 #if !defined _LIBC 47 # define _nl_default_default_domain _nl_default_default_domain__48 # define _nl_current_default_domain _nl_current_default_domain__47 # define _nl_default_default_domain libintl_nl_default_default_domain 48 # define _nl_current_default_domain libintl_nl_current_default_domain 49 49 #endif 50 50 … … 52 52 53 53 /* Name of the default text domain. */ 54 extern const char _nl_default_default_domain[] ;54 extern const char _nl_default_default_domain[] attribute_hidden; 55 55 56 56 /* Default text domain in which entries for gettext(3) are to be found. */ 57 extern const char *_nl_current_default_domain ;57 extern const char *_nl_current_default_domain attribute_hidden; 58 58 59 59 … … 68 68 # endif 69 69 #else 70 # define TEXTDOMAIN textdomain__70 # define TEXTDOMAIN libintl_textdomain 71 71 #endif 72 72 73 73 /* Lock variable to protect the global data in the gettext implementation. */ 74 __libc_rwlock_define (extern, _nl_state_lock )74 __libc_rwlock_define (extern, _nl_state_lock attribute_hidden) 75 75 76 76 /* Set the current default message catalog to DOMAINNAME. … … 78 78 If DOMAINNAME is "", reset to the default of "messages". */ 79 79 char * 80 TEXTDOMAIN (domainname) 81 const char *domainname; 80 TEXTDOMAIN (const char *domainname) 82 81 { 83 82 char *new_domain; sweep/trunk/m4/Makefile.am
r148 r183 1 1 2 EXTRA_DIST = \2 EXTRA_DIST = codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 \ 3 3 ogg.m4 \ 4 4 speex.m4 \ sweep/trunk/po/ChangeLog
r125 r183 1 2005-07-27 gettextize <bug-gnu-gettext@gnu.org> 2 3 * Makefile.in.in: Upgrade to gettext-0.14.5. 4 * boldquot.sed: New file, from gettext-0.14.5. 5 * en@boldquot.header: New file, from gettext-0.14.5. 6 * en@quot.header: New file, from gettext-0.14.5. 7 * insert-header.sin: New file, from gettext-0.14.5. 8 * quot.sed: New file, from gettext-0.14.5. 9 * remove-potcdate.sin: New file, from gettext-0.14.5. 10 * Rules-quot: New file, from gettext-0.14.5. 11 * cat-id-tbl.c: Remove file. 12 * stamp-cat-id: Remove file. 13 1 14 2002-04-22 gettextize <bug-gnu-utils@gnu.org> 2 15 sweep/trunk/po/Makefile.in.in
r125 r183 1 # Makefile for program source directory in GNU NLS utilities package.2 # Copyright (C) 1995-1997, 2000 , 2001by Ulrich Drepper <drepper@gnu.ai.mit.edu>1 # Makefile for PO directory in any package using GNU gettext. 2 # Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu> 3 3 # 4 # This file file be copied and used freely without restrictions. It can 5 # be used in projects which are not available under the GNU General Public License 6 # but which still want to provide support for the GNU gettext functionality. 7 # Please note that the actual code is *not* freely available. 4 # This file can be copied and used freely without restrictions. It can 5 # be used in projects which are not available under the GNU General Public 6 # License but which still want to provide support for the GNU gettext 7 # functionality. 8 # Please note that the actual code of GNU gettext is covered by the GNU 9 # General Public License and is *not* in the public domain. 10 # 11 # Origin: gettext-0.14.4 8 12 9 13 PACKAGE = @PACKAGE@ 10 14 VERSION = @VERSION@ 11 12 # These two variables depend on the location of this directory. 13 subdir = po 14 top_builddir = .. 15 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 15 16 16 17 SHELL = /bin/sh … … 30 31 INSTALL_DATA = @INSTALL_DATA@ 31 32 MKINSTALLDIRS = @MKINSTALLDIRS@ 32 mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` 33 34 CC = @CC@ 33 mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) 34 35 35 GMSGFMT = @GMSGFMT@ 36 36 MSGFMT = @MSGFMT@ 37 37 XGETTEXT = @XGETTEXT@ 38 38 MSGMERGE = msgmerge 39 40 DEFS = @DEFS@ 41 CFLAGS = @CFLAGS@ 42 CPPFLAGS = @CPPFLAGS@ 43 44 INCLUDES = -I.. -I$(top_srcdir)/intl 45 46 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) 39 MSGMERGE_UPDATE = @MSGMERGE@ --update 40 MSGINIT = msginit 41 MSGCONV = msgconv 42 MSGFILTER = msgfilter 47 43 48 44 POFILES = @POFILES@ 49 45 GMOFILES = @GMOFILES@ 50 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ 51 $(POFILES) $(GMOFILES) 46 UPDATEPOFILES = @UPDATEPOFILES@ 47 DUMMYPOFILES = @DUMMYPOFILES@ 48 DISTFILES.common = Makefile.in.in remove-potcdate.sin \ 49 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) 50 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ 51 $(POFILES) $(GMOFILES) \ 52 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) 52 53 53 54 POTFILES = \ … … 55 56 CATALOGS = @CATALOGS@ 56 57 58 # Makevars gets inserted here. (Don't remove this line!) 59 57 60 .SUFFIXES: 58 .SUFFIXES: .c .o .po .pox .gmo .mo 59 60 .c.o: 61 $(COMPILE) $< 62 63 .po.pox: 64 $(MAKE) $(PACKAGE).pot 65 $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox 61 .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update 66 62 67 63 .po.mo: 68 $(MSGFMT) -o $@ $< 64 @echo "$(MSGFMT) -c -o $@ $<"; \ 65 $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ 69 66 70 67 .po.gmo: 71 file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ 72 && rm -f $$file && $(GMSGFMT) --statistics -o $$file $< 68 @lang=`echo $* | sed -e 's,.*/,,'`; \ 69 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 70 echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ 71 cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo 72 73 .sin.sed: 74 sed -e '/^#/d' $< > t-$@ 75 mv t-$@ $@ 73 76 74 77 75 78 all: all-@USE_NLS@ 76 79 77 all-yes: $(CATALOGS)80 all-yes: stamp-po 78 81 all-no: 79 82 80 # Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot', 83 # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no 84 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because 85 # we don't want to bother translators with empty POT files). We assume that 86 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. 87 # In this case, stamp-po is a nop (i.e. a phony target). 88 89 # stamp-po is a timestamp denoting the last time at which the CATALOGS have 90 # been loosely updated. Its purpose is that when a developer or translator 91 # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, 92 # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent 93 # invocations of "make" will do nothing. This timestamp would not be necessary 94 # if updating the $(CATALOGS) would always touch them; however, the rule for 95 # $(POFILES) has been designed to not touch files that don't need to be 96 # changed. 97 stamp-po: $(srcdir)/$(DOMAIN).pot 98 test ! -f $(srcdir)/$(DOMAIN).pot || \ 99 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) 100 @test ! -f $(srcdir)/$(DOMAIN).pot || { \ 101 echo "touch stamp-po" && \ 102 echo timestamp > stamp-poT && \ 103 mv stamp-poT stamp-po; \ 104 } 105 106 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', 81 107 # otherwise packages like GCC can not be built if only parts of the source 82 108 # have been downloaded. 83 109 84 $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in 85 $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ 86 --add-comments --keyword=_ --keyword=N_ \ 110 # This target rebuilds $(DOMAIN).pot; it is an expensive operation. 111 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. 112 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed 113 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ 114 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ 115 else \ 116 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ 117 fi; \ 118 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ 119 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ 87 120 --files-from=$(srcdir)/POTFILES.in \ 88 && test ! -f $(PACKAGE).po \ 89 || ( rm -f $(srcdir)/$(PACKAGE).pot \ 90 && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) 121 --copyright-holder='$(COPYRIGHT_HOLDER)' \ 122 --msgid-bugs-address="$$msgid_bugs_address" 123 test ! -f $(DOMAIN).po || { \ 124 if test -f $(srcdir)/$(DOMAIN).pot; then \ 125 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ 126 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ 127 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ 128 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ 129 else \ 130 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ 131 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ 132 fi; \ 133 else \ 134 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ 135 fi; \ 136 } 137 138 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at 139 # every "make" invocation, only create it when it is missing. 140 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. 141 $(srcdir)/$(DOMAIN).pot: 142 $(MAKE) $(DOMAIN).pot-update 143 144 # This target rebuilds a PO file if $(DOMAIN).pot has changed. 145 # Note that a PO file is not touched if it doesn't need to be changed. 146 $(POFILES): $(srcdir)/$(DOMAIN).pot 147 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ 148 if test -f "$(srcdir)/$${lang}.po"; then \ 149 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 150 echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ 151 cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ 152 else \ 153 $(MAKE) $${lang}.po-create; \ 154 fi 91 155 92 156 … … 94 158 install-exec: 95 159 install-data: install-data-@USE_NLS@ 96 if test "$(PACKAGE)" = "gettext "; then \160 if test "$(PACKAGE)" = "gettext-tools"; then \ 97 161 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ 98 $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ 99 $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ 162 for file in $(DISTFILES.common) Makevars.template; do \ 163 $(INSTALL_DATA) $(srcdir)/$$file \ 164 $(DESTDIR)$(gettextsrcdir)/$$file; \ 165 done; \ 166 for file in Makevars; do \ 167 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ 168 done; \ 100 169 else \ 101 170 : ; \ … … 107 176 for cat in $$catalogs; do \ 108 177 cat=`basename $$cat`; \ 109 lang=`echo $$cat | sed 's/\.gmo$$//'`; \178 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 110 179 dir=$(localedir)/$$lang/LC_MESSAGES; \ 111 180 $(mkinstalldirs) $(DESTDIR)$$dir; \ 112 if test -r $$cat; then \ 113 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ 114 echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \ 115 else \ 116 $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ 117 echo "installing $(srcdir)/$$cat as" \ 118 "$(DESTDIR)$$dir/$(PACKAGE).mo"; \ 119 fi; \ 181 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ 182 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ 183 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ 184 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ 185 if test -n "$$lc"; then \ 186 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ 187 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ 188 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 189 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 190 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ 191 for file in *; do \ 192 if test -f $$file; then \ 193 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ 194 fi; \ 195 done); \ 196 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 197 else \ 198 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ 199 :; \ 200 else \ 201 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ 202 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 203 fi; \ 204 fi; \ 205 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ 206 ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ 207 ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ 208 cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ 209 echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ 210 fi; \ 211 done; \ 212 done 213 214 install-strip: install 215 216 installdirs: installdirs-exec installdirs-data 217 installdirs-exec: 218 installdirs-data: installdirs-data-@USE_NLS@ 219 if test "$(PACKAGE)" = "gettext-tools"; then \ 220 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ 221 else \ 222 : ; \ 223 fi 224 installdirs-data-no: 225 installdirs-data-yes: 226 $(mkinstalldirs) $(DESTDIR)$(datadir) 227 @catalogs='$(CATALOGS)'; \ 228 for cat in $$catalogs; do \ 229 cat=`basename $$cat`; \ 230 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 231 dir=$(localedir)/$$lang/LC_MESSAGES; \ 232 $(mkinstalldirs) $(DESTDIR)$$dir; \ 233 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ 234 if test -n "$$lc"; then \ 235 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ 236 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ 237 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 238 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 239 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ 240 for file in *; do \ 241 if test -f $$file; then \ 242 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ 243 fi; \ 244 done); \ 245 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 246 else \ 247 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ 248 :; \ 249 else \ 250 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ 251 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 252 fi; \ 253 fi; \ 254 fi; \ 255 done; \ 120 256 done 121 257 … … 123 259 installcheck: 124 260 125 uninstall: 261 uninstall: uninstall-exec uninstall-data 262 uninstall-exec: 263 uninstall-data: uninstall-data-@USE_NLS@ 264 if test "$(PACKAGE)" = "gettext-tools"; then \ 265 for file in $(DISTFILES.common) Makevars.template; do \ 266 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ 267 done; \ 268 else \ 269 : ; \ 270 fi 271 uninstall-data-no: 272 uninstall-data-yes: 126 273 catalogs='$(CATALOGS)'; \ 127 274 for cat in $$catalogs; do \ 128 275 cat=`basename $$cat`; \ 129 lang=`echo $$cat | sed 's/\.gmo$$//'`; \ 130 rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ 276 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 277 for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ 278 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ 279 done; \ 131 280 done 132 if test "$(PACKAGE)" = "gettext"; then \133 rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \134 else \135 : ; \136 fi137 281 138 282 check: all 139 283 140 dvi info tagsTAGS ID:284 info dvi ps pdf html tags TAGS ctags CTAGS ID: 141 285 142 286 mostlyclean: 143 rm -f core core.* *.pox $(PACKAGE).po *.new.po 287 rm -f remove-potcdate.sed 288 rm -f stamp-poT 289 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po 144 290 rm -fr *.o 145 291 … … 152 298 @echo "This command is intended for maintainers to use;" 153 299 @echo "it deletes files that may require special tools to rebuild." 154 rm -f $(GMOFILES)300 rm -f stamp-po $(GMOFILES) 155 301 156 302 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) … … 159 305 @$(MAKE) dist2 160 306 # This is a separate target because 'update-po' must be executed before. 161 dist2: $(DISTFILES)307 dist2: stamp-po $(DISTFILES) 162 308 dists="$(DISTFILES)"; \ 309 if test "$(PACKAGE)" = "gettext-tools"; then \ 310 dists="$$dists Makevars.template"; \ 311 fi; \ 312 if test -f $(srcdir)/$(DOMAIN).pot; then \ 313 dists="$$dists $(DOMAIN).pot stamp-po"; \ 314 fi; \ 315 if test -f $(srcdir)/ChangeLog; then \ 316 dists="$$dists ChangeLog"; \ 317 fi; \ 318 for i in 0 1 2 3 4 5 6 7 8 9; do \ 319 if test -f $(srcdir)/ChangeLog.$$i; then \ 320 dists="$$dists ChangeLog.$$i"; \ 321 fi; \ 322 done; \ 323 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ 163 324 for file in $$dists; do \ 164 if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ 165 cp -p $$dir/$$file $(distdir); \ 166 done 167 168 update-po: Makefile 169 $(MAKE) $(PACKAGE).pot 170 if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \ 171 cd $(srcdir); \ 172 catalogs='$(GMOFILES)'; \ 173 for cat in $$catalogs; do \ 174 cat=`basename $$cat`; \ 175 lang=`echo $$cat | sed 's/\.gmo$$//'`; \ 176 echo "$$lang:"; \ 177 if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \ 178 mv -f $$lang.new.po $$lang.po; \ 325 if test -f $$file; then \ 326 cp -p $$file $(distdir) || exit 1; \ 179 327 else \ 180 echo "msgmerge for $$cat failed!"; \ 181 rm -f $$lang.new.po; \ 328 cp -p $(srcdir)/$$file $(distdir) || exit 1; \ 182 329 fi; \ 183 330 done 331 332 update-po: Makefile 333 $(MAKE) $(DOMAIN).pot-update 334 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) 184 335 $(MAKE) update-gmo 336 337 # General rule for creating PO files. 338 339 .nop.po-create: 340 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ 341 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ 342 exit 1 343 344 # General rule for updating PO files. 345 346 .nop.po-update: 347 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ 348 if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ 349 tmpdir=`pwd`; \ 350 echo "$$lang:"; \ 351 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 352 echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ 353 cd $(srcdir); \ 354 if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ 355 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 356 rm -f $$tmpdir/$$lang.new.po; \ 357 else \ 358 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 359 :; \ 360 else \ 361 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 362 exit 1; \ 363 fi; \ 364 fi; \ 365 else \ 366 echo "msgmerge for $$lang.po failed!" 1>&2; \ 367 rm -f $$tmpdir/$$lang.new.po; \ 368 fi 369 370 $(DUMMYPOFILES): 185 371 186 372 update-gmo: Makefile $(GMOFILES) 187 373 @: 188 374 189 Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in375 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ 190 376 cd $(top_builddir) \ 191 377 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ 192 378 $(SHELL) ./config.status 193 379 380 force: 381 194 382 # Tell versions [3.59,3.63) of GNU make not to export all variables. 195 383 # Otherwise a system limit (for SysV at least) may be exceeded.
