Changeset 183

Show
Ignore:
Timestamp:
07/28/05 02:05:16 (7 years ago)
Author:
kickback
Message:

changes due to running "gettextize --force --copy --intl" version 0.14.5

Files:

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. 
     11 Notes on the Free Translation Project 
     2*************************************** 
     3 
     4Free software is going international!  The Free Translation Project is 
     5a way to get maintainers of free software, translators, and users all 
     6together, so that free software will gradually become able to speak many 
     7languages.  A few packages already provide translations for their 
     8messages. 
    89 
    910   If you found this `ABOUT-NLS' file inside a distribution, you may 
     
    1617explain how users should proceed for getting the programs to use the 
    1718available translations.  They tell how people wanting to contribute and 
    18 work at translations should contact the appropriate team. 
     19work on translations can contact the appropriate team. 
    1920 
    2021   When reporting bugs in the `intl/' directory or bugs which may be 
     
    2324`intl/VERSION' file, in internationalized packages. 
    2425 
    25 Quick configuration advice 
    26 ========================== 
    27  
    28    If you want to exploit the full power of internationalization, you 
     261.1 Quick configuration advice 
     27============================== 
     28 
     29If you want to exploit the full power of internationalization, you 
    2930should configure it using 
    3031 
     
    4647included `libintl'. 
    4748 
    48 INSTALL Matters 
    49 =============== 
    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 to internationalization, predating GNU `gettext'. 
     491.2 INSTALL Matters 
     50=================== 
     51 
     52Some packages are "localizable" when properly installed; the programs 
     53they contain can be made to speak your own native language.  Most such 
     54packages use GNU `gettext'.  Other packages have their own ways to 
     55internationalization, predating GNU `gettext'. 
    5556 
    5657   By default, this package will be installed to allow translation of 
    5758messages.  It will automatically detect whether the system already 
    58 provides the GNU `gettext' functions.  If not, the GNU `gettext' own 
    59 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: 
     59provides the GNU `gettext' functions.  If not, the included GNU 
     60`gettext' library will be used.  This library is wholly contained 
     61within this package, usually in the `intl/' subdirectory, so prior 
     62installation of the GNU `gettext' package is _not_ required. 
     63Installers may use special options at configuration time for changing 
     64the default behaviour.  The commands: 
    6465 
    6566     ./configure --with-included-gettext 
    6667     ./configure --disable-nls 
    6768 
    68 will respectively bypass any pre-existing `gettext' to use the 
     69will, respectively, bypass any pre-existing `gettext' to use the 
    6970internationalizing routines provided within this package, or else, 
    7071_totally_ disable translation of messages. 
     
    7374configure without an option for your new package, `configure' will 
    7475probably detect the previously built and installed `libintl.a' file and 
    75 will decide to use this.  This might be not what is desirable.  You 
    76 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 this 
    78 package is more recent, you should use 
     76will decide to use this.  This might not be desirable.  You should use 
     77the 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 
     79more recent, you should use 
    7980 
    8081     ./configure --with-included-gettext 
     
    8788extensions of the GNU `gettext' library. 
    8889 
    89    Internationalized packages have usually many `po/LL.po' files, where 
     90   Internationalized packages usually have many `po/LL.po' files, where 
    9091LL gives an ISO 639 two-letter code identifying the language.  Unless 
    9192translations have been forbidden at `configure' time by using the 
     
    9697codes, stating which languages are allowed. 
    9798 
    98 Using This Package 
    99 ================== 
    100  
    101    As a user, if your language has been installed for this package, you 
     991.3 Using This Package 
     100====================== 
     101 
     102As a user, if your language has been installed for this package, you 
    102103only have to set the `LANG' environment variable to the appropriate 
    103104`LL_CC' combination.  Here `LL' is an ISO 639 two-letter language code, 
     
    113114example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The 
    114115country code serves to distinguish the dialects. 
     116 
     117   The locale naming convention of `LL_CC', with `LL' denoting the 
     118language and `CC' denoting the country, is the one use on systems based 
     119on GNU libc.  On other systems, some variations of this scheme are 
     120used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of 
     121locales supported by your system for your country by running the command 
     122`locale -a | grep '^LL''. 
    115123 
    116124   Not all programs have translations for all languages.  By default, an 
     
    125133available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. 
    126134 
     135   Special advice for Norwegian users: The language code for Norwegian 
     136bokma*l changed from `no' to `nb' recently (in 2003).  During the 
     137transition period, while some message catalogs for this language are 
     138installed under `nb' and some older ones under `no', it's recommended 
     139for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and 
     140older translations are used. 
     141 
    127142   In the `LANGUAGE' environment variable, but not in the `LANG' 
    128143environment variable, `LL_CC' combinations can be abbreviated as `LL' 
     
    131146(Portuguese as spoken in Portugal) in this context. 
    132147 
    133 Translating Teams 
    134 ================= 
    135  
    136    For the Free Translation Project to be a success, we need interested 
     1481.4 Translating Teams 
     149===================== 
     150 
     151For the Free Translation Project to be a success, we need interested 
    137152people who like their own language and write it well, and who are also 
    138153able to synergize with other translators speaking the same language. 
     
    161176programming skill, here. 
    162177 
    163 Available Packages 
    164 ================== 
    165  
    166    Languages are not equally supported in all packages.  The following 
    167 matrix shows the current state of internationalization, as of September 
    168 2001.  The matrix shows, in regard of each package, for which languages 
    169 PO files have been submitted to translation coordination, with a 
     1781.5 Available Packages 
     179====================== 
     180 
     181Languages are not equally supported in all packages.  The following 
     182matrix shows the current state of internationalization, as of May 2005. 
     183The matrix shows, in regard of each package, for which languages PO 
     184files have been submitted to translation coordination, with a 
    170185translation percentage of at least 50%. 
    171186 
    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 
    289961 
    290962   Some counters in the preceding matrix are higher than the number of 
     
    299971distribution. 
    300972 
    301    If September 2001 seems to be old, you may fetch a more recent copy 
    302 of this `ABOUT-NLS' file on most GNU archive sites.  The most 
    303 up-to-date matrix with full percentage details can be found at 
     973   If May 2005 seems to be old, you may fetch a more recent copy of 
     974this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date 
     975matrix with full percentage details can be found at 
    304976`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. 
    305977 
    306 Using `gettext' in new packages 
    307 =============================== 
    308  
    309    If you are writing a freely available program and want to 
     9781.6 Using `gettext' in new packages 
     979=================================== 
     980 
     981If you are writing a freely available program and want to 
    310982internationalize it you are welcome to use GNU `gettext' in your 
    311983package.  Of course you have to respect the GNU Library General Public 
     
    316988 
    317989   Once the sources are changed appropriately and the setup can handle 
    318 to use of `gettext' the only thing missing are the translations.  The 
     990the use of `gettext' the only thing missing are the translations.  The 
    319991Free Translation Project is also available for packages which are not 
    320992developed inside the GNU project.  Therefore the information given above 
  • sweep/trunk/ChangeLog

    r144 r183  
     12005-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 
    135Fri Apr 30 15:06:10 EST 2004 Conrad Parker <conrad@metadecks.org> 
    236 
  • sweep/trunk/Makefile.am

    r148 r183  
    1313pixmap_DATA = sweep.png 
    1414 
    15 EXTRA_DIST = $(desktop_DATA) $(pkgdata_DATA)  $(pixmap_DATA) \ 
     15EXTRA_DIST = config.rpath mkinstalldirs  $(desktop_DATA) $(pkgdata_DATA)  $(pixmap_DATA) \ 
    1616             sweep.spec README.Solaris README.ALSA README.i18n acconfig.h TODO 
    1717 
  • sweep/trunk/intl/ChangeLog

    r124 r183  
    1 2001-09-13  GNU  <bug-gnu-utils@gnu.org> 
     12005-05-23  GNU  <bug-gnu-gettext@gnu.org> 
    22 
    3         * Version 0.10.40 released. 
     3        * Version 0.14.5 released. 
    44 
  • 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, 2001 Free 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. 
    33# 
    44# This program is free software; you can redistribute it and/or modify it 
     
    1414# You should have received a copy of the GNU Library General Public 
    1515# License along with this program; if not, write to the Free Software 
    16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717# USA. 
    1818 
     
    2525top_srcdir = @top_srcdir@ 
    2626top_builddir = .. 
    27 VPATH = @srcdir@ 
     27VPATH = $(srcdir) 
    2828 
    2929prefix = @prefix@ 
     
    4141INSTALL_DATA = @INSTALL_DATA@ 
    4242MKINSTALLDIRS = @MKINSTALLDIRS@ 
    43 mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` 
     43mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) 
    4444 
    4545l = @INTL_LIBTOOL_SUFFIX_PREFIX@ 
     
    5353 
    5454DEFS = -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@ 
    5660CPPFLAGS = @CPPFLAGS@ 
    5761CFLAGS = @CFLAGS@ 
    5862LDFLAGS = @LDFLAGS@ 
     63LIBS = @LIBS@ 
    5964 
    6065COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) 
    6166 
    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 
     67HEADERS = \ 
     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 
     82SOURCES = \ 
     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 
     108OBJECTS = \ 
     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 
    74133DISTFILES.common = Makefile.in \ 
    75134config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) 
    76135DISTFILES.generated = plural.c 
    77136DISTFILES.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 
     137DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \ 
     138libgnuintl.h_vms Makefile.vms \ 
     139libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc 
     140DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ 
     141COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h 
     142 
     143all: all-@USE_INCLUDED_LIBINTL@ 
     144all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed 
     145all-no: all-no-@BUILD_INCLUDED_LIBINTL@ 
     146all-no-yes: libgnuintl.$la 
     147all-no-no: 
     148 
     149libintl.a libgnuintl.a: $(OBJECTS) 
     150        rm -f $@ 
     151        $(AR) cru $@ $(OBJECTS) 
     152        $(RANLIB) $@ 
     153 
     154libintl.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 
    80161 
    81162# Libtool's library version information for libintl. 
     
    84165# Maintainers of other packages that include the intl directory must *not* 
    85166# change these values. 
    86 LTV_CURRENT=1 
    87 LTV_REVISION=1 
    88 LTV_AGE=0 
     167LTV_CURRENT=7 
     168LTV_REVISION=3 
     169LTV_AGE=4 
    89170 
    90171.SUFFIXES: 
    91172.SUFFIXES: .c .y .o .lo .sin .sed 
     173 
    92174.c.o: 
    93175        $(COMPILE) $< 
    94 .c.lo: 
    95         $(LIBTOOL) --mode=compile $(COMPILE) $< 
    96176 
    97177.y.c: 
     
    99179        rm -f $*.h 
    100180 
    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 
     181bindtextdom.lo: $(srcdir)/bindtextdom.c 
     182        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c 
     183dcgettext.lo: $(srcdir)/dcgettext.c 
     184        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c 
     185dgettext.lo: $(srcdir)/dgettext.c 
     186        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c 
     187gettext.lo: $(srcdir)/gettext.c 
     188        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c 
     189finddomain.lo: $(srcdir)/finddomain.c 
     190        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c 
     191loadmsgcat.lo: $(srcdir)/loadmsgcat.c 
     192        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c 
     193localealias.lo: $(srcdir)/localealias.c 
     194        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c 
     195textdomain.lo: $(srcdir)/textdomain.c 
     196        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c 
     197l10nflist.lo: $(srcdir)/l10nflist.c 
     198        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c 
     199explodename.lo: $(srcdir)/explodename.c 
     200        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c 
     201dcigettext.lo: $(srcdir)/dcigettext.c 
     202        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c 
     203dcngettext.lo: $(srcdir)/dcngettext.c 
     204        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c 
     205dngettext.lo: $(srcdir)/dngettext.c 
     206        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c 
     207ngettext.lo: $(srcdir)/ngettext.c 
     208        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c 
     209plural.lo: $(srcdir)/plural.c 
     210        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c 
     211plural-exp.lo: $(srcdir)/plural-exp.c 
     212        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c 
     213localcharset.lo: $(srcdir)/localcharset.c 
     214        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c 
     215relocatable.lo: $(srcdir)/relocatable.c 
     216        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c 
     217langprefs.lo: $(srcdir)/langprefs.c 
     218        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/langprefs.c 
     219localename.lo: $(srcdir)/localename.c 
     220        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c 
     221log.lo: $(srcdir)/log.c 
     222        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c 
     223printf.lo: $(srcdir)/printf.c 
     224        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c 
     225osdep.lo: $(srcdir)/osdep.c 
     226        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c 
     227intl-compat.lo: $(srcdir)/intl-compat.c 
     228        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c 
     229 
     230ref-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 
     233ref-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 
     237INCLUDES = -I. -I$(srcdir) -I.. 
     238 
     239libgnuintl.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 
    125245 
    126246libintl.h: libgnuintl.h 
    127         cp $(srcdir)/libgnuintl.h libintl.h 
    128  
    129 charset.alias: config.charset 
     247        cp libgnuintl.h libintl.h 
     248 
     249charset.alias: $(srcdir)/config.charset 
    130250        $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ 
    131251        mv t-$@ $@ 
    132252 
    133253check: all 
    134  
    135 # This installation goal is only used in GNU gettext.  Packages which 
    136 # only use the library should use install instead. 
    137254 
    138255# We must not install the libintl.h/libintl.a files if we are on a 
     
    143260install: install-exec install-data 
    144261install-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 \ 
    147264          $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ 
    148265          $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ 
    149266          $(LIBTOOL) --mode=install \ 
    150267            $(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; \ 
    151287        else \ 
    152288          : ; \ 
    153289        fi 
    154290        if test '@USE_INCLUDED_LIBINTL@' = yes; then \ 
    155           $(mkinstalldirs) $(DESTDIR)$(libdir); \ 
     291          test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ 
    156292          temp=$(DESTDIR)$(libdir)/t-charset.alias; \ 
    157293          dest=$(DESTDIR)$(libdir)/charset.alias; \ 
     
    182318        fi 
    183319install-data: all 
    184         if test "$(PACKAGE)" = "gettext"; then \ 
     320        if test "$(PACKAGE)" = "gettext-tools"; then \ 
    185321          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ 
    186322          $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ 
    187323          $(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)"; \ 
    189325          for file in $$dists; do \ 
    190326            $(INSTALL_DATA) $(srcdir)/$$file \ 
     
    206342        fi 
    207343 
     344install-strip: install 
     345 
     346installdirs: 
     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 
    208372# Define this as empty until I found a useful application. 
    209373installcheck: 
    210374 
    211375uninstall: 
    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 \ 
    214378          rm -f $(DESTDIR)$(includedir)/libintl.h; \ 
    215379          $(LIBTOOL) --mode=uninstall \ 
    216380            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; \ 
    217388        else \ 
    218389          : ; \ 
     
    244415          : ; \ 
    245416        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 \ 
    248419            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ 
    249420          done; \ 
     
    252423        fi 
    253424 
    254 info dvi
     425info dvi ps pdf html
    255426 
    256427$(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 
     428bindtextdom.$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 
     429dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h 
     430explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h 
     431dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h 
     432dcigettext.$lo: $(srcdir)/eval-plural.h 
     433localcharset.$lo: $(srcdir)/localcharset.h 
     434localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h 
     435printf.$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 
    259436 
    260437tags: TAGS 
     
    263440        here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) 
    264441 
     442ctags: CTAGS 
     443 
     444CTAGS: $(HEADERS) $(SOURCES) 
     445        here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) 
     446 
    265447id: ID 
    266448 
     
    270452 
    271453mostlyclean: 
    272         rm -f *.a *.la *.o *.lo core core.* 
    273         rm -f libintl.h charset.alias ref-add.sed ref-del.sed 
     454        rm -f *.a *.la *.o *.obj *.lo core core.* 
     455        rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed 
    274456        rm -f -r .libs _libs 
    275457 
     
    278460distclean: clean 
    279461        rm -f Makefile ID TAGS 
    280         if test "$(PACKAGE)" = gettext; then \ 
     462        if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \ 
    281463          rm -f ChangeLog.inst $(DISTFILES.normal); \ 
    282464        else \ 
     
    293475distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) 
    294476dist 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 
     492Makefile: $(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 
    310497 
    311498# 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.10.40 
     1GNU gettext library from gettext-0.14.5 
  • sweep/trunk/intl/bindtextdom.c

    r124 r183  
    11/* Implementation of the bindtextdomain(3) function 
    2    Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. 
    33 
    44   This program is free software; you can redistribute it and/or modify it 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
     
    4646   using libintl.a cannot be linked statically.  */ 
    4747#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 
    5050#endif 
    5151 
     
    5959/* Contains the default location of the message catalogs.  */ 
    6060extern const char _nl_default_dirname[]; 
     61#ifdef _LIBC 
     62extern const char _nl_default_dirname_internal[] attribute_hidden; 
     63#else 
     64# define INTUSE(name) name 
     65#endif 
    6166 
    6267/* List with bindings of specific domains.  */ 
     
    6469 
    6570/* 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
    6772 
    6873 
     
    7883# endif 
    7984#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 
    8989/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP 
    9090   to be used for the DOMAINNAME message catalog. 
     
    9494   modified nor returned.  */ 
    9595static void 
    96 set_binding_values (domainname, dirnamep, codesetp) 
    97      const char *domainname; 
    98      const char **dirnamep; 
    99      const char **codesetp; 
     96set_binding_values (const char *domainname, 
     97                    const char **dirnamep, const char **codesetp) 
    10098{ 
    10199  struct binding *binding; 
     
    147145              if (strcmp (dirname, result) != 0) 
    148146                { 
    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)
    151149                  else 
    152150                    { 
     
    163161                  if (__builtin_expect (result != NULL, 1)) 
    164162                    { 
    165                       if (binding->dirname != _nl_default_dirname
     163                      if (binding->dirname != INTUSE(_nl_default_dirname)
    166164                        free (binding->dirname); 
    167165 
     
    217215      /* Simply return the default values.  */ 
    218216      if (dirnamep) 
    219         *dirnamep = _nl_default_dirname
     217        *dirnamep = INTUSE(_nl_default_dirname)
    220218      if (codesetp) 
    221219        *codesetp = NULL; 
     
    239237          if (dirname == NULL) 
    240238            /* The default value.  */ 
    241             dirname = _nl_default_dirname
     239            dirname = INTUSE(_nl_default_dirname)
    242240          else 
    243241            { 
    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)
    246244              else 
    247245                { 
     
    266264      else 
    267265        /* The default value.  */ 
    268         new_binding->dirname = (char *) _nl_default_dirname
     266        new_binding->dirname = (char *) INTUSE(_nl_default_dirname)
    269267 
    270268      new_binding->codeset_cntr = 0; 
     
    322320        { 
    323321        failed_codeset: 
    324           if (new_binding->dirname != _nl_default_dirname
     322          if (new_binding->dirname != INTUSE(_nl_default_dirname)
    325323            free (new_binding->dirname); 
    326324        failed_dirname: 
     
    344342   in DIRNAME rather than in the system locale data base.  */ 
    345343char * 
    346 BINDTEXTDOMAIN (domainname, dirname) 
    347      const char *domainname; 
    348      const char *dirname; 
     344BINDTEXTDOMAIN (const char *domainname, const char *dirname) 
    349345{ 
    350346  set_binding_values (domainname, &dirname, NULL); 
     
    355351   DOMAINNAME message catalog will be returned.  */ 
    356352char * 
    357 BIND_TEXTDOMAIN_CODESET (domainname, codeset) 
    358      const char *domainname; 
    359      const char *codeset; 
     353BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset) 
    360354{ 
    361355  set_binding_values (domainname, NULL, &codeset); 
  • sweep/trunk/intl/dcgettext.c

    r124 r183  
    11/* Implementation of the dcgettext(3) function. 
    2    Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. 
    33 
    44   This program is free software; you can redistribute it and/or modify it 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
     
    3838# define DCIGETTEXT __dcigettext 
    3939#else 
    40 # define DCGETTEXT dcgettext__ 
    41 # define DCIGETTEXT dcigettext__ 
     40# define DCGETTEXT libintl_dcgettext 
     41# define DCIGETTEXT libintl_dcigettext 
    4242#endif 
    4343 
     
    4545   locale.  */ 
    4646char * 
    47 DCGETTEXT (domainname, msgid, category) 
    48      const char *domainname; 
    49      const char *msgid; 
    50      int category; 
     47DCGETTEXT (const char *domainname, const char *msgid, int category) 
    5148{ 
    5249  return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); 
     
    5552#ifdef _LIBC 
    5653/* Alias for function name in GNU C Library.  */ 
     54INTDEF(__dcgettext) 
    5755weak_alias (__dcgettext, dcgettext); 
    5856#endif 
  • sweep/trunk/intl/dgettext.c

    r124 r183  
    11/* Implementation of the dgettext(3) function. 
    2    Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. 
    33 
    44   This program is free software; you can redistribute it and/or modify it 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
     
    2121#endif 
    2222 
     23#include "gettextP.h" 
     24 
    2325#include <locale.h> 
    2426 
    25 #include "gettextP.h" 
    2627#ifdef _LIBC 
    2728# include <libintl.h> 
     
    3839#ifdef _LIBC 
    3940# define DGETTEXT __dgettext 
    40 # define DCGETTEXT __dcgettext 
     41# define DCGETTEXT INTUSE(__dcgettext) 
    4142#else 
    42 # define DGETTEXT dgettext__ 
    43 # define DCGETTEXT dcgettext__ 
     43# define DGETTEXT libintl_dgettext 
     44# define DCGETTEXT libintl_dcgettext 
    4445#endif 
    4546 
     
    4748   LC_MESSAGES locale.  */ 
    4849char * 
    49 DGETTEXT (domainname, msgid) 
    50      const char *domainname; 
    51      const char *msgid; 
     50DGETTEXT (const char *domainname, const char *msgid) 
    5251{ 
    5352  return DCGETTEXT (domainname, msgid, LC_MESSAGES); 
  • sweep/trunk/intl/explodename.c

    r124 r183  
    1 /* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. 
     1/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc. 
    22   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. 
    33 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
     
    3939 
    4040char * 
    41 _nl_find_language (name) 
    42      const char *name; 
     41_nl_find_language (const char *name) 
    4342{ 
    4443  while (name[0] != '\0' && name[0] != '_' && name[0] != '@' 
     
    5150 
    5251int 
    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) 
    6457{ 
    6558  enum { undecided, xpg, cen } syntax; 
  • sweep/trunk/intl/finddomain.c

    r124 r183  
    11/* Handle list of needed message catalogs 
    2    Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc. 
    33   Written by Ulrich Drepper <drepper@gnu.org>, 1995. 
    44 
     
    1515   You should have received a copy of the GNU Library General Public 
    1616   License along with this program; if not, write to the Free Software 
    17    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     17   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1818   USA.  */ 
    1919 
     
    4848struct loaded_l10nfile * 
    4949internal_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) 
    5552{ 
    5653  struct loaded_l10nfile *retval; 
     
    179176 
    180177#ifdef _LIBC 
    181 static void __attribute__ ((unused)) 
    182 free_mem (void) 
     178libc_freeres_fn (free_mem) 
    183179{ 
    184180  struct loaded_l10nfile *runp = _nl_loaded_domains; 
     
    194190    } 
    195191} 
    196  
    197 text_set_element (__libc_subfreeres, free_mem); 
    198192#endif 
  • sweep/trunk/intl/gettext.c

    r124 r183  
    11/* Implementation of gettext(3) function. 
    2    Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. 
    33 
    44   This program is free software; you can redistribute it and/or modify it 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
     
    4343#ifdef _LIBC 
    4444# define GETTEXT __gettext 
    45 # define DCGETTEXT __dcgettext 
     45# define DCGETTEXT INTUSE(__dcgettext) 
    4646#else 
    47 # define GETTEXT gettext__ 
    48 # define DCGETTEXT dcgettext__ 
     47# define GETTEXT libintl_gettext 
     48# define DCGETTEXT libintl_dcgettext 
    4949#endif 
    5050 
     
    5353   text).  */ 
    5454char * 
    55 GETTEXT (msgid) 
    56      const char *msgid; 
     55GETTEXT (const char *msgid) 
    5756{ 
    5857  return DCGETTEXT (NULL, msgid, LC_MESSAGES); 
  • sweep/trunk/intl/gettextP.h

    r124 r183  
    11/* Header describing internals of libintl library. 
    2    Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc. 
    33   Written by Ulrich Drepper <drepper@cygnus.com>, 1995. 
    44 
     
    1515   You should have received a copy of the GNU Library General Public 
    1616   License along with this program; if not, write to the Free Software 
    17    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     17   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1818   USA.  */ 
    1919 
     
    3333#include "loadinfo.h" 
    3434 
    35 #include "gettext.h"          /* Get nls_uint32.  */ 
     35#include "gmo.h"              /* Get nls_uint32.  */ 
    3636 
    3737/* @@ end of prolog @@ */ 
    38  
    39 #ifndef PARAMS 
    40 # if __STDC__ 
    41 #  define PARAMS(args) args 
    42 # else 
    43 #  define PARAMS(args) () 
    44 # endif 
    45 #endif 
    4638 
    4739#ifndef internal_function 
    4840# define internal_function 
     41#endif 
     42 
     43#ifndef attribute_hidden 
     44# define attribute_hidden 
    4945#endif 
    5046 
     
    7369 
    7470 
    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.  */ 
     72struct 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; 
    10978}; 
    110  
    111 /* This is the data structure to pass information to the parser and get 
    112    the result in a thread-safe way.  */ 
    113 struct parse_args 
    114 { 
    115   const char *cp; 
    116   struct expression *res; 
    117 }; 
    118  
    11979 
    12080/* The representation of an opened message catalog.  */ 
    12181struct loaded_domain 
    12282{ 
     83  /* Pointer to memory containing the .mo file.  */ 
    12384  const char *data; 
     85  /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed.  */ 
    12486  int use_mmap; 
     87  /* Size of mmap()ed memory.  */ 
    12588  size_t mmap_size; 
     89  /* 1 if the .mo file uses a different endianness than this machine.  */ 
    12690  int must_swap; 
     91  /* Pointer to additional malloc()ed memory.  */ 
     92  void *malloced; 
     93 
     94  /* Number of static strings pairs.  */ 
    12795  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.  */ 
    130109  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 
    132115  int codeset_cntr; 
    133116#ifdef _LIBC 
     
    168151extern int _nl_msg_cat_cntr; 
    169152 
    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 
     154const char *_nl_language_preferences_default (void); 
     155const char *_nl_locale_name_posix (int category, const char *categoryname); 
     156const char *_nl_locale_name_default (void); 
     157const char *_nl_locale_name (int category, const char *categoryname); 
     158#endif 
     159 
     160struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale, 
     161                                         const char *__domainname, 
     162                                         struct binding *__domainbinding) 
     163     internal_function; 
     164void _nl_load_domain (struct loaded_l10nfile *__domain, 
     165                      struct binding *__domainbinding) 
     166     internal_function; 
     167void _nl_unload_domain (struct loaded_domain *__domain) 
     168     internal_function; 
     169const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file, 
     170                                  struct loaded_domain *__domain, 
     171                                  struct binding *__domainbinding) 
     172     internal_function; 
     173void _nl_free_domain_conv (struct loaded_domain *__domain) 
     174     internal_function; 
     175 
     176char *_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 
     182extern char *__gettext (const char *__msgid); 
     183extern char *__dgettext (const char *__domainname, const char *__msgid); 
     184extern char *__dcgettext (const char *__domainname, const char *__msgid, 
     185                          int __category); 
     186extern char *__ngettext (const char *__msgid1, const char *__msgid2, 
     187                         unsigned long int __n); 
     188extern char *__dngettext (const char *__domainname, 
     189                          const char *__msgid1, const char *__msgid2, 
     190                          unsigned long int n); 
     191extern char *__dcngettext (const char *__domainname, 
     192                           const char *__msgid1, const char *__msgid2, 
     193                           unsigned long int __n, int __category); 
     194extern char *__dcigettext (const char *__domainname, 
     195                           const char *__msgid1, const char *__msgid2, 
     196                           int __plural, unsigned long int __n, 
     197                           int __category); 
     198extern char *__textdomain (const char *__domainname); 
     199extern char *__bindtextdomain (const char *__domainname, 
     200                               const char *__dirname); 
     201extern 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" 
     210extern char *libintl_dcigettext (const char *__domainname, 
     211                                 const char *__msgid1, const char *__msgid2, 
     212                                 int __plural, unsigned long int __n, 
     213                                 int __category); 
    248214#endif 
    249215 
  • sweep/trunk/intl/hash-string.h

    r124 r183  
    11/* Description of GNU message catalog format: string hashing function. 
    2    Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc. 
    33 
    44   This program is free software; you can redistribute it and/or modify it 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
    1919/* @@ end of prolog @@ */ 
    20  
    21 #ifndef PARAMS 
    22 # if __STDC__ 
    23 #  define PARAMS(Args) Args 
    24 # else 
    25 #  define PARAMS(Args) () 
    26 # endif 
    27 #endif 
    2820 
    2921/* We assume to have `unsigned long int' value with at least 32 bits.  */ 
     
    3426   [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 
    3527   1986, 1987 Bell Telephone Laboratories, Inc.]  */ 
    36 static unsigned long int hash_string PARAMS ((const char *__str_param)); 
    37  
    3828static inline unsigned long int 
    39 hash_string (str_param) 
    40      const char *str_param; 
     29hash_string (const char *str_param) 
    4130{ 
    4231  unsigned long int hval, g; 
     
    4837    { 
    4938      hval <<= 4; 
    50       hval += (unsigned long int) *str++; 
     39      hval += (unsigned char) *str++; 
    5140      g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); 
    5241      if (g != 0) 
  • sweep/trunk/intl/intl-compat.c

    r124 r183  
    11/* intl-compat.c - Stub functions to call gettext functions from GNU gettext 
    22   Library. 
    3    Copyright (C) 1995, 2000, 2001 Software Foundation, Inc. 
     3   Copyright (C) 1995, 2000-2003 Software Foundation, Inc. 
    44 
    55   This program is free software; you can redistribute it and/or modify it 
     
    1515   You should have received a copy of the GNU Library General Public 
    1616   License along with this program; if not, write to the Free Software 
    17    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     17   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1818   USA.  */ 
    1919 
     
    2222#endif 
    2323 
    24 #include "libgnuintl.h" 
    2524#include "gettextP.h" 
    2625 
    2726/* @@ end of prolog @@ */ 
    2827 
    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).  */ 
    7036 
    7137 
     
    8147 
    8248 
     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 
     59DLL_EXPORTED 
    8360char * 
    84 gettext (msgid) 
    85      const char *msgid; 
     61gettext (const char *msgid) 
    8662{ 
    87   return gettext__ (msgid); 
     63  return libintl_gettext (msgid); 
    8864} 
    8965 
    9066 
     67DLL_EXPORTED 
    9168char * 
    92 dgettext (domainname, msgid) 
    93      const char *domainname; 
    94      const char *msgid; 
     69dgettext (const char *domainname, const char *msgid) 
    9570{ 
    96   return dgettext__ (domainname, msgid); 
     71  return libintl_dgettext (domainname, msgid); 
    9772} 
    9873 
    9974 
     75DLL_EXPORTED 
    10076char * 
    101 dcgettext (domainname, msgid, category) 
    102      const char *domainname; 
    103      const char *msgid; 
    104      int category; 
     77dcgettext (const char *domainname, const char *msgid, int category) 
    10578{ 
    106   return dcgettext__ (domainname, msgid, category); 
     79  return libintl_dcgettext (domainname, msgid, category); 
    10780} 
    10881 
    10982 
     83DLL_EXPORTED 
    11084char * 
    111 ngettext (msgid1, msgid2, n) 
    112      const char *msgid1; 
    113      const char *msgid2; 
    114      unsigned long int n; 
     85ngettext (const char *msgid1, const char *msgid2, unsigned long int n) 
    11586{ 
    116   return ngettext__ (msgid1, msgid2, n); 
     87  return libintl_ngettext (msgid1, msgid2, n); 
    11788} 
    11889 
    11990 
     91DLL_EXPORTED 
    12092char * 
    121 dngettext (domainname, msgid1, msgid2, n) 
    122      const char *domainname; 
    123      const char *msgid1; 
    124      const char *msgid2; 
    125      unsigned long int n; 
     93dngettext (const char *domainname, 
     94           const char *msgid1, const char *msgid2, unsigned long int n) 
    12695{ 
    127   return dngettext__ (domainname, msgid1, msgid2, n); 
     96  return libintl_dngettext (domainname, msgid1, msgid2, n); 
    12897} 
    12998 
    13099 
     100DLL_EXPORTED 
    131101char * 
    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; 
     102dcngettext (const char *domainname, 
     103            const char *msgid1, const char *msgid2, unsigned long int n, 
     104            int category) 
    138105{ 
    139   return dcngettext__ (domainname, msgid1, msgid2, n, category); 
     106  return libintl_dcngettext (domainname, msgid1, msgid2, n, category); 
    140107} 
    141108 
    142109 
     110DLL_EXPORTED 
    143111char * 
    144 textdomain (domainname) 
    145      const char *domainname; 
     112textdomain (const char *domainname) 
    146113{ 
    147   return textdomain__ (domainname); 
     114  return libintl_textdomain (domainname); 
    148115} 
    149116 
    150117 
     118DLL_EXPORTED 
    151119char * 
    152 bindtextdomain (domainname, dirname) 
    153      const char *domainname; 
    154      const char *dirname; 
     120bindtextdomain (const char *domainname, const char *dirname) 
    155121{ 
    156   return bindtextdomain__ (domainname, dirname); 
     122  return libintl_bindtextdomain (domainname, dirname); 
    157123} 
    158124 
    159125 
     126DLL_EXPORTED 
    160127char * 
    161 bind_textdomain_codeset (domainname, codeset) 
    162      const char *domainname; 
    163      const char *codeset; 
     128bind_textdomain_codeset (const char *domainname, const char *codeset) 
    164129{ 
    165   return bind_textdomain_codeset__ (domainname, codeset); 
     130  return libintl_bind_textdomain_codeset (domainname, codeset); 
    166131} 
  • sweep/trunk/intl/l10nflist.c

    r124 r183  
    1 /* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. 
     1/* Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. 
    22   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. 
    33 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
     
    2929 
    3030#include <string.h> 
    31 #if !HAVE_STRCHR && !defined _LIBC 
    32 # ifndef strchr 
    33 #  define strchr index 
    34 # endif 
    35 #endif 
    3631 
    3732#if defined _LIBC || defined HAVE_ARGZ_H 
     
    6459#else 
    6560# ifndef HAVE_STPCPY 
    66 static char *stpcpy PARAMS ((char *dest, const char *src)); 
     61static char *stpcpy (char *dest, const char *src); 
    6762# 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]) 
    6881#endif 
    6982 
     
    7285#if !defined _LIBC && !defined HAVE___ARGZ_COUNT 
    7386/* Returns the number of strings in ARGZ.  */ 
    74 static size_t argz_count__ PARAMS ((const char *argz, size_t len)); 
    75  
    7687static size_t 
    77 argz_count__ (argz, len) 
    78      const char *argz; 
    79      size_t len; 
     88argz_count__ (const char *argz, size_t len) 
    8089{ 
    8190  size_t count = 0; 
     
    91100# undef __argz_count 
    92101# 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 
    93106#endif  /* !_LIBC && !HAVE___ARGZ_COUNT */ 
    94107 
     
    96109/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's 
    97110   except the last into the character SEP.  */ 
    98 static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); 
    99  
    100111static void 
    101 argz_stringify__ (argz, len, sep) 
    102      char *argz; 
    103      size_t len; 
    104      int sep; 
     112argz_stringify__ (char *argz, size_t len, int sep) 
    105113{ 
    106114  while (len > 0) 
     
    115123# undef __argz_stringify 
    116124# 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 
    117130#endif  /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ 
    118131 
    119132#if !defined _LIBC && !defined HAVE___ARGZ_NEXT 
    120 static char *argz_next__ PARAMS ((char *argz, size_t argz_len, 
    121                                   const char *entry)); 
    122  
    123133static char * 
    124 argz_next__ (argz, argz_len, entry) 
    125      char *argz; 
    126      size_t argz_len; 
    127      const char *entry; 
     134argz_next__ (char *argz, size_t argz_len, const char *entry) 
    128135{ 
    129136  if (entry) 
     
    146153 
    147154/* Return number of bits set in X.  */ 
    148 static int pop PARAMS ((int x)); 
    149  
    150155static inline int 
    151 pop (x) 
    152      int x; 
     156pop (int x) 
    153157{ 
    154158  /* We assume that no more than 16 bits are used.  */ 
     
    163167  
    164168struct 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) 
    182176{ 
    183177  char *abs_filename; 
    184   struct loaded_l10nfile *last = NULL
     178  struct loaded_l10nfile **lastp
    185179  struct loaded_l10nfile *retval; 
    186180  char *cp; 
     181  size_t dirlist_count; 
    187182  size_t entries; 
    188183  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; 
    189189 
    190190  /* Allocate room for the full file name.  */ 
     
    205205                                      || (mask & CEN_REVISION) != 0) 
    206206                                     ? (1 + ((mask & CEN_SPONSOR) != 0 
    207                                              ? strlen (sponsor) + 1 : 0) 
     207                                             ? strlen (sponsor) : 0) 
    208208                                        + ((mask & CEN_REVISION) != 0 
    209209                                           ? strlen (revision) + 1 : 0)) : 0) 
     
    213213    return NULL; 
    214214 
    215   retval = NULL; 
    216   last = NULL; 
    217  
    218215  /* 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 
    223225  cp = stpcpy (cp, language); 
    224226 
     
    267269  /* Look in list of already loaded domains whether it is already 
    268270     available.  */ 
    269   last = NULL
     271  lastp = l10nfile_list
    270272  for (retval = *l10nfile_list; retval != NULL; retval = retval->next) 
    271273    if (retval->filename != NULL) 
     
    282284          } 
    283285 
    284         last = retval
     286        lastp = &retval->next
    285287      } 
    286288 
     
    291293    } 
    292294 
    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 *))); 
    297303  if (retval == NULL) 
    298304    return NULL; 
    299305 
    300306  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 
    302313                     || ((mask & XPG_CODESET) != 0 
    303314                         && (mask & XPG_NORM_CODESET) != 0)); 
    304315  retval->data = NULL; 
    305316 
    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; 
    316319 
    317320  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) 
    323334    if ((cnt & ~mask) == 0 
    324335        && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) 
    325336        && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) 
    326337      { 
    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 
    332352          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, 
    335355                                  normalized_codeset, modifier, special, 
    336356                                  sponsor, revision, filename, 1); 
     
    346366   freed by the caller.  */ 
    347367const 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) 
    351369{ 
    352370  int len = 0; 
     
    357375 
    358376  for (cnt = 0; cnt < name_len; ++cnt) 
    359     if (isalnum (codeset[cnt])) 
     377    if (isalnum ((unsigned char) codeset[cnt])) 
    360378      { 
    361379        ++len; 
    362380 
    363         if (isalpha (codeset[cnt])) 
     381        if (isalpha ((unsigned char) codeset[cnt])) 
    364382          only_digit = 0; 
    365383      } 
     
    375393 
    376394      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])) 
    380398          *wp++ = codeset[cnt]; 
    381399 
     
    395413#if !_LIBC && !HAVE_STPCPY 
    396414static char * 
    397 stpcpy (dest, src) 
    398      char *dest; 
    399      const char *src; 
     415stpcpy (char *dest, const char *src) 
    400416{ 
    401417  while ((*dest++ = *src++) != '\0') 
  • sweep/trunk/intl/loadinfo.h

    r124 r183  
    1 /* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc. 
     1/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc. 
    22   This file is part of the GNU C Library. 
    33   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. 
     
    1515   You should have received a copy of the GNU Library General Public 
    1616   License along with this program; if not, write to the Free Software 
    17    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     17   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1818   USA.  */ 
    1919 
     
    2121#define _LOADINFO_H     1 
    2222 
    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 */ 
    3034 
    3135#ifndef internal_function 
     
    7882   names.  The return value is dynamically allocated and has to be 
    7983   freed by the caller.  */ 
    80 extern const char *_nl_normalize_codeset PARAMS ((const char *codeset, 
    81                                                  size_t name_len)); 
     84extern const char *_nl_normalize_codeset (const char *codeset, 
     85                                          size_t name_len); 
    8286 
     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.  */ 
    83101extern 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); 
    92109 
     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.  */ 
     113extern const char *_nl_expand_alias (const char *name); 
    93114 
    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 */ 
     133extern 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); 
    95139 
    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.  */ 
     143extern char *_nl_find_language (const char *name); 
    108144 
    109145#endif  /* loadinfo.h */ 
  • sweep/trunk/intl/loadmsgcat.c

    r124 r183  
    11/* Load needed message catalogs. 
    2    Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. 
    33 
    44   This program is free software; you can redistribute it and/or modify it 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
     
    3535 
    3636#ifdef __GNUC__ 
     37# undef  alloca 
    3738# define alloca __builtin_alloca 
    3839# define HAVE_ALLOCA 1 
    3940#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 
    4244# else 
    43 #  ifdef _AIX 
     45#  if defined HAVE_ALLOCA_H || defined _LIBC 
     46#   include <alloca.h> 
     47#  else 
     48#   ifdef _AIX 
    4449 #pragma alloca 
    45 else 
    46 #   ifndef alloca 
     50 else 
     51#    ifndef alloca 
    4752char *alloca (); 
     53#    endif 
    4854#   endif 
    4955#  endif 
     
    7278#endif 
    7379 
    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" 
    7588#include "gettextP.h" 
     89#include "hash-string.h" 
     90#include "plural-exp.h" 
    7691 
    7792#ifdef _LIBC 
    7893# 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") 
    79452#endif 
    80453 
     
    92465#endif 
    93466 
    94 /* Names for the libintl functions are a problem.  They must not clash 
    95    with existing names and they should follow ANSI C.  But this source 
    96    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 _LIBC 
    99 # define PLURAL_PARSE __gettextparse 
    100 #else 
    101 # define PLURAL_PARSE gettextparse__ 
    102 #endif 
    103  
    104467/* For those losing systems which don't have `alloca' we have to add 
    105468   some additional code emulating it.  */ 
     
    128491#endif 
    129492 
     493 
    130494/* We need a sign, whether a new catalog was loaded, which can be associated 
    131495   with all translations.  This is important if the translations are 
     
    133497int _nl_msg_cat_cntr; 
    134498 
    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.  */ 
     501static const char * 
     502get_sysdep_segment_value (const char *name) 
    141503{ 
    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') 
    161511    { 
    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        } 
    164750    } 
    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"; 
    170759#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 
    195762    } 
     763  /* Other system dependent strings are not valid.  */ 
     764  return NULL; 
    196765} 
    197  
    198 # define INIT_GERMANIC_PLURAL() init_germanic_plural () 
    199  
    200 #endif 
    201  
    202766 
    203767/* Initialize the codeset dependent parts of an opened message catalog. 
     
    205769const char * 
    206770internal_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) 
    211774{ 
    212775  /* Find out about the character set the file is encoded with. 
     
    269832                { 
    270833# ifdef _LIBC 
    271                   outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string
     834                  outcharset = _NL_CURRENT (LC_CTYPE, CODESET)
    272835# else 
    273836#  if HAVE_ICONV 
     
    289852# else 
    290853#  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 
    300873#   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); 
    305875#  endif 
    306876# endif 
     
    317887void 
    318888internal_function 
    319 _nl_free_domain_conv (domain) 
    320      struct loaded_domain *domain; 
     889_nl_free_domain_conv (struct loaded_domain *domain) 
    321890{ 
    322891  if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) 
     
    338907void 
    339908internal_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) 
    343911{ 
    344912  int fd; 
     
    352920  int use_mmap = 0; 
    353921  struct loaded_domain *domain; 
     922  int revision; 
    354923  const char *nullentry; 
    355924 
     
    4591028  domain->mmap_size = size; 
    4601029  domain->must_swap = data->magic != _MAGIC; 
     1030  domain->malloced = NULL; 
    4611031 
    4621032  /* 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) 
    4641036    { 
    4651037    case 0: 
     1038    case 1: 
    4661039      domain->nstrings = W (domain->must_swap, data->nstrings); 
    467       domain->orig_tab = (struct string_desc *) 
     1040      domain->orig_tab = (const struct string_desc *) 
    4681041        ((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 *) 
    4701043        ((char *) data + W (domain->must_swap, data->trans_tab_offset)); 
    4711044      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        } 
    4741370      break; 
    4751371    default: 
    4761372      /* This is an invalid revision.  */ 
     1373    invalid: 
     1374      /* This is an invalid .mo file.  */ 
     1375      if (domain->malloced) 
     1376        free (domain->malloced); 
    4771377#ifdef HAVE_MMAP 
    4781378      if (use_mmap) 
     
    4921392 
    4931393  /* 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); 
    5441395} 
    5451396 
     
    5481399void 
    5491400internal_function 
    550 _nl_unload_domain (domain) 
    551      struct loaded_domain *domain; 
     1401_nl_unload_domain (struct loaded_domain *domain) 
    5521402{ 
    553   if (domain->plural != &germanic_plural) 
     1403  if (domain->plural != &__gettext_germanic_plural) 
    5541404    __gettext_free_exp (domain->plural); 
    5551405 
    5561406  _nl_free_domain_conv (domain); 
     1407 
     1408  if (domain->malloced) 
     1409    free (domain->malloced); 
    5571410 
    5581411# ifdef _POSIX_MAPPED_FILES 
  • sweep/trunk/intl/localealias.c

    r124 r183  
    11/* Handle aliases for locale names. 
    2    Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc. 
    33 
    44   This program is free software; you can redistribute it and/or modify it 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
     
    3030#include <ctype.h> 
    3131#include <stdio.h> 
     32#if defined _LIBC || defined HAVE___FSETLOCKING 
     33# include <stdio_ext.h> 
     34#endif 
    3235#include <sys/types.h> 
    3336 
    3437#ifdef __GNUC__ 
     38# undef alloca 
    3539# define alloca __builtin_alloca 
    3640# define HAVE_ALLOCA 1 
    3741#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 
    4045# else 
    41 #  ifdef _AIX 
     46#  if defined HAVE_ALLOCA_H || defined _LIBC 
     47#   include <alloca.h> 
     48#  else 
     49#   ifdef _AIX 
    4250 #pragma alloca 
    43 else 
    44 #   ifndef alloca 
     51 else 
     52#    ifndef alloca 
    4553char *alloca (); 
     54#    endif 
    4655#   endif 
    4756#  endif 
     
    5059 
    5160#include <stdlib.h> 
    52  
    5361#include <string.h> 
    54 #if !HAVE_STRCHR && !defined _LIBC 
    55 # ifndef strchr 
    56 #  define strchr index 
    57 # endif 
    58 #endif 
    5962 
    6063#include "gettextP.h" 
     64 
     65#if ENABLE_RELOCATABLE 
     66# include "relocatable.h" 
     67#else 
     68# define relocate(pathname) (pathname) 
     69#endif 
    6170 
    6271/* @@ end of prolog @@ */ 
     
    7281# endif 
    7382# define HAVE_MEMPCPY   1 
     83# define HAVE___FSETLOCKING     1 
    7484 
    7585/* We need locking here since we can be called from different places.  */ 
     
    8191#ifndef internal_function 
    8292# 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) 
    83102#endif 
    84103 
     
    92111#endif 
    93112 
    94 #if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED 
     113#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED 
    95114# undef fgets 
    96115# define fgets(buf, len, s) fgets_unlocked (buf, len, s) 
    97116#endif 
    98 #if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED 
     117#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED 
    99118# undef feof 
    100119# define feof(s) feof_unlocked (s) 
     
    109128 
    110129 
    111 static char *string_space; 
     130#ifndef _LIBC 
     131# define libc_freeres_ptr(decl) decl 
     132#endif 
     133 
     134libc_freeres_ptr (static char *string_space); 
    112135static size_t string_space_act; 
    113136static size_t string_space_max; 
    114 static struct alias_map *map
     137libc_freeres_ptr (static struct alias_map *map)
    115138static size_t nmap; 
    116139static size_t maxmap; 
     
    118141 
    119142/* Prototypes for local functions.  */ 
    120 static size_t read_alias_file PARAMS ((const char *fname, int fname_len)
     143static size_t read_alias_file (const char *fname, int fname_len
    121144     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)); 
     145static int extend_alias_table (void); 
     146static int alias_compare (const struct alias_map *map1, 
     147                          const struct alias_map *map2); 
    125148 
    126149 
    127150const char * 
    128 _nl_expand_alias (name) 
    129     const char *name; 
     151_nl_expand_alias (const char *name) 
    130152{ 
    131   static const char *locale_alias_path = LOCALE_ALIAS_PATH
     153  static const char *locale_alias_path
    132154  struct alias_map *retval; 
    133155  const char *result = NULL; 
     
    138160#endif 
    139161 
     162  if (locale_alias_path == NULL) 
     163    locale_alias_path = LOCALE_ALIAS_PATH; 
     164 
    140165  do 
    141166    { 
     
    147172        retval = (struct alias_map *) bsearch (&item, map, nmap, 
    148173                                               sizeof (struct alias_map), 
    149                                                (int (*) PARAMS ((const void *, 
    150                                                                 const void *)
     174                                               (int (*) (const void *, 
     175                                                        const void *
    151176                                                ) alias_compare); 
    152177      else 
     
    190215static size_t 
    191216internal_function 
    192 read_alias_file (fname, fname_len) 
    193      const char *fname; 
    194      int fname_len; 
     217read_alias_file (const char *fname, int fname_len) 
    195218{ 
    196219  FILE *fp; 
     
    208231#endif 
    209232 
    210   fp = fopen (full_fname, "r"); 
     233  fp = fopen (relocate (full_fname), "r"); 
    211234  freea (full_fname); 
    212235  if (fp == NULL) 
    213236    return 0; 
    214237 
     238#ifdef HAVE___FSETLOCKING 
     239  /* No threads present.  */ 
     240  __fsetlocking (fp, FSETLOCKING_BYCALLER); 
     241#endif 
     242 
    215243  added = 0; 
    216   while (!feof (fp)) 
     244  while (!FEOF (fp)) 
    217245    { 
    218246      /* It is a reasonable approach to use a fix buffer here because 
     
    220248         b) these fields must be usable as file names and so must not 
    221249            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]; 
    224254      char *alias; 
    225255      char *value; 
    226256      char *cp; 
    227257 
    228       if (fgets (buf, sizeof buf, fp) == NULL) 
     258      if (FGETS (buf, sizeof buf, fp) == NULL) 
    229259        /* EOF reached.  */ 
    230260        break; 
    231261 
    232       /* Possibly not the whole line fits into the buffer.  Ignore 
    233          the rest of the line.  */ 
    234       if (strchr (buf, '\n') == NULL) 
    235         { 
    236           char altbuf[BUFSIZ]; 
    237           do 
    238             if (fgets (altbuf, sizeof altbuf, fp) == NULL) 
    239               /* Make sure the inner loop will be left.  The outer loop 
    240                  will exit at the `feof' test.  */ 
    241               break; 
    242           while (strchr (altbuf, '\n') == NULL); 
    243         } 
    244  
    245262      cp = buf; 
    246263      /* Ignore leading white space.  */ 
    247       while (isspace (cp[0])) 
     264      while (isspace ((unsigned char) cp[0])) 
    248265        ++cp; 
    249266 
     
    252269        { 
    253270          alias = cp++; 
    254           while (cp[0] != '\0' && !isspace (cp[0])) 
     271          while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) 
    255272            ++cp; 
    256273          /* Terminate alias name.  */ 
     
    259276 
    260277          /* Now look for the beginning of the value.  */ 
    261           while (isspace (cp[0])) 
     278          while (isspace ((unsigned char) cp[0])) 
    262279            ++cp; 
    263280 
     
    268285 
    269286              value = cp++; 
    270               while (cp[0] != '\0' && !isspace (cp[0])) 
     287              while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) 
    271288                ++cp; 
    272289              /* Terminate value.  */ 
     
    326343            } 
    327344        } 
     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; 
    328353    } 
    329354 
     
    334359  if (added > 0) 
    335360    qsort (map, nmap, sizeof (struct alias_map), 
    336            (int (*) PARAMS ((const void *, const void *))) alias_compare); 
     361           (int (*) (const void *, const void *)) alias_compare); 
    337362 
    338363  return added; 
     
    359384 
    360385 
    361 #ifdef _LIBC 
    362 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 #endif 
    372  
    373  
    374386static int 
    375 alias_compare (map1, map2) 
    376      const struct alias_map *map1; 
    377      const struct alias_map *map2; 
     387alias_compare (const struct alias_map *map1, const struct alias_map *map2) 
    378388{ 
    379389#if defined _LIBC || defined HAVE_STRCASECMP 
  • sweep/trunk/intl/textdomain.c

    r124 r183  
    11/* Implementation of the textdomain(3) function. 
    2    Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. 
     2   Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. 
    33 
    44   This program is free software; you can redistribute it and/or modify it 
     
    1414   You should have received a copy of the GNU Library General Public 
    1515   License along with this program; if not, write to the Free Software 
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
     16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
    1717   USA.  */ 
    1818 
     
    4545   using libintl.a cannot be linked statically.  */ 
    4646#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 
    4949#endif 
    5050 
     
    5252 
    5353/* Name of the default text domain.  */ 
    54 extern const char _nl_default_default_domain[]
     54extern const char _nl_default_default_domain[] attribute_hidden
    5555 
    5656/* Default text domain in which entries for gettext(3) are to be found.  */ 
    57 extern const char *_nl_current_default_domain
     57extern const char *_nl_current_default_domain attribute_hidden
    5858 
    5959 
     
    6868# endif 
    6969#else 
    70 # define TEXTDOMAIN textdomain__ 
     70# define TEXTDOMAIN libintl_textdomain 
    7171#endif 
    7272 
    7373/* 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
    7575 
    7676/* Set the current default message catalog to DOMAINNAME. 
     
    7878   If DOMAINNAME is "", reset to the default of "messages".  */ 
    7979char * 
    80 TEXTDOMAIN (domainname) 
    81      const char *domainname; 
     80TEXTDOMAIN (const char *domainname) 
    8281{ 
    8382  char *new_domain; 
  • sweep/trunk/m4/Makefile.am

    r148 r183  
    11 
    2 EXTRA_DIST =
     2EXTRA_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
    33        ogg.m4 \ 
    44        speex.m4 \ 
  • sweep/trunk/po/ChangeLog

    r125 r183  
     12005-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 
    1142002-04-22  gettextize  <bug-gnu-utils@gnu.org> 
    215 
  • 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, 2001 by 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> 
    33# 
    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 
    812 
    913PACKAGE = @PACKAGE@ 
    1014VERSION = @VERSION@ 
    11  
    12 # These two variables depend on the location of this directory. 
    13 subdir = po 
    14 top_builddir = .. 
     15PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 
    1516 
    1617SHELL = /bin/sh 
     
    3031INSTALL_DATA = @INSTALL_DATA@ 
    3132MKINSTALLDIRS = @MKINSTALLDIRS@ 
    32 mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` 
    33  
    34 CC = @CC@ 
     33mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) 
     34 
    3535GMSGFMT = @GMSGFMT@ 
    3636MSGFMT = @MSGFMT@ 
    3737XGETTEXT = @XGETTEXT@ 
    3838MSGMERGE = 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) 
     39MSGMERGE_UPDATE = @MSGMERGE@ --update 
     40MSGINIT = msginit 
     41MSGCONV = msgconv 
     42MSGFILTER = msgfilter 
    4743 
    4844POFILES = @POFILES@ 
    4945GMOFILES = @GMOFILES@ 
    50 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ 
    51 $(POFILES) $(GMOFILES) 
     46UPDATEPOFILES = @UPDATEPOFILES@ 
     47DUMMYPOFILES = @DUMMYPOFILES@ 
     48DISTFILES.common = Makefile.in.in remove-potcdate.sin \ 
     49$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) 
     50DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ 
     51$(POFILES) $(GMOFILES) \ 
     52$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) 
    5253 
    5354POTFILES = \ 
     
    5556CATALOGS = @CATALOGS@ 
    5657 
     58# Makevars gets inserted here. (Don't remove this line!) 
     59 
    5760.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 
    6662 
    6763.po.mo: 
    68         $(MSGFMT) -o $@ $< 
     64        @echo "$(MSGFMT) -c -o $@ $<"; \ 
     65        $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ 
    6966 
    7067.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-$@ $@ 
    7376 
    7477 
    7578all: all-@USE_NLS@ 
    7679 
    77 all-yes: $(CATALOGS) 
     80all-yes: stamp-po 
    7881all-no: 
    7982 
    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. 
     97stamp-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', 
    81107# otherwise packages like GCC can not be built if only parts of the source 
    82108# have been downloaded. 
    83109 
    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) \ 
    87120          --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 
    91155 
    92156 
     
    94158install-exec: 
    95159install-data: install-data-@USE_NLS@ 
    96         if test "$(PACKAGE)" = "gettext"; then \ 
     160        if test "$(PACKAGE)" = "gettext-tools"; then \ 
    97161          $(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; \ 
    100169        else \ 
    101170          : ; \ 
     
    107176        for cat in $$catalogs; do \ 
    108177          cat=`basename $$cat`; \ 
    109           lang=`echo $$cat | sed 's/\.gmo$$//'`; \ 
     178          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 
    110179          dir=$(localedir)/$$lang/LC_MESSAGES; \ 
    111180          $(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 
     214install-strip: install 
     215 
     216installdirs: installdirs-exec installdirs-data 
     217installdirs-exec: 
     218installdirs-data: installdirs-data-@USE_NLS@ 
     219        if test "$(PACKAGE)" = "gettext-tools"; then \ 
     220          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ 
     221        else \ 
     222          : ; \ 
     223        fi 
     224installdirs-data-no: 
     225installdirs-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; \ 
    120256        done 
    121257 
     
    123259installcheck: 
    124260 
    125 uninstall: 
     261uninstall: uninstall-exec uninstall-data 
     262uninstall-exec: 
     263uninstall-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 
     271uninstall-data-no: 
     272uninstall-data-yes: 
    126273        catalogs='$(CATALOGS)'; \ 
    127274        for cat in $$catalogs; do \ 
    128275          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; \ 
    131280        done 
    132         if test "$(PACKAGE)" = "gettext"; then \ 
    133           rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ 
    134         else \ 
    135           : ; \ 
    136         fi 
    137281 
    138282check: all 
    139283 
    140 dvi info tags TAGS ID: 
     284info dvi ps pdf html tags TAGS ctags CTAGS ID: 
    141285 
    142286mostlyclean: 
    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 
    144290        rm -fr *.o 
    145291 
     
    152298        @echo "This command is intended for maintainers to use;" 
    153299        @echo "it deletes files that may require special tools to rebuild." 
    154         rm -f $(GMOFILES) 
     300        rm -f stamp-po $(GMOFILES) 
    155301 
    156302distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) 
     
    159305        @$(MAKE) dist2 
    160306# This is a separate target because 'update-po' must be executed before. 
    161 dist2: $(DISTFILES) 
     307dist2: stamp-po $(DISTFILES) 
    162308        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; \ 
    163324        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; \ 
    179327          else \ 
    180             echo "msgmerge for $$cat failed!"; \ 
    181             rm -f $$lang.new.po; \ 
     328            cp -p $(srcdir)/$$file $(distdir) || exit 1; \ 
    182329          fi; \ 
    183330        done 
     331 
     332update-po: Makefile 
     333        $(MAKE) $(DOMAIN).pot-update 
     334        test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) 
    184335        $(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): 
    185371 
    186372update-gmo: Makefile $(GMOFILES) 
    187373        @: 
    188374 
    189 Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in 
     375Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ 
    190376        cd $(top_builddir) \ 
    191377          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ 
    192378               $(SHELL) ./config.status 
    193379 
     380force: 
     381 
    194382# Tell versions [3.59,3.63) of GNU make not to export all variables. 
    195383# Otherwise a system limit (for SysV at least) may be exceeded.