summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ABOUT-NLS279
-rw-r--r--AUTHORS10
-rw-r--r--Admin/gettext.announce88
-rw-r--r--Admin/gettext.spec36
-rw-r--r--Admin/msgfmt.539
-rw-r--r--BUGS7
-rw-r--r--COPYING340
-rw-r--r--ChangeLog997
-rw-r--r--DISCLAIM62
-rw-r--r--INSTALL349
-rw-r--r--Makefile.am35
-rw-r--r--Makefile.in430
-rw-r--r--NEWS179
-rw-r--r--README176
-rw-r--r--README-alpha5
-rw-r--r--README.gemtext435
-rw-r--r--THANKS57
-rw-r--r--TODO11
-rw-r--r--acconfig.h85
-rw-r--r--aclocal.m4989
-rwxr-xr-xconfig.guess1121
-rw-r--r--config.h.in250
-rwxr-xr-xconfig.sub1232
-rwxr-xr-xconfigure4783
-rw-r--r--configure.in83
-rw-r--r--doc/Admin/documentation1692
-rw-r--r--doc/Admin/solaris.msgfmt21
-rw-r--r--doc/ChangeLog426
-rw-r--r--doc/ISO_639180
-rw-r--r--doc/Makefile.am32
-rw-r--r--doc/Makefile.in370
-rw-r--r--doc/gettext.info126
-rw-r--r--doc/gettext.info-1999
-rw-r--r--doc/gettext.info-21127
-rw-r--r--doc/gettext.info-31072
-rw-r--r--doc/gettext.info-41110
-rw-r--r--doc/gettext.info-5852
-rw-r--r--doc/gettext.texi4820
-rw-r--r--doc/iso-apdx.sed19
-rw-r--r--doc/iso-apdx.texi278
-rw-r--r--doc/matrix.texi75
-rwxr-xr-xdoc/mdate-sh92
-rw-r--r--doc/nls.texi254
-rw-r--r--doc/texinfo.tex5302
-rw-r--r--doc/version.texi3
-rw-r--r--gettext.alias12
-rwxr-xr-xinstall-sh251
-rw-r--r--intl/ChangeLog1109
-rw-r--r--intl/Makefile.in220
-rw-r--r--intl/bindtextdom.c363
-rw-r--r--intl/cat-compat.c262
-rw-r--r--intl/cat-id-tbl.c113
-rw-r--r--intl/dcgettext.c59
-rw-r--r--intl/dcigettext.c1093
-rw-r--r--intl/dcngettext.c61
-rw-r--r--intl/dgettext.c60
-rw-r--r--intl/dngettext.c64
-rw-r--r--intl/explodename.c198
-rw-r--r--intl/finddomain.c220
-rw-r--r--intl/gettext.c73
-rw-r--r--intl/gettext.h105
-rw-r--r--intl/gettextP.h196
-rw-r--r--intl/hash-string.h59
-rw-r--r--intl/intl-compat.c76
-rw-r--r--intl/intlh.inst.in111
-rw-r--r--intl/l10nflist.c419
-rw-r--r--intl/libgettext.h182
-rw-r--r--intl/libintl.glibc115
-rw-r--r--intl/linux-msg.sed100
-rw-r--r--intl/loadinfo.h107
-rw-r--r--intl/loadmsgcat.c407
-rw-r--r--intl/localealias.c447
-rw-r--r--intl/ngettext.c77
-rw-r--r--intl/plural.c1218
-rw-r--r--intl/plural.y290
-rw-r--r--intl/po2tbl.sed.in102
-rw-r--r--intl/stamp-cat-id1
-rw-r--r--intl/textdomain.c145
-rw-r--r--intl/tst-gettext.c322
-rw-r--r--intl/xopen-msg.sed104
-rw-r--r--lib/.deps/.P1
-rw-r--r--lib/.deps/alloca.P1
-rw-r--r--lib/.deps/error.P1
-rw-r--r--lib/.deps/fstrcmp.P2
-rw-r--r--lib/.deps/getline.P1
-rw-r--r--lib/.deps/getopt.P1
-rw-r--r--lib/.deps/getopt1.P1
-rw-r--r--lib/.deps/hash.P1
-rw-r--r--lib/.deps/obstack.P1
-rw-r--r--lib/.deps/printf-prs.P1
-rw-r--r--lib/.deps/xgetcwd.P1
-rw-r--r--lib/.deps/xmalloc.P1
-rw-r--r--lib/.deps/xstrdup.P1
-rw-r--r--lib/ChangeLog503
-rw-r--r--lib/Makefile.am36
-rw-r--r--lib/Makefile.in371
-rw-r--r--lib/alloca.c513
-rw-r--r--lib/basename.c41
-rw-r--r--lib/error.c248
-rw-r--r--lib/error.h78
-rw-r--r--lib/fstrcmp.c636
-rw-r--r--lib/fstrcmp.h25
-rw-r--r--lib/getline.c155
-rw-r--r--lib/getline.h36
-rw-r--r--lib/getopt.c1052
-rw-r--r--lib/getopt.h133
-rw-r--r--lib/getopt1.c190
-rw-r--r--lib/hash.c385
-rw-r--r--lib/hash.h53
-rw-r--r--lib/memmove.c108
-rw-r--r--lib/memset.c90
-rw-r--r--lib/obstack.c593
-rw-r--r--lib/obstack.h593
-rw-r--r--lib/pathmax.h53
-rw-r--r--lib/po-mode.el2599
-rw-r--r--lib/printf-parse.h421
-rw-r--r--lib/printf-prs.c120
-rw-r--r--lib/printf.h108
-rw-r--r--lib/stpcpy.c51
-rw-r--r--lib/stpncpy.c101
-rw-r--r--lib/strcasecmp.c77
-rw-r--r--lib/strcspn.c52
-rw-r--r--lib/strncasecmp.c80
-rw-r--r--lib/strstr.c125
-rw-r--r--lib/strtol.c445
-rw-r--r--lib/strtoul.c23
-rw-r--r--lib/system.h139
-rw-r--r--lib/vasprintf.c0
-rw-r--r--lib/xgetcwd.c79
-rw-r--r--lib/xmalloc.c129
-rw-r--r--lib/xstrdup.c42
-rwxr-xr-xltconfig3078
-rw-r--r--ltmain.sh4012
-rw-r--r--m4/ChangeLog30
-rw-r--r--m4/Makefile.am10
-rw-r--r--m4/Makefile.in235
-rw-r--r--m4/README4
-rw-r--r--m4/gettext.m4323
-rw-r--r--m4/isc-posix.m415
-rw-r--r--m4/lcmessage.m419
-rw-r--r--m4/progtest.m447
-rw-r--r--misc/Admin/alias.X11202
-rw-r--r--misc/ChangeLog699
-rw-r--r--misc/Makefile.am31
-rw-r--r--misc/Makefile.in307
-rw-r--r--misc/README-Tcl52
-rwxr-xr-xmisc/combine-sh141
-rwxr-xr-xmisc/elisp-comp42
-rw-r--r--misc/gettext-sh63
-rw-r--r--misc/gettext.perl86
-rw-r--r--misc/gettextize.in177
-rw-r--r--misc/locale.alias52
-rw-r--r--misc/magic.add9
-rw-r--r--misc/po-mode.el2602
-rw-r--r--misc/tcl_gettext.c165
-rwxr-xr-xmissing190
-rwxr-xr-xmkinstalldirs40
-rw-r--r--po/ChangeLog508
-rw-r--r--po/Makefile.in.in249
-rw-r--r--po/POTFILES.in20
-rw-r--r--po/cat-id-tbl.c286
-rw-r--r--po/da.gmobin0 -> 17552 bytes
-rw-r--r--po/da.po819
-rw-r--r--po/de.gmobin0 -> 28231 bytes
-rw-r--r--po/de.po848
-rw-r--r--po/el.gmobin0 -> 29370 bytes
-rw-r--r--po/el.po1151
-rw-r--r--po/es.gmobin0 -> 30188 bytes
-rw-r--r--po/es.po1154
-rw-r--r--po/fr.gmobin0 -> 28057 bytes
-rw-r--r--po/fr.po838
-rw-r--r--po/gettext.pot639
-rw-r--r--po/ko.gmobin0 -> 17185 bytes
-rw-r--r--po/ko.po819
-rw-r--r--po/nl.gmobin0 -> 18044 bytes
-rw-r--r--po/nl.po828
-rw-r--r--po/no.gmobin0 -> 11156 bytes
-rw-r--r--po/no.po812
-rw-r--r--po/no@nynorsk.gmobin0 -> 5472 bytes
-rw-r--r--po/no@nynorsk.po818
-rw-r--r--po/pl.gmobin0 -> 27278 bytes
-rw-r--r--po/pl.po819
-rw-r--r--po/pt.gmobin0 -> 11496 bytes
-rw-r--r--po/pt.po863
-rw-r--r--po/sl.gmobin0 -> 9490 bytes
-rw-r--r--po/sl.po818
-rw-r--r--po/stamp-cat-id1
-rw-r--r--po/sv.gmobin0 -> 17437 bytes
-rw-r--r--po/sv.po827
-rw-r--r--src/ChangeLog1548
-rw-r--r--src/Makefile.am61
-rw-r--r--src/Makefile.in467
-rw-r--r--src/dir-list.c55
-rw-r--r--src/dir-list.h26
-rw-r--r--src/domain.h35
-rw-r--r--src/gettextp.c351
-rw-r--r--src/message.c1520
-rw-r--r--src/message.h149
-rw-r--r--src/msgcmp.c437
-rw-r--r--src/msgcomm.c781
-rw-r--r--src/msgfmt.c973
-rw-r--r--src/msgmerge.c813
-rw-r--r--src/msgunfmt.c411
-rw-r--r--src/open-po.c131
-rw-r--r--src/po-gram-gen.c1026
-rw-r--r--src/po-gram-gen.h17
-rw-r--r--src/po-gram-gen.y172
-rw-r--r--src/po-gram.h28
-rw-r--r--src/po-hash-gen.y276
-rw-r--r--src/po-hash.h25
-rw-r--r--src/po-lex.c549
-rw-r--r--src/po-lex.h83
-rw-r--r--src/po.c253
-rw-r--r--src/po.h129
-rw-r--r--src/str-list.c146
-rw-r--r--src/str-list.h50
-rw-r--r--src/xget-lex.c1319
-rw-r--r--src/xget-lex.h58
-rw-r--r--src/xgettext.c1390
-rwxr-xr-xsrc/ylwrap101
-rw-r--r--stamp-h.in1
-rw-r--r--tests/ChangeLog385
-rw-r--r--tests/Makefile.am43
-rw-r--r--tests/Makefile.in249
-rwxr-xr-xtests/gettext-147
-rwxr-xr-xtests/gettext-255
-rwxr-xr-xtests/msgcmp-134
-rwxr-xr-xtests/msgcmp-253
-rwxr-xr-xtests/msgfmt-180
-rwxr-xr-xtests/msgfmt-289
-rwxr-xr-xtests/msgfmt-339
-rwxr-xr-xtests/msgfmt-451
-rwxr-xr-xtests/msgmerge-181
-rwxr-xr-xtests/msgmerge-252
-rwxr-xr-xtests/msgmerge-392
-rwxr-xr-xtests/msgmerge-465
-rwxr-xr-xtests/msgmerge-583
-rwxr-xr-xtests/msgunfmt-156
-rw-r--r--tests/test.mobin0 -> 496 bytes
-rw-r--r--tests/xg-test1.ok.po235
-rwxr-xr-xtests/xgettext-128
-rwxr-xr-xtests/xgettext-251
-rwxr-xr-xtests/xgettext-328
-rwxr-xr-xtests/xgettext-444
-rwxr-xr-xtests/xgettext-536
-rwxr-xr-xtests/xgettext-638
-rwxr-xr-xtests/xgettext-758
-rwxr-xr-xtests/xgettext-891
-rwxr-xr-xtests/xgettext-997
249 files changed, 91555 insertions, 0 deletions
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 0000000..249a4b5
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,279 @@
+Notes on the Free Translation Project
+*************************************
+
+ Free software is going international! The Free Translation Project
+is a way to get maintainers of free software, translators, and users all
+together, so that will gradually become able to speak many languages.
+A few packages already provide translations for their messages.
+
+ If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site. But you do *not*
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+ Installers will find here some useful hints. These notes also
+explain how users should proceed for getting the programs to use the
+available translations. They tell how people wanting to contribute and
+work at translations should contact the appropriate team.
+
+ When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used. The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+One advise in advance
+=====================
+
+ If you want to exploit the full power of internationalization, you
+should configure it using
+
+ ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed. So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias or message inheritance) as the
+implementation here. It is also not possible to offer this additional
+functionality on top of a `catgets' implementation. Future versions of
+GNU `gettext' will very likely convey even more functionality. So it
+might be a good idea to change to GNU `gettext' as soon as possible.
+
+ So you need not provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+INSTALL Matters
+===============
+
+ Some packages are "localizable" when properly installed; the
+programs they contain can be made to speak your own native language.
+Most such packages use GNU `gettext'. Other packages have their own
+ways to internationalization, predating GNU `gettext'.
+
+ By default, this package will be installed to allow translation of
+messages. It will automatically detect whether the system provides
+usable `catgets' (if using this is selected by the installer) or
+`gettext' functions. If neither is available, the GNU `gettext' own
+library will be used. This library is wholly contained within this
+package, usually in the `intl/' subdirectory, so prior installation of
+the GNU `gettext' package is *not* required. Installers may use
+special options at configuration time for changing the default
+behaviour. The commands:
+
+ ./configure --with-included-gettext
+ ./configure --with-catgets
+ ./configure --disable-nls
+
+will respectively bypass any pre-existing `catgets' or `gettext' to use
+the internationalizing routines provided within this package, enable
+the use of the `catgets' functions (if found on the locale system), or
+else, *totally* disable translation of messages.
+
+ When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this. This might be not what is desirable. You
+should use the more recent version of the GNU `gettext' library. I.e.
+if the file `intl/VERSION' shows that the library which comes with this
+package is more recent, you should use
+
+ ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+ By default the configuration process will not test for the `catgets'
+function and therefore they will not be used. The reasons are already
+given above: the emulation on top of `catgets' cannot provide all the
+extensions provided by the GNU `gettext' library. If you nevertheless
+want to use the `catgets' functions use
+
+ ./configure --with-catgets
+
+to enable the test for `catgets' (this causes no harm if `catgets' is
+not available on your system). If you really select this option we
+would like to hear about the reasons because we cannot think of any
+good one ourself.
+
+ Internationalized packages have usually many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language. Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package. However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+Using This Package
+==================
+
+ As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+ISO 639 `LL' two-letter code prior to using the programs in the
+package. For example, let's suppose that you speak German. At the
+shell prompt, merely execute `setenv LANG de' (in `csh'),
+`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
+can be done from your `.login' or `.profile' file, once and for all.
+
+ An operating system might already offer message localization for
+many of its programs, while other programs have been installed locally
+with the full capabilities of GNU `gettext'. Just using `gettext'
+extended syntax for `LANG' would break proper localization of already
+available operating system programs. In this case, users should set
+both `LANGUAGE' and `LANG' variables in their environment, as programs
+using GNU `gettext' give preference to `LANGUAGE'. For example, some
+Swedish users would rather read translations in German than English for
+when Swedish is not available. This is easily accomplished by setting
+`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
+
+Translating Teams
+=================
+
+ For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list, courtesy of Linux
+International. You may reach your translation team at the address
+`LL@li.org', replacing LL by the two-letter ISO 639 code for your
+language. Language codes are *not* the same as the country codes given
+in ISO 3166. The following translation teams exist, as of August 1998:
+
+ Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
+ Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
+ `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
+ Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
+ `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
+ Swedish `sv', and Turkish `tr'.
+
+For example, you may reach the Chinese translation team by writing to
+`zh@li.org'.
+
+ If you'd like to volunteer to *work* at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is *not* the same as the list itself, it has
+`-request' appended. For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+ subscribe
+
+ Keep in mind that team members are expected to participate
+*actively* in translations, or at solving translational difficulties,
+rather than merely lurking around. If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation@iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+ The English team is special. It works at improving and uniformizing
+the terminology in use. Proven linguistic skill are praised more than
+programming skill, here.
+
+Available Packages
+==================
+
+ Languages are not equally supported in all packages. The following
+matrix shows the current state of internationalization, as of August
+1998. The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination.
+
+ Ready PO files cs da de el en es fi fr it
+ .----------------------------.
+ bash | [] [] |
+ bison | [] [] |
+ clisp | [] [] [] [] |
+ cpio | [] [] [] |
+ diffutils | [] [] [] |
+ enscript | [] [] [] [] |
+ fileutils | [] [] [] [] |
+ findutils | [] [] [] [] |
+ flex | [] [] |
+ gcal | [] [] |
+ gettext | [] [] [] [] [] |
+ grep | [] [] [] [] |
+ hello | [] [] [] [] [] |
+ id-utils | [] [] |
+ indent | [] [] |
+ libc | [] [] [] |
+ m4 | [] [] |
+ make | [] [] [] |
+ music | [] |
+ ptx | [] [] [] |
+ recode | [] [] [] [] |
+ sed | |
+ sh-utils | [] [] [] |
+ sharutils | [] [] [] [] [] |
+ tar | [] [] [] [] |
+ texinfo | [] [] [] |
+ textutils | [] [] [] [] |
+ wdiff | [] [] [] [] |
+ wget | [] [] [] [] |
+ `----------------------------'
+ cs da de el en es fi fr it
+ 7 4 26 4 1 18 1 26 4
+
+ ja ko nl no pl pt ru sl sv
+ .----------------------------.
+ bash | [] | 3
+ bison | [] | 3
+ clisp | | 4
+ cpio | [] [] [] | 6
+ diffutils | [] [] | 5
+ enscript | [] [] | 6
+ fileutils | [] [] [] [] [] [] [] | 11
+ findutils | [] [] [] [] [] | 9
+ flex | [] [] | 4
+ gcal | [] [] [] | 5
+ gettext | [] [] [] [] [] [] [] | 13
+ grep | [] [] [] [] [] [] [] | 11
+ hello | [] [] [] [] [] [] [] | 12
+ id-utils | [] | 3
+ indent | [] [] [] | 5
+ libc | [] [] [] [] [] | 8
+ m4 | [] [] [] [] | 6
+ make | [] [] [] | 6
+ music | [] | 2
+ ptx | [] [] [] [] [] | 8
+ recode | [] [] [] [] [] | 9
+ sed | | 0
+ sh-utils | [] [] [] [] [] | 8
+ sharutils | [] [] | 7
+ tar | [] [] [] [] [] [] [] | 11
+ texinfo | [] | 4
+ textutils | [] [] [] [] [] | 9
+ wdiff | [] [] [] [] | 8
+ wget | [] | 5
+ `----------------------------'
+ 18 teams ja ko nl no pl pt ru sl sv
+ 29 domains 1 12 21 11 19 7 5 7 17 191
+
+ Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect. This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+ For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer. There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+ If August 1998 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.
+
+Using `gettext' in new packages
+===============================
+
+ If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package. Of course the GNU Public License applies to your sources from
+then if you include `gettext' directly in your distribution on but
+since you are writing free software anyway this is no restriction.
+
+ Once the sources are change appropriately and the setup can handle to
+use of `gettext' the only thing missing are the translations. The Free
+Translation Project is also available for packages which are not
+developed inside the GNU project. Therefore the information given above
+applies also for every other Free Software Project. Contact
+`translation@iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..0e495f6
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,10 @@
+Authors of GNU gettext.
+
+The following contributions warranted legal paper exchanges with the
+Free Software Foundation. Also see files ChangeLog and THANKS.
+
+GETTEXT Ulrich Drepper Germany 1968 5/16/95
+Assigns program.
+
+GETTEXT Peter Miller Australia 1960 10/16/95
+Assigns past and future changes.
diff --git a/Admin/gettext.announce b/Admin/gettext.announce
new file mode 100644
index 0000000..1c56758
--- /dev/null
+++ b/Admin/gettext.announce
@@ -0,0 +1,88 @@
+Hi folks,
+
+gettext-0.10 is now avaialble at
+
+ prep.ai.mit.edu:/pub/gnu.
+
+It is a feature release which hopefully can be compiled on all
+interesting system. This package is especially interesting for
+authors and maintainers who want to internationalize their packages,
+but in the presence of GNU sharutils-4.2 it is also useful for the
+common man.
+
+
+For those how don't know about GNU gettext it provides native language
+support in the messages a program prints. GNU gettext provides the
+needed library and tool support to enable the programmers to extend
+their programs and maintain the message catalogs.
+
+It can work in two ways: using the possibly existing catalog handling
+functions of the local system or use the library it provides itself.
+Because there are already a lot of goodies which are only found in GNU
+gettext's library I would always suggest to use the provided
+implementation.
+
+The library code itself will be used in many GNU packages. So
+installing this package and reporting possible problems will also help
+to prevent errors in other packages.
+
+Besides the library, GNU gettext contains programs to maintain message
+catalogs and to produce the needed binary representation. Among the
+maintenance tools is the Emacs PO mode, written by Franc,ois Pinard.
+This mode helps translators to handle the translation files.
+
+For further information, consult the `README' file. The `ABOUT-NLS'
+file gives information about the current state of the
+internationalization effort inside the GNU project. `INSTALL'
+contains the usual information about installation.
+
+In case you find a bug or have problems installing the package, send a
+report to
+ bug-gnu-utils@prep.ai.mi.edu
+
+I want to thanks all those unselfish people helping me to develop
+this software. A list can be found in the `THANKS' file. In case
+I omitted somebody, I beg you not to believe it was intended. Write
+to me, so I may include you in future versions.
+
+
+The next version will not contains many new things. The Makefiles
+will be adjusted to use the new programs but mainly the documentation
+will adjusted. The result will be called gettext-1.0.
+
+
+An excerpt from NEWS:
+
+Version 0.10 - December 1995, by Ulrich Drepper
+
+* implement --shell-script option for gettext program
+
+* implement object-oriented, lazy message handling :-)
+ Consult the manual for more/any information
+
+* implement locale name aliasing, similar to the one used
+ in the X Window System
+
+* support for GNU gettext sources in central place to support
+ use in development environments of other projects
+
+* implement CEN syntax for environment variable values
+
+* msgcmp program to find matches in two .po files
+
+* programs now have exit status != 0 if errors occured
+
+* libintl.a is now selfcontained and can be used without context in
+ other projects
+
+* gettextize now automatically runs config.status
+
+* swedish message catalog
+
+* new options for xgettext: -D/--directory to change in specified directory
+ before processing the input files and -f/--files-from to specify file from
+ which the names of the input files are read.
+ The later option in necessary for large projects such as GNU C Library.
+
+* new programs msgmerge and msgunfmt by Peter Miller. The code of the other
+ programs is now also much cleaner.
diff --git a/Admin/gettext.spec b/Admin/gettext.spec
new file mode 100644
index 0000000..df55ebb
--- /dev/null
+++ b/Admin/gettext.spec
@@ -0,0 +1,36 @@
+Description: Library and tools for message translation.
+Name: gettext
+Version: 0.10.23
+Release: 1
+Copyright: GPL
+Group: Development/Libraries
+Source: ftp://alpha.gnu.ai.mit.edu/gnu/gettext-0.10.23.tar.gz
+Packager: Ulrich Drepper <drepper@cygnus.com>
+Buildprefix: /tmp
+
+%prep
+%setup
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s configure --with-included-gettext --prefix=/usr/local
+make
+
+%install
+make install prefix=$RPM_BUILDPREFIX
+
+%files
+%doc ABOUT-NLS
+%doc NEWS
+
+/usr/local/bin/gettext
+/usr/local/bin/msgcmp
+/usr/local/bin/msgfmt
+/usr/local/bin/msgmerge
+/usr/local/bin/msgunfmt
+/usr/local/bin/xgettext
+/usr/local/include/libintl.h
+/usr/local/lib/libintl.a
+/usr/local/info/gettext*
+/usr/local/share/locale/*/LC_MESSAGES/gettext.mo
+/usr/local/share/gettext
+/usr/local/share/emacs/site-lisp/po-mode.elc
diff --git a/Admin/msgfmt.5 b/Admin/msgfmt.5
new file mode 100644
index 0000000..c8e37f7
--- /dev/null
+++ b/Admin/msgfmt.5
@@ -0,0 +1,39 @@
+'.\" Copyright (C) 1995 Free Software Foundation
+'.\" This file is part of GNU C Library.
+'.\"
+'.\" Author: Ulrich Drepper
+'.\"
+.TH MSGFMT 5 "GNU C Library" "FSF"
+.SH NAME
+msgfmt \- format of protable object files and message object files
+.SH DESCRIPTION
+The
+.IR msgfmt
+program from a set of portable object files another set of files, which are
+machine dependend coded. The special version for GNU msgfmt is
+carefully designed to be readable in whatever byte order.
+.SH Input file format
+(Description of input file format.)
+.SH Output file format
+The message object files consist of three parts:
+.nf
+ 1. Header with magic number etc.
+ 2. Table with offsets to data part.
+ 3. Data part with all the strings.
+.fi
+.PP
+.BR Header.
+The header consists of two 32-bit integer. The first is a magic number whose
+value is
+.B 0x950412DE.
+When the object file is used and the magic number has the reverse byte order
+one can still use it. Only all following multi-byte integers must be
+changed in byte order.
+.PP
+The second integer gives the number entries with
+.B unique
+hash values. The hash value has to be computed by the same function as in
+.I msgfmt
+itself.
+.BR Offsettable.
+
diff --git a/BUGS b/BUGS
new file mode 100644
index 0000000..24cd767
--- /dev/null
+++ b/BUGS
@@ -0,0 +1,7 @@
+List of known bugs and limitations:
+
+- getting the string for `dcgettext' or `dgettext' fails if the first
+ argument is some different than a list of identifiers or strings.
+
+- the C code parser currently does not know anything about macro. I.e.
+ keyword with translations in the macro text are not found.
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..60549be
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..cd344d8
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,997 @@
+2000-05-06 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Comment out ACLOCAL_AMFLAGS definition. The files
+ come with automake and therefore the -I will cause redefinitions.
+
+ * acconfig.h: Define HAVE_BASENAME if glibc is used.
+
+1998-04-30 23:20 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Remove commands in AC_OUTPUT. Moved into
+ AM_GNU_GETTEXT macro in m4/gettext.m4.
+
+ * configure.in: Bump version number to 0.10.35.
+
+1998-04-28 16:07 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Bump version number to 0.10.34.
+ Don't test for basename function.
+
+1998-04-27 20:36 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Require version 1.3.
+ (ACLOCAL_AMFLAGS): New variable, set to -I m4.
+ (aclocaldir): Definition removed.
+ (gettextsrc_DATA): New variable, set to ABOUT_NLS.
+
+ * configure.in: Bump version number to 0.10.33.
+ Define INCLUDE_LOCALE_H in gettext.m4. Remove AC_LINK_FILES line,
+ can now be in gettext.m4. Rewrite also m4/Makefile.
+
+1997-09-06 01:11 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Bump version number to 0.10.32.
+
+1997-09-05 05:44 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (ALL_LINGUAS): Add da.
+
+1997-08-21 15:02 Ulrich Drepper <drepper@cygnus.com>
+
+ * progtest.m4: Change copyright.
+ * lcmessage.m4: Change copyright.
+ * gettext.m4: Change copyright.
+
+1997-08-19 03:20 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Bump version number to 0.10.31.
+
+1997-08-18 13:47 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * configure.in (ACLOCAL_VERSION): Do not use nested \(..\) with sed.
+
+1997-08-15 03:04 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump version number to 0.10.30.
+
+ * acconfig.h: Change DEFAULT_ALIGNMENT to DEFAULT_OUTPUT_ALIGNMENT
+ to avoid clash with macro with same name in obstack.c.
+ Reported by Akim Demaille <demaille@inf.enst.fr>.
+
+1997-08-15 12:40 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.29.
+
+1997-08-01 15:47 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Remove obstack test.
+ Don't always rewrite po/Makefile.in, only if in CONFIG_FILES.
+
+ * Makefile.am (EXTRA_DIST): Add README.gemtext.
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Require version 1.2.
+
+1997-05-29 12:44 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.m4: Don't use INTLDEPS="../intl/libintl.a" which forces
+ a to use only one level of subdirs. Use $(top_builddir)/intl
+ instead.
+ Patch by Akim Demaille <demaille@inf.enst.fr>.
+
+1997-05-01 02:26 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.28.
+
+ * gettext.m4: Check for sys/param.h header.
+ Patch by Bruno Haible <haible@ilog.fr>.
+
+ * gettext.m4: Be safe and call test with quoted arguments and
+ explicit -n option.
+ Patch by Bruno Haible <haible@ilog.fr>.
+
+ * gettext.m4: Require AC_PROG_RANLIB.
+ Reported by Tom Tromey <tromey@cygnus.com>.
+
+ * gettext.m4: Remove POTFILES before generating it.
+ Patch by Jim Meyering <meyering@eng.ascend.com>.
+
+Wed Dec 4 00:36:11 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (EXTRA_DIST): Remove @DIST-ALPHA@.
+
+Tue Dec 3 23:55:43 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Make sure aclocaldir gets substituted.
+
+Tue Dec 3 19:38:41 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (aclocal_DATA): Install aclocal macros for gettext.
+
+ * configure.in: Bump version number to 0.10.26.
+
+Fri Nov 22 22:57:48 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (EXTRA_DIST): Add gettext.m4, lcmessage.m4, and
+ progtest.m4.
+ Reported by Tom Tromey.
+
+Thu Nov 21 23:07:20 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Use AM_INIT_AUTOMAKE. Rename various tests to
+ official AM_*. Write tests/Makefile.
+
+ * aclocal.m4: Removed. The test are now in separate files.
+ * gettext.m4, progtext.m4, lcmessage.m4: New files.
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1.
+ (MAINT_CHARSET): Latin 1 is used here.
+ (gettextdemodir): Removed.
+ (gettextdemo_DATA): Removed.
+
+Fri Sep 20 12:41:23 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (ALL_LINGUAS): Add pt.
+
+Wed Sep 18 17:55:23 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (SUBDIRS): Change checks to tests.
+
+Sat Aug 31 14:19:04 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.25.
+
+Sat Aug 31 04:50:13 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Add test for error which is part of GNU libc.
+
+ * aclocal.m4: Check for gettext in libc. Necessary for GNU libc.
+
+Tue Aug 27 04:05:19 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (ALL_LINGUAS): Add es.
+
+Sun Aug 18 18:49:34 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Use AM_PROG_INSTALL instead of fp_PROG_INSTALL.
+
+ * aclocal.m4 (fp_PROG_INSTALL): Rename to AM_PROG_INSTALL.
+
+Fri Jul 19 12:18:55 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Don't use NULL in check for obstack.
+
+Tue Jul 16 01:51:47 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * aclocal.m4: Correct text for --with-included-gettext option.
+ Patch by François Pinard.
+
+Sun Jul 14 01:16:19 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.24.
+
+Sat Jul 6 01:49:26 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.23.
+
+Tue Jul 2 16:42:20 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (ALL_LINGUAS): Add nl.
+ Add AC_PROG_MKINSTALLDIRS test.
+ Set AC_PREREQ to 2.99 since no official autoconf has the
+ bugs fixed.
+
+ * aclocal.m4: Fix check for obsolete xgettext implementation.
+ Patch by Marcus Daniels.
+
+Sat Jun 22 04:25:23 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * aclocal.m4: Define MKINSTALLDIRS.
+
+ * configure.in (VERSION): Bump to 0.10.22.
+
+Wed Jun 19 01:26:09 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (AC_REPLACE_FUNCS): Add stpncpy.
+
+ * configure.in (VERSION): Bump to 0.10.21.
+
+ * configure.in (AC_REPLACE_FUNCS): Add strncasecmp.
+
+Tue Jun 18 15:11:01 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * acconfig.h (PAGE_WIDTH): Define to 79. This allows even in
+ Emacs nice looking lines.
+
+ * aclocal.m4 (md_PATH_PROG): remove macro.
+ (ud_PATH_PROG_WITH_TEST): New macro. Similar to AC_PATH_PROG, only
+ that an additional, user-given test is performed before a program
+ is accepted.
+
+ Rewrite all tests for msgfmt and xgettext to use
+ ud_PATH_PROG_WITH_TEST to make sure no XView versions are used.
+
+ * configure.in (ACLOCAL_VERSION): Determine version number in
+ aclocal.m4 file which is used in misc/gettextize.
+ (VERSION): Bump to 0.10.20.
+
+Fri Jun 14 04:07:10 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.19.
+
+Thu Jun 13 15:19:45 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.18.
+
+Tue Jun 11 15:02:49 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (ALL_LINGUAS): Add `sl' for Slowenian.
+
+ * Makefile.am (EXTRA_DIST): Add DISCLAIM.
+ Reported by François Pinard.
+
+Sun Jun 9 12:46:31 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (ALL_LINGUAS): Do not write intlh.inst.in, but
+ intlh.inst. Reported by Marcus Daniels.
+
+Fri Jun 7 01:51:57 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.17.
+
+Thu Jun 6 01:55:47 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * aclocal.m4: Define USE_INCLUDED_LIBINTL in case we need the code
+ from the intl/ subdir.
+
+ * configure.in: Undo patch from Wed Jun 5 00:10:36 1996. We do
+ need intlh.inst.
+
+ * aclocal.m4: Remove definition of INTLSUB. Add definition of
+ GT_NO and GT_YES (needed in intl/Makefile.in).
+
+Wed Jun 5 00:10:36 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.16.
+
+ * configure.in: Don't write intlh.inst.
+
+ * configure.in (VERSION): Bump to 0.10.15.
+
+Tue Jun 4 00:10:25 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Rewrite intl/intlh.inst.in depending on whether
+ <locale.h> is available or not.
+ Reported by Peter Miller.
+
+ * aclocal.m4 (ud_WITH_NLS): Using `AC_CHECK_LIB(intl, main)' is
+ not useful. Use `AC_CHECK_LIB(intl, bindtextdomain)' instead.
+ Patch by Uwe Ohse.
+
+ * configure.in (AC_REPLACE_GNU_GETOPT): Removed. We don't need
+ this because the getopt source itself knows when it can be
+ omitted.
+
+Mon Jun 3 00:04:55 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Don't need this anymore.
+ The getopt sources should recognize when the getopt is available
+ in the library.
+
+ * configure.in (VERSION): Bump to 0.10.14.
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Add variable to control Automake
+ behaviour. Thanks, Tom.
+
+ * configure.in: Check for __argz_count, __argz_stringify, and
+ __argz_next in aclocal.m4.
+ * aclocal.m4: Add above checks.
+
+ * aclocal.m4: Fix typo in --with-included-gettext handling.
+
+Sun Jun 2 01:50:03 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * aclocal.m4 (ud_WITH_NLS): If used in gettext always define
+ USE_NLS to yes.
+
+ * configure.in: Add AC_ARG_PROGRAM. Don't write tupdate because
+ it does not exist anymore.
+
+Sat Jun 1 03:18:15 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in (VERSION): Bump to 0.10.13. Remove check for Perl.
+
+ * configure.in: Add the test for __argz_next.
+
+ * configure.in: We don't want to replace the __argz_* function,
+ just check.
+
+ * configure.in: Add __argz_count and __argz_stringify to
+ AC_CHECK_FUNC list.
+
+ * aclocal.m4 (ud_WITH_NLS): Change command line option
+ `--with-gnu-gettext' to `--with-included-gettext'. The former was
+ misleading because this option really means to ignore a possibly
+ installed GNU libintl.
+
+Sun May 26 03:09:43 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (ABOUT-NLS): Don't cd to doc/ dir. Use -I option of
+ makeinfo instead. Patch by Tran Huu Da <tranhu@IRO.UMontreal.CA>.
+
+Sat May 11 11:40:17 1996 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: Move INSTOBJECT initialization out of recently
+ introduced AC_TRY_LINK macro. Reported by Jim Meyering.
+
+Sat May 11 00:31:40 1996 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: Check whether locally available libintl is GNU
+ gettext library. In this case we use .gmo files and share/ as
+ datadir.
+
+Wed Apr 24 23:49:29 1996 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro by Jim Meyering.
+ Test for GNU's getopt implementation.
+
+ * configure.in: Use AC_REPLACE_GNU_GETOPT.
+
+Thu Apr 4 23:35:56 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (ABOUT-NLS): Adapt rule for using matrix.texi.
+
+Thu Apr 4 01:58:14 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.10.12.
+
+Tue Apr 2 18:55:50 1996 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: Test whether found xgettext program is really GNU
+ xgettext. Else ignore it.
+
+ * Makefile.in (all): Do all-gettext-recursive instead of
+ all-recursive. We need a special all goal in intl/ because we
+ always have to build libintl.a.
+
+Tue Apr 2 17:34:55 1996 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: Major change!!! By default the catgets emulation is
+ *not* selected anymore. The installer explicitely has to select
+ --with-catgets. Looking at all the nice features GNU gettext and
+ which cannot be emulated portably using the catgets interface, it
+ became unreasonable to stay with the old default.
+
+Tue Apr 2 03:20:19 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.10.11.
+
+Mon Apr 1 03:37:08 1996 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (md_PATH_PROG): Correct quotation in message.
+ Reported by Tom Tromey.
+
+Thu Mar 28 23:03:01 1996 Karl Eichwalder <ke@ke.central.de>
+
+ * Makefile.in (datadir): Define from @datadir@.
+ (gettextsrcdir): Define using $(datadir).
+
+Thu Mar 28 13:52:14 1996 Marcus Daniels <marcus@sysc.pdx.edu>
+
+ * aclocal.m4: Initialize CATOBJEXT.
+
+Wed Mar 27 03:21:24 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.10.10.
+
+Mon Mar 25 11:20:09 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.10.9.
+
+ * acconfig.h (PAGE_WIDTH): Set to reasonable value 78.
+
+Mon Mar 25 01:24:12 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in: Check for strstr() functions and add to @LIBOBJS@
+ if necessary.
+
+Sun Mar 24 17:37:29 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.10.8.
+
+Sat Mar 23 02:49:04 1996 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: Remove trailing empty lines.
+ (md_PATH_PROG): Move near to other definitions necessary for
+ internationalized packages.
+
+Fri Mar 1 15:04:38 1996 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: Reorganized tests a bit: - don't look for libi.a
+ when test for gettext() functions - before looking for libintl.a
+ look for libintl.h
+
+ * configure.in (VERSION): Bump to 0.10.7.
+
+Thu Feb 29 23:43:55 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.10.6.
+
+Thu Feb 15 04:40:53 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.10.5.
+
+ * aclocal.m4 (nls_cv_use_nls): Rename to `USE_NLS' and substitute
+ in Makefiles.
+
+ * Makefile.in (SUBDIRS): Always run through `po'.
+
+Wed Feb 14 01:56:43 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): BUMP to 0.10.4.
+
+Mon Feb 12 02:21:18 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.10.3.
+
+Sat Feb 10 18:21:24 1996 Ulrich Drepper <drepper@myware>
+
+ * configure.in (ALL_LINGUAS): Add pl.
+
+Thu Jan 4 12:05:01 1996 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (ud_GNU_GETTEXT): Require AC_ISC_POSIX.
+
+Thu Jan 4 11:38:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * aclocal.m4 (ud_WITH_NLS): Fix typo.
+
+Wed Jan 3 20:53:53 1996 G\vran Uddeborg <gvran@uddeborg.pp.se>
+
+ * configure.in: Add AC_ISC_POSIX test.
+
+Sat Dec 30 15:27:54 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (INTLSUB): We don't have to process it always.
+
+Fri Dec 29 21:14:14 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (stamp-h): Remove file before touching.
+
+Fri Dec 29 16:38:32 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump version to 0.10.2.
+
+Sun Dec 24 14:27:15 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (ALL_LINGUAS): Add ko.
+
+Tue Dec 19 22:05:22 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (stamp-h, Makefile, config.status): Explicitly use
+ $(SHELL) for running shell scripts.
+
+Fri Dec 15 17:25:46 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: Clear nls_cv_header_intl and nls_cv_header_libgt to
+ prevent using wrong values from cache. Reported by Andreas
+ Schwab.
+
+Sat Dec 9 18:36:42 1995 Ulrich Drepper <drepper@myware>
+
+ * acconfig.h: Use PARAMS instead of __P. Suggested by Roland
+ McGrath.
+
+Sat Dec 9 12:22:38 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (distclean-local): Add `intl/VERSION' and remove
+ `tupdate.perl'.
+
+Fri Dec 8 01:20:28 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.10.1.
+
+Wed Dec 6 16:03:58 1995 ghazi@caip.rutgers.edu <Kaveh R. Ghazi>
+
+ * aclocal.m4 (md_TYPE_PTRDIFF_T): Fix check.
+
+Mon Dec 4 01:01:16 1995 Ulrich Drepper <drepper@myware>
+
+ * acconfig.h (PAGE__WIDTH): Because tupdate does not know about
+ breaking lines after PAGE_WIDTH characters it is turned off for
+ now. When msgmerge will be used it will be enabled again.
+
+ * configure.in (VERSION): Bump to 0.10.
+
+Sun Dec 3 02:22:00 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): New file BUGS.
+
+Sat Dec 2 03:17:10 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in: Add handling of README-alpha file. If current
+ version is a test release we ship this file. Inspired by Jim
+ Meyering configure.in.
+
+ * Makefile.in (DISTFILES): Add @DIST_ALPHA@.
+
+Tue Nov 21 02:27:48 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Make recursion loop aware of Make's -k option.
+ Kudos to Jim Meyering.
+
+ * Makefile.in (DISTFILES): Add AUTHORS.
+
+Mon Nov 20 20:15:12 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.9.14.
+
+Sat Nov 18 16:38:11 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in, aclocal.m4: Fix typo.
+
+ * aclocal.m4, configure.in:
+ Now requires autoconf-2.5. Use new macro AC_CACHE_CHECK.
+
+Thu Nov 16 21:16:44 1995 Ulrich Drepper <drepper@myware>
+
+ * acconfig.h (PAGE_WIDTH): Add definition.
+
+Sat Nov 11 17:52:03 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.9.13.
+
+Thu Nov 9 00:29:28 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (AC_CHECK_FUNCS): Add getcwd.
+
+Tue Nov 7 13:45:47 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: Don't prepend $INTLDEPS to $LIBS.
+
+ * configure.in (VERSION): Bump to 0.9.12.
+
+ * aclocal.m4 (ud_WITH_NLS):
+ Set LIBS to correct value and filter out -intl if necessary.
+
+ * Makefile.in (ABOUT-NLS): Forgot to continue line.
+
+ * aclocal.m4: Move ud_PATH_LISPDIR out of NLS region.
+
+ * Makefile.in (uninstall-local):
+ Remove root-ABOUT-NLS instead of root-NLS.
+
+Mon Nov 6 17:27:52 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Be consistent with rm and &&.
+
+ * Makefile.in (ABOUT-NLS): Place file in $(srcdir).
+
+ * Makefile.in: Eliminate duplicate all-recursive rule.
+
+ * Makefile.in:
+ Renamed README.NLS to ABOUT-NLS. Never again MS-DOG names!
+
+ * Makefile.in: Some more cleanups by Franc,ois Pinard.
+
+ * configure.in (VERSION): Bump to 0.9.11.
+
+ * aclocal.m4 (ud_GNU_GETTEXT):
+ Always create intl/ dir if it does not exist.
+
+ * aclocal.m4 (ud_PATH_LISP):
+ Prefer share/ directory to lib/ directory if both exist.
+
+ * Makefile.in (all):
+ Now a local call. Depends on all-local and all-recursive.
+ (all-local): Depend on README.NLS.
+
+ * Makefile.in (install-src-local):
+ Add README.NLS as dependency. Patch by Franc,ois Pinard.
+
+Mon Nov 6 00:46:48 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (md_TYPE_PTRDIFF_T): Cache result.
+
+ * configure.in (VERSION): Bump to 0.9.10.
+
+Sun Nov 5 21:58:34 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.9.9.
+
+Sun Nov 5 21:52:22 1995 Ulrich Drepper <drepper@myware>
+
+ * README: Move advise for using GNU getetxt to intl/nls.texi.
+
+ * aclocal.m4:
+ Franc,ois reported that po2tbl.sed is not always generated.
+
+ * README: Some typos fixed by Franc,ois Pinard.
+
+Sun Nov 5 19:39:05 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist-gettext):
+ Make synonym for dist. Recursive goal is now named
+ dist-gettext.
+
+ * configure.in (VERSION): Bump to 0.9.8.
+
+ * Makefile.in: Rename NLS to README.NLS.
+ Add rule for automatical generation of README.NLS.
+
+Sun Nov 5 11:36:53 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Suppress error message when ln failed.
+ Get files from $(srcdir) explicitly.
+
+Sat Nov 4 23:37:38 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4:
+ Fix typo: "Do not you" -> "Do not use". Reported by Tom Tromey.
+
+Fri Nov 3 00:03:34 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Add TODO.
+
+Wed Nov 1 11:38:30 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in:
+ Remove AC_FUNC_MMAP. This is tested in the intl/ specific part.
+
+ * configure.in (VERSION): Bump to 0.9.7.
+
+Sun Oct 29 12:02:01 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in: Replace AC_INSTALL_PROG with fp_INSTALL_PROG.
+
+ * aclocal.m4 (fp_PROG_INSTALL): Replace shell comments (#) by m4
+ comments (dnl). This is necessary because autoconf would else
+ find the AC_PROG_INSTALL word in the comment and report a missing
+ definition.
+
+ * aclocal.m4: Use Franc,ois' fp_PROG_INSTALL macro.
+
+Sat Oct 28 23:28:11 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4:
+ Test for dcgettext function when gettext is found in C library. This
+ works around the missing function in Solaris 2.3.
+
+ * configure.in (VERSION): Bump to 0.9.6.
+
+Sat Oct 28 14:02:28 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.9.5.
+
+Fri Oct 27 02:26:10 1995 Ulrich Drepper <drepper@myware>
+
+ * THANKS: Fix typo.
+
+ * configure.in (ALL_LINGUAS): Add sv.
+
+ * aclocal.m4:
+ Use single quote where possible. Reported by Christian von Roques.
+
+ * Makefile.in (DISTFILES): Add DISCLAIM.
+
+Tue Sep 26 00:53:48 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (md_TYPE_PTRDIFF_T):
+ Add this macro for type in obstack.h.
+
+ * aclocal.m4: Handling of AC_FD_MSG is now correct in md_PATH_PROG.
+
+ * aclocal.m4: Correct last changes. Some newline were missing.
+
+Mon Sep 25 22:17:09 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (md_PATH_PROG):
+ Use this new macro instead of AC_PATH_PROG for msgfmt and
+ xgettext program. This warns about uses of OpenWin versions (Wrgg).
+ (md_TYPE_PTRDIFF_T): New test. Sun's compiler does not like the
+ definition in obstack.h.
+ All provided by Marcus Daniels.
+
+ * acconfig.h (HAVE_PTRDIFF_T):
+ Add symbol because Sun's compiler cannot live with
+ the definition in obstack.h. Reported by Marcus Daniels.
+
+Sat Sep 23 21:17:53 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (stpcpy): One argument in test can be empty.
+ Reported by Nelson Beebe.
+
+Thu Sep 21 18:05:41 1995 Ulrich Drepper <drepper@myware>
+
+ * acconfig.h (HAVE_STPCPY): Define for autoconf work around.
+
+ * aclocal.m4: Some strange things with autoconf-2.4.2: If a
+ function is tested once in AC_REPLACE_FUNCS and later with
+ AC_CHECK_FUNCS the second definition does not define the symbol in
+ the header. Work around this.
+
+Wed Sep 20 22:36:04 1995 Ulrich Drepper <drepper@myware>
+
+ * acconfig.h, configure.in: Remove unneeded STD_INC_PATH definition.
+
+Tue Sep 19 00:09:23 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.9.4.
+
+Sun Sep 17 17:37:45 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (AC_PROG_YACC):
+ Add check. Is now needed for msgfmt program.
+
+Thu Sep 7 00:19:11 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Don't use long --gzip option for tar.
+
+Tue Aug 29 23:37:44 1995 Ulrich Drepper <drepper@myware>
+
+ * acconfig.h: Remove comment followinf #endif. We now use
+ indentation. Reported by Franc,ois Pinard.
+
+Sat Aug 19 23:21:19 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Correct install vs install-src goals.
+
+ * README: Add comment about alias data base.
+
+ * Makefile.in: Remove Emacs mode selection.
+
+ * configure.in:
+ Generate intl/VERSION file in configure run. config.status will *not*
+ create the file.
+ (AC_OUTPUT): Remove intl/VERSION.
+
+ * Makefile.in: Make install call install-src-recursive and install-src.
+
+ * Makefile.in:
+ Make install-local depend on install-src. I.e. the sources and
+ gettextize will always be installed.
+
+ * Makefile.in: Make goal more appropriate for parallel build.
+ Inspired by Franc,ois Pinard.
+
+Fri Aug 18 23:44:56 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (ALL_LINGUAS):
+ Add no@nynorsk for nynorsk dialect of norwegian language.
+ Provided by norwegian translation team.
+
+ * aclocal.m4, configure.in: Use AC_CHECK_FUNC instead of
+ AC_FUNC_CHECK.
+
+ * configure.in (VERSION): Bump to 0.9.3.
+
+ * aclocal.m4 (ud_GNU_GETTEXT): Add stpcpy to AC_REPLACE_FUNCS.
+
+Tue Aug 15 13:15:17 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (AC_OUTPUT):
+ Generation of intl/VERSION in extra shell code failed. Now
+ make it a autoconf'ed file.
+
+ * configure.in (AC_OUTPUT): Generate intl/VERSION file.
+
+Tue Aug 15 05:52:53 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (AC_CHECK_FUNCS): Remove getcwd, putenv, and setenv.
+
+ * Makefile.in (install-src):
+ Install NLS as root-NLS. Now also install aclocal.m4.
+
+Mon Aug 14 23:51:36 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (AC_OUTPUT):
+ Rewrite misc/gettextize instead of misc/makelinks.
+
+ * Makefile.in (prefix, gettextsrcdir):
+ Directory values needed for installation.
+ (INSTALL, INSTALL_DATA): Programs now needed for installing NLS file.
+ (install-src, install-src-recursive): New rules for installing gettext
+ sources for use in gettextize shell script.
+
+Sun Aug 13 14:38:19 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (AC_CHECK_FUNCS):
+ Unless the AC_FUNC_MMAP function does not check for the
+ existence of the munmap function (which does not exist on NeXT)
+ we do it ourself. Report by Marcus Daniels.
+
+ * aclocal.m4:
+ Generate po/POTFILES correct even if srcdir is an absolute path.
+ Report by Marcus Daniels.
+
+Wed Aug 9 01:21:56 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.9.2.
+
+ * README: Mention points for normal user to install GNU gettext.
+
+Tue Aug 8 21:34:12 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (AC_REPLACE_FUNCS): New, to test for strcasecmp.
+
+ * aclocal.m4: Fix typo: ditribution -> distribution.
+ Report by Franc,ois Pinard.
+
+Mon Aug 7 22:52:43 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (ud_GNU_GETTEXT):
+ Add AC_REQUIRE(...) for all test necessary for intl/
+ subdirectory.
+ (AC_CHECK_HEADERS): Add limits.h, malloc.h, string.h, unistd.h,
+ and values.h.
+ (AC_CHECK_FUNCS): Add getcwd, putenv, setenv, strchr.
+ Reported by Franc,ois Pinard.
+
+ * configure.in (AC_REPLACE_FUNCS):
+ strcspn is now placed here instead of in AC_CHECK_FUNCS.
+ (AC_HAVE_HEADERS): Don't test for stdlib.h.
+ Reported by Franc,ois Pinard.
+
+Fri Aug 4 22:16:58 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (Version): Bump to 0.9.1.
+
+ * configure.in (AC_OUTPUT): Remove unneeded `;'.
+
+ * Makefile.in (dist): Remove `copying instead' message.
+
+ * Makefile.in (dist): Change mode of directories to 777.
+ Add option -o to tar command.
+
+Wed Aug 2 19:37:09 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.9.
+
+ * configure.in (AC_OUTPUT):
+ Add new file misc/makelinks and make it executable.
+
+Tue Aug 1 22:51:27 1995 Ulrich Drepper <drepper@myware>
+
+ * acconfig.h: Remove unneeded definition of HAVE_ASPRINTF.
+
+ * Makefile.in (SUBDIRS):
+ make int doc/ first and unconditionally make in intl/.
+
+ * configure.in (VERSION): Bump to 0.8.2.
+
+Sun Jul 30 12:12:40 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (ud_WITH_NLS):
+ Don't define INTLOBJS when using systems gettext.
+ Always define DATADIRNAME.
+ Don't compute catalogs to be installed when --disable-nls is
+ selected.
+
+Sat Jul 29 23:22:39 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (ALL_LINGUAS): Add norwegian catalog.
+
+Sat Jul 22 01:13:06 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.8.1.
+ (ud_PATH_SITELISP): Replace with call to ud_PATH_LISPDIR.
+
+ * aclocal.m4 (ud_EMACS_TRY_PREFIX): Remove rule.
+ (ud_PATH_SITELISP): Rename to ud_PATH_LISPDIR and simplify it it.
+ By François Pinard.
+
+Wed Jul 19 02:22:18 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (ud_PATH_SITELISP):
+ If no Emacs program is found define ac_cv_path_sitelisp
+ to `no'.
+
+ * configure.in (GETTEXTPRG):
+ Remove variable. Always create and install gettext.
+
+Tue Jul 18 20:09:41 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.8.
+
+Tue Jul 18 01:32:09 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Remove magic.add. Now in misc/.
+ (SUBDIRS): Add misc.
+
+ * README: Fix typo: one -> once. Reported by Franc,ois Pinard.
+ Mention that magic.add is now found in misc/.
+
+ * configure.in (VERSION): Bump to 0.7.5.
+ (AC_OUTPUT): Add misc/Makefile.
+
+ * aclocal.m4 (ud_PATH_SITELISP):
+ Remove command for test files was incorrectly placed.
+
+Tue Jul 18 00:27:22 1995 Ulrich Drepper <drepper@myware>
+
+ * magic.add: Moved to misc/.
+
+ * acconfig.h: Uniform test for __STDC__.
+
+Mon Jul 17 00:23:22 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (ud_PATH_SITELISP):
+ Try path given with configures --prefix option.
+
+Sun Jul 16 22:36:07 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (SITELISPDIR, ELCFILES):
+ Test for Emacs and generation of substition values
+ is extended and now found in aclocal.m4.
+
+ * aclocal.m4 (ud_PATH_SITELISP, ud_EMACS_TRY_PREFIX):
+ New rules to test for Emacs' site-lisp directory.
+
+Sun Jul 16 00:09:24 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (ELCFILES):
+ Substitute as Make variable: $(ELCFILES) instead of $ELCFILES.
+ Reported by Eric Backus.
+
+ * configure.in (VERSION): Bump to 0.7.4.
+
+Sat Jul 15 00:48:11 1995 Ulrich Drepper <drepper@myware>
+
+ * acconfig.h (INVALID_PATH_CHAR): De-ANSI-fy string.
+
+ * configure.in (VERSION): Bump to 0.7.3.
+ (AC_CHECK_FUNCS): Add mblen.
+ (AC_OUTPUT): Due shorted file names now write src/tupdate.
+
+Thu Jul 13 22:35:36 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.7.2.
+
+Thu Jul 13 01:40:17 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: po-to-msg.sed and po-to-tbl.sed are now called
+ po2msg.sed and po2tbl.sed resp.
+
+ * configure.in: Check for Emacs.
+ If Emacs exists, enable regeneration of *.elc files.
+ (AC_OUTPUT): New file checks/Makefile.
+
+ * Makefile.in (SUBDIRS): New subdirectory `checks'.
+ New goal check: simply recurse through all subdirectories.
+
+Wed Jul 12 00:26:12 1995 Ulrich Drepper <drepper@myware>
+
+ * NLS: New version by Franc,ois Pinard.
+
+Tue Jul 11 21:43:49 1995 Ulrich Drepper <drepper@myware>
+
+ * acconfig.h (WARN_ID_LEN):
+ new constant. Specifies length of messages from which
+ on warnings are given to prevent breaking limits of compilers and
+ tools.
+
+ * configure.in (AC_OUTPUT): tupdate.perl is now found in src/
+
+Tue Jul 11 01:30:24 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4 (ud_GNU_GETTEXT): Construct po-to-tbl.sed
+ by removing comments.
+
+ * configure.in: Don't have default path for Perl.
+ strtoul can now be substituted when necessary.
+
+Tue Jul 4 22:27:48 1995 Ulrich Drepper <drepper@myware>
+
+ * configure.in (VERSION): Bump to 0.7.1.
+
+ * aclocal.m4 (ud_GNU_GETTEXT): Correct loop for determining LINGUAS.
+
+ * configure.in (AC_REPLACE_FUNCS): Add memmove.
+
+Tue Jul 4 00:22:30 1995 Ulrich Drepper <drepper@myware>
+
+ * aclocal.m4: aclocal.m4: Create intl/ before writing sed script.
+
+Sun Jul 2 01:51:36 1995 Ulrich Drepper <drepper@myware>
+
+ * First official release. This directory solely contains
+ the usual configuration stuff.
diff --git a/DISCLAIM b/DISCLAIM
new file mode 100644
index 0000000..02ac883
--- /dev/null
+++ b/DISCLAIM
@@ -0,0 +1,62 @@
+Please print this out, sign it, write the date, and snail it to
+this address:
+
+Richard Stallman
+545 Tech Sq rm 425
+Cambridge, MA 02139
+USA
+
+Please print your email and snail addresses on the printed disclaimer.
+*Don't forget to include the date.*
+
+In the unlikely event that you are employed on a continuing basis to do
+translation, we may need a disclaimer from your employer as well, to assure
+your employer does not claim to own this work. Please contact the FSF to
+ask for advice if you think this may apply to you.
+
+Note: if you want the wording modified to cover only a specific category
+of programs, or a specific program, we can easily do that.
+
+
+ DISCLAIMER OF COPYRIGHT IN TRANSLATIONS OF PARTS OF PROGRAMS
+
+I, _____________________________________,
+a citizen of _____________ (country), do
+hereby acknowledge to the Free Software Foundation, a not-for-profit
+corporation of Massachusetts, USA, that I disclaim all copyright
+interest in my works, which I have provided or will in the future
+provide to the Foundation, of translation of portions of free software
+programs from one human language to another human language. The
+programs to which this applies includes all programs for which the
+Foundation is the copyright holder, and all other freely
+redistributable software programs.
+
+The translations covered by this disclaimer include, without
+limitation, translations of textual messages, glossaries, command or
+option names, user interface text, and the like, contained within or
+made for use via these programs.
+
+ Given as a sealed instrument this ___ day of ______ (month), ______
+(year), at _____________________ (city and country).
+
+
+ signed: ___________________________
+
+ email address: ___________________________
+
+ postal address: ___________________________
+
+ ___________________________
+
+ ___________________________
+
+
+
+I currently expect to work on the following translation teams (though
+this disclaimer applies to all translations I may subsequently work
+on):
+
+
+ __________________________________________________
+
+ __________________________________________________
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..e855e29
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,349 @@
+Basic Installation
+==================
+
+These are installation instructions for Bash.
+
+The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package
+(the top directory, the `builtins' and `doc' directories, and the each
+directory under `lib'). It also creates a `config.h' file containing
+system-dependent definitions. Finally, it creates a shell script named
+`config.status' that you can run in the future to recreate the current
+configuration, a file `config.cache' that saves the results of its
+tests to speed up reconfiguring, and a file `config.log' containing
+compiler output (useful mainly for debugging `configure'). If at some
+point `config.cache' contains results you don't want to keep, you may
+remove or edit it.
+
+If you need to do unusual things to compile Bash, please try to figure
+out how `configure' could check whether or not to do them, and mail
+diffs or instructions to <bash-maintainers@gnu.org> so they can be
+considered for the next release.
+
+The file `configure.in' is used to create `configure' by a program
+called Autoconf. You only need `configure.in' if you want to change it
+or regenerate `configure' using a newer version of Autoconf. If you do
+this, make sure you are using Autoconf version 2.10 or newer.
+
+If you need to change `configure.in' or regenerate `configure', you
+will need to create two files: `_distribution' and `_patchlevel'.
+`_distribution' should contain the major and minor version numbers of
+the Bash distribution, for example `2.01'. `_patchlevel' should
+contain the patch level of the Bash distribution, `0' for example. The
+script `support/mkconffiles' has been provided to automate the creation
+of these files.
+
+The simplest way to compile Bash is:
+
+ 1. `cd' to the directory containing the source code and type
+ `./configure' to configure Bash for your system. If you're using
+ `csh' on an old version of System V, you might need to type `sh
+ ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile Bash and build the `bashbug' bug reporting
+ script.
+
+ 3. Optionally, type `make tests' to run the Bash test suite.
+
+ 4. Type `make install' to install `bash' and `bashbug'. This will
+ also install the manual pages and Info file.
+
+You can remove the program binaries and object files from the source
+code directory by typing `make clean'. To also remove the files that
+`configure' created (so you can compile Bash for a different kind of
+computer), type `make distclean'.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+On systems that have the `env' program, you can do it like this:
+
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+The configuration process uses GCC to build Bash if it is available.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile Bash for more than one kind of computer at the same
+time, by placing the object files for each architecture in their own
+directory. To do this, you must use a version of `make' that supports
+the `VPATH' variable, such as GNU `make'. `cd' to the directory where
+you want the object files and executables to go and run the `configure'
+script from the source directory. You may need to supply the
+`--srcdir=PATH' argument to tell `configure' where the source files
+are. `configure' automatically checks for the source code in the
+directory that `configure' is in and in `..'.
+
+If you have to use a `make' that does not supports the `VPATH'
+variable, you can compile Bash for one architecture at a time in the
+source code directory. After you have installed Bash for one
+architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Alternatively, if your system supports symbolic links, you can use the
+`support/mkclone' script to create a build tree which has symbolic
+links back to each file in the source directory. Here's an example
+that creates a build directory in the current directory from a source
+directory `/usr/gnu/src/bash-2.0':
+
+ bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 .
+
+The `mkclone' script requires Bash, so you must have already built Bash
+for at least one architecture before you can create build directories
+for other architectures.
+
+Installation Names
+==================
+
+By default, `make install' will install into `/usr/local/bin',
+`/usr/local/man', etc. You can specify an installation prefix other
+than `/usr/local' by giving `configure' the option `--prefix=PATH'.
+
+You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', `make install' will
+use `PATH' as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host Bash will run
+on. Usually `configure' can figure that out, but if it prints a
+message saying it can not guess the host type, give it the
+`--host=TYPE' option. `TYPE' can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+`CPU-COMPANY-SYSTEM' (e.g., `sparc-sun-sunos4.1.2').
+
+See the file `support/config.sub' for the possible values of each field.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'. `configure'
+looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: the Bash `configure' looks for a site script, but not all
+`configure' scripts do.
+
+Operation Controls
+==================
+
+`configure' recognizes the following options to control how it operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the Bash source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely used, boilerplate
+options.
+
+Optional Features
+=================
+
+The Bash `configure' has a number of `--enable-FEATURE' options, where
+FEATURE indicates an optional part of Bash. There are also several
+`--with-PACKAGE' options, where PACKAGE is something like `gnu-malloc'
+or `purify'. To turn off the default use of a package, use
+`--without-PACKAGE'. To configure Bash without a feature that is
+enabled by default, use `--disable-FEATURE'.
+
+Here is a complete list of the `--enable-' and `--with-' options that
+the Bash `configure' recognizes.
+
+`--with-afs'
+ Define if you are using the Andrew File System from Transarc.
+
+`--with-curses'
+ Use the curses library instead of the termcap library. This should
+ be supplied if your system has an inadequate or incomplete termcap
+ database.
+
+`--with-glibc-malloc'
+ Use the GNU libc version of `malloc' in `lib/malloc/gmalloc.c'.
+ This is not the version of `malloc' that appears in glibc version
+ 2, but a modified version of the `malloc' from glibc version 1.
+ This is somewhat slower than the default `malloc', but wastes less
+ space on a per-allocation basis, and will return memory to the
+ operating system under some circumstances.
+
+`--with-gnu-malloc'
+ Use the GNU version of `malloc' in `lib/malloc/malloc.c'. This is
+ not the same `malloc' that appears in GNU libc, but an older
+ version derived from the 4.2 BSD `malloc'. This `malloc' is very
+ fast, but wastes some space on each allocation. This option is
+ enabled by default. The `NOTES' file contains a list of systems
+ for which this should be turned off, and `configure' disables this
+ option automatically for a number of systems.
+
+`--with-installed-readline'
+ Define this to make bash link with a locally-installed version of
+ Readline rather than the version in lib/readline. This works only
+ with readline 4.0 and later versions.
+
+`--with-purify'
+ Define this to use the Purify memory allocation checker from Pure
+ Software.
+
+`--enable-minimal-config'
+ This produces a shell with minimal features, close to the
+ historical Bourne shell.
+
+There are several `--enable-' options that alter how Bash is compiled
+and linked, rather than changing run-time features.
+
+`--enable-profiling'
+ This builds a Bash binary that produces profiling information to be
+ processed by `gprof' each time it is executed.
+
+`--enable-static-link'
+ This causes Bash to be linked statically, if `gcc' is being used.
+ This could be used to build a version to use as root's shell.
+
+The `minimal-config' option can be used to disable all of the following
+options, but it is processed first, so individual options may be
+enabled using `enable-FEATURE'.
+
+All of the following options except for `disabled-builtins' and
+`usg-echo-default' are enabled by default, unless the operating system
+does not provide the necessary support.
+
+`--enable-alias'
+ Allow alias expansion and include the `alias' and `unalias'
+ builtins (*note Aliases::.).
+
+`--enable-arith-for-command'
+ Include support for the alternate form of the `for' command that
+ behaves like the C language `for' statement (*note Looping
+ Constructs::.).
+
+`--enable-array-variables'
+ Include support for one-dimensional array shell variables (*note
+ Arrays::.).
+
+`--enable-bang-history'
+ Include support for `csh'-like history substitution (*note History
+ Interaction::.).
+
+`--enable-brace-expansion'
+ Include `csh'-like brace expansion ( `b{a,b}c' ==> `bac bbc' ).
+ See *Note Brace Expansion::, for a complete description.
+
+`--enable-command-timing'
+ Include support for recognizing `time' as a reserved word and for
+ displaying timing statistics for the pipeline following `time'.
+ This allows pipelines as well as shell builtins and functions to
+ be timed.
+
+`--enable-cond-command'
+ Include support for the `[[' conditional command (*note
+ Conditional Constructs::.).
+
+`--enable-directory-stack'
+ Include support for a `csh'-like directory stack and the `pushd',
+ `popd', and `dirs' builtins (*note The Directory Stack::.).
+
+`--enable-disabled-builtins'
+ Allow builtin commands to be invoked via `builtin xxx' even after
+ `xxx' has been disabled using `enable -n xxx'. See *Note Bash
+ Builtins::, for details of the `builtin' and `enable' builtin
+ commands.
+
+`--enable-dparen-arithmetic'
+ Include support for the `((...))' command (*note Conditional
+ Constructs::.).
+
+`--enable-extended-glob'
+ Include support for the extended pattern matching features
+ described above under *Note Pattern Matching::.
+
+`--enable-help-builtin'
+ Include the `help' builtin, which displays help on shell builtins
+ and variables.
+
+`--enable-history'
+ Include command history and the `fc' and `history' builtin
+ commands.
+
+`--enable-job-control'
+ This enables the job control features (*note Job Control::.), if
+ the operating system supports them.
+
+`--enable-net-redirections'
+ This enables the special handling of filenames of the form
+ `/dev/tcp/HOST/PORT' and `/dev/udp/HOST/PORT' when used in
+ redirections (*note Redirections::.).
+
+`--enable-process-substitution'
+ This enables process substitution (*note Process Substitution::.)
+ if the operating system provides the necessary support.
+
+`--enable-prompt-string-decoding'
+ Turn on the interpretation of a number of backslash-escaped
+ characters in the `$PS1', `$PS2', `$PS3', and `$PS4' prompt
+ strings. See *Note Printing a Prompt::, for a complete list of
+ prompt string escape sequences.
+
+`--enable-progcomp'
+ Enable the programmable completion facilities (*note Programmable
+ Completion::.). If Readline is not enabled, this option has no
+ effect.
+
+`--enable-readline'
+ Include support for command-line editing and history with the Bash
+ version of the Readline library (*note Command Line Editing::.).
+
+`--enable-restricted'
+ Include support for a "restricted shell". If this is enabled,
+ Bash, when called as `rbash', enters a restricted mode. See *Note
+ The Restricted Shell::, for a description of restricted mode.
+
+`--enable-select'
+ Include the `select' builtin, which allows the generation of simple
+ menus (*note Conditional Constructs::.).
+
+`--enable-usg-echo-default'
+ Make the `echo' builtin expand backslash-escaped characters by
+ default, without requiring the `-e' option. This makes the Bash
+ `echo' behave more like the System V version.
+
+The file `config-top.h' contains C Preprocessor `#define' statements
+for options which are not settable from `configure'. Some of these are
+not meant to be changed; beware of the consequences if you do. Read
+the comments associated with each definition for more information about
+its effect.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..b3be0aa
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,35 @@
+## Makefile for the toplevel directory of the GNU NLS Utilities
+## Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+## Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = 1.3 gnits
+MAINT_CHARSET = latin1
+## ACLOCAL_AMFLAGS = -I m4
+
+gettextsrcdir = $(datadir)/gettext
+gettextsrc_DATA = ABOUT-NLS
+
+EXTRA_DIST = BUGS DISCLAIM README.gemtext
+SUBDIRS = doc lib intl src po m4 misc tests
+
+DISTCLEANFILES = intl/libintl.h
+
+ABOUT-NLS: $(srcdir)/doc/nls.texi $(srcdir)/doc/matrix.texi
+ rm -f $(srcdir)/ABOUT-NLS \
+ && $(MAKEINFO) --output=$(srcdir)/ABOUT-NLS --no-header \
+ -I $(srcdir)/doc --no-validate nls.texi
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..5b8eac7
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,430 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+ACLOCAL_VERSION = @ACLOCAL_VERSION@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+EMACS = @EMACS@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LIBOBJS = @LIBOBJS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+YACC = @YACC@
+aclocaldir = @aclocaldir@
+l = @l@
+lispdir = @lispdir@
+
+AUTOMAKE_OPTIONS = 1.3 gnits
+MAINT_CHARSET = latin1
+
+gettextsrcdir = $(datadir)/gettext
+gettextsrc_DATA = ABOUT-NLS
+
+EXTRA_DIST = BUGS DISCLAIM README.gemtext
+SUBDIRS = doc lib intl src po m4 misc tests
+
+DISTCLEANFILES = intl/libintl.h
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+DATA = $(gettextsrc_DATA)
+
+DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
+INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS TODO \
+acconfig.h aclocal.m4 config.guess config.h.in config.sub configure \
+configure.in install-sh ltconfig ltmain.sh missing mkinstalldirs
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): configure.in
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h \
+ $(SHELL) ./config.status
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ -rm -f config.h
+
+maintainer-clean-hdr:
+
+install-gettextsrcDATA: $(gettextsrc_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir)
+ @list='$(gettextsrc_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(gettextsrcdir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(gettextsrcdir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(gettextsrcdir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(gettextsrcdir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-gettextsrcDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(gettextsrc_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$p; \
+ done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \
+ echo "NEWS not updated; not releasing" 1>&2; \
+ exit 1; \
+ fi
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+all-recursive-am: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am: install-gettextsrcDATA
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-gettextsrcDATA
+uninstall: uninstall-recursive
+all-am: Makefile $(DATA) config.h
+all-redirect: all-recursive-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-recursive
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+uninstall-gettextsrcDATA install-gettextsrcDATA install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+ABOUT-NLS: $(srcdir)/doc/nls.texi $(srcdir)/doc/matrix.texi
+ rm -f $(srcdir)/ABOUT-NLS \
+ && $(MAKEINFO) --output=$(srcdir)/ABOUT-NLS --no-header \
+ -I $(srcdir)/doc --no-validate nls.texi
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e2170c4
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,179 @@
+Version 0.10.36 - June 1998, by Ulrich Drepper
+
+* by default the emulation of gettext using the catgets() functions of
+ the C library is not selected anymore. GNU gettext has so many nice
+ extensions that this became unreasonable. Using --with-catgets the
+ emulation still can be requested.
+
+* extend xgettext program to handle other file formats other than C/C++.
+ For now it also handles PO file. Using this feature one can concatenate
+ arbitrary PO files.
+
+* Tcl module with gettext interface
+
+* Korean translation by Bang Jun Young
+
+* xgettext writes to stdout when default domain name is set to -
+
+* codeset name normalization
+
+* msgmerge program now has all features tupdate has (and more).
+ tupdate itself will be removed soon
+
+* po/Makefile.in.in now uses msgmerge instead of tupdate
+
+* escape notation in .po files are only used when explicitly selected
+
+* changed interface of msgunfmt to conform to GNU coding standard
+
+* msgmerge now knows how to handle obsolete entries. If a formerly obsolete
+ entry is used again msgmerge will find it
+
+* better implementation of comment extraction in xgettext.
+
+* better C format string implementation. The xgettext will classify
+ strings as being a format string, or not, in the .po file. The
+ programmer can override the decision explicitly for each string
+ by specifying `xgettext:c-format' and `xgettext:no-c-format'
+ respectively in a C comment preceding the string.
+
+* msgmerge program now always produces output. Fuzzy or non-existing
+ translations are no reason for holding back the result.
+
+* reasonable header entry format implemented
+
+* Norwegian translation by Karl Anders Øygard
+
+* Configure command line option `--with-gnu-gettext' is renamed to
+ `--with-included-gettext'
+
+* gettextize now can determine whether the aclocal.m4 of the project
+ is sufficent
+
+* use automake for Makefile.in generation
+
+* by default now only c-format is emitted in xgettext. If using the new
+ --debug option one can enable printing possible-c-format to see who
+ decided about the string: xgettext or the programmer
+
+* the installed libintl.h file no longer depends on HAVE_LOCALE_H being
+ defined. After running configure we know whether this file exists.
+
+* wrapping of lines in PO file output finally enabled.
+ A new special comment no-wrap prevents wrapping.
+
+* add --statistics option to msgfmt to get information about number of
+ translated, untranslated, and fuzzy messages
+
+* change behaviour of --verbose option to msgfmt. This no longer
+ causes the check on the messages to be performed. The check for leading
+ and trailing \n is always performed and the check of the format specifiers
+ is performed when --check is given.
+
+* shared library support based On Gord Matzigkeit's libtool package
+
+* msgcomm program by Peter Miller to extract messages shared by input
+ files
+
+* many more translations.
+
+* PO mode does not use recursive edit anymore, many edits may be worked on
+ simultaneously in a single PO file.
+
+* PO mode may handle many translation files at once while correlating related
+ entries, for helping multilingual or cultured translators.
+
+* On recent Emacses, PO mode automatically use proper fonts when available.
+
+* PO mode supports marking of C++ sources.
+
+* highlights original message while editing the translation
+
+* PO mode has commands to mail messages to teams or to the translation
+coordinator, with automatic inclusion of the current PO file.
+
+Version 0.10 - December 1995, by Ulrich Drepper
+
+* implement --shell-script option for gettext program
+
+* implement object-oriented, lazy message handling :-)
+ Consult the manual for more/any information
+
+* implement locale name aliasing, similar to the one used
+ in the X Window System
+
+* support for GNU gettext sources in central place to support
+ use in development environments of other projects
+
+* implement CEN syntax for environment variable values
+
+* msgcmp program to find matches in two .po files
+
+* programs now have exit status != 0 if errors occured
+
+* libintl.a is now selfcontained and can be used without context in
+ other projects (even on systems missing alloca)
+
+* gettextize now automatically runs config.status
+
+* swedish message catalog
+
+* new options for xgettext: -D/--directory to change in specified directory
+ before processing the input files and -f/--files-from to specify file from
+ which the names of the input files are read.
+ The later option in necessary for large projects such as GNU C Library.
+
+* new programs msgmerge and msgunfmt by Peter Miller. The code of the other
+ programs is now also much cleaner.
+
+Version 0.9 - August 1995, by Ulrich Drepper
+
+* again many improvements on the manual
+
+* norwegian message catalog
+
+* compilation now works with --disable-nls
+
+* better checks
+
+Version 0.8 - July 1995, by Ulrich Drepper
+
+* much improved manual (although still far from being complete)
+
+* improved PO mode; it now can prepare C sources for use with gettext
+ by marking translatable strings
+
+* better support for sparse System V systems
+
+* check goal (kind of)
+
+* more input tests and warnings
+
+* better support for integration in other packages
+
+* many bugs fixed
+
+Version 0.7 - June 1995, by Ulrich Drepper
+
+* New GNU package providing functionality to internationalize and
+localize other programs.
+
+* Implementation of the Uniforum(*) proposal for internationalization
+on top of X/Open(*) style catgets functions.
+
+* Complete implementation of the Uniforum functions for system
+lacking either of them or those who which to have a different
+implementation with many advantages.
+
+* Implementation of the three tools for message catalog handling
+described in the Uniforum.
+
+* Emacs po-mode for handling portable message object files which are
+the basis of the work of the package.
+
+
+(*) Some history: The POSIX working groups have so far been unable to
+agree on one set of message catalog handling functions for the C Library.
+For now there are competing proposals, one by the Uniforum group, led by
+Sun, and the other by X/Open. Although the latter is surely implemented
+on more systems, it is not perceived as the clear leader.
diff --git a/README b/README
new file mode 100644
index 0000000..66c49ed
--- /dev/null
+++ b/README
@@ -0,0 +1,176 @@
+This is the GNU gettext package. It is interesting for authors or
+maintainers of other packages or programs which they want to see
+internationalized. As one step the handling of messages in different
+languages should be implemented. For this task GNU gettext provides
+the needed tools and library functions.
+
+Users of GNU packages should also install GNU gettext because some
+other GNU packages will use the gettext program included in this
+package to internationalize the messages given by shell scripts.
+
+Another good reason to install GNU gettext is to make sure the
+here included functions compile ok. This helps to prevent errors
+when installing other packages which use this library. The message
+handling functions are not yet part of POSIX and ISO/IEC standards
+and therefore it is not possible to rely on facts about their
+implementation in the local C library. If the installer selects
+it, GNU gettext tries using the systems functionality; in that
+case, compatibility problems might occur.
+
+We felt that the Uniforum proposals has the much more flexible interface
+and, what is more important, does not burden the programmers as much as
+the other possibility does.
+
+
+Please share your results with us. If this package compiles ok for
+you future GNU release will likely also not fail, at least for reasons
+found in message handling. Send comments and bug reports to
+ bug-gnu-utils@gnu.org
+
+
+The goal of this library was to give a unique interface to message
+handling functions. At least the same level of importance was to give
+the programmer/maintainer the needed tools to maintain the message
+catalogs. The interface is designed after the proposals of the
+Uniforum group. So systems having this interface implemented in their
+C library don't need the library provided here (and it will
+automatically not be included). If your systems C library implements
+the second widely available approach (X/Opens catgets) the library
+can use this and only some stubs will be compiled to provide the
+needed interface. If neither is locally available a full
+implementation of the library will be compiled.
+
+The configure script provides three non-standard options. These will
+also be available in other packages if they use the functionality of
+GNU gettext. Use
+
+ --disable-nls
+
+if you absolutely don't want to have messages handling code. You will
+always get the original messages (mostly English). You could consider
+using NLS support even when you do not need other tongues. If you do
+not install any messages catalogs or do not specify to use another but
+the C locale you will not get translations.
+
+The set of languages for which catalogs should be installed can also be
+specified while configuring. Of course they must be available but the
+intersection of these two sets are computed automatically. You could
+once and for all define in your profile/cshrc the variable LINGUAS:
+
+(Bourne Shell) LINGUAS="de fr nl"; export LINGUAS
+
+(C Shell) setenv LINGUAS "de fr nl"
+
+or specify it directly while configuring
+
+ env LINGUAS="de fr nl" ./configure
+
+Consult the manual for more information on language names.
+
+The second configure option is
+
+ --with-included-gettext
+
+This forces to use the GNU implementing the message handling library
+regardless what the local C library provides. This possibility is
+much less error prone because possible unreliable effects of the local
+message handling system are avoided. And perhaps more important: many
+useful features can only be exploited with this library. The reason
+is obvious: we cannot dig in the internals of other implementations.
+It is likely that the discrepancy between the GNU implementation and
+others will get bigger in the time coming. So better change now!
+
+The third option is:
+
+ --with-catgets
+
+The X/Open catgets functions which might be found in the local C
+library are not used by default. The reason is already described
+above: the GNU gettext library provides many useful extension which
+cannot be emulated with catgets(). Beside this the utility programs
+for generating the catalog used by catgets() vary heavily between
+different systems. You should select this feature only if you really
+don't want to use the GNU gettext library and do not want to extended
+functionality (but I do not see any good reason for such a choice).
+
+
+Other files you might look into:
+
+`ABOUT-NLS' - current state of the GNU internationalization effort
+`COPYING' - copying conditions
+`INSTALL' - general compilation and installation rules
+`NEWS' - major changes in the current version
+`THANKS' - list of contributors
+
+
+Some points you might be interested in before installing the package:
+
+1. If you change any of the files in package the Makefile rules will
+ schedule a recompution of the gettext.pot file. But this is not
+ possible without this package already installed.
+ If you don't have this package already installed and modified
+ any of the files build the package first with
+ --disable-nls
+ When this is done you will get a runnable xgettext program which
+ can be used to recompute gettext.pot.
+
+2. The package contains a file misc/magic.add. This is intended to be
+ added to your /etc/magic file. After adding this the `file' command
+ will recognize GNU message catalog files (.mo files).
+
+3. If your system's C library already provides the gettext interface
+ it might be a good idea to configure the package with
+ --program-prefix=g
+
+ Systems affected by this are:
+ Solaris 2.x, future GNU and GNU/Linux systems
+
+ One point to mention here is that at least Solaris 2.3 does not have
+ all function of the Uniforum proposal implement. More specific, the
+ dcgettext() function is missing. For programmers/maintainers it
+ is therefore nowaday better to avoid using this function.
+
+4. Some system have a very dumb^H^H^H^Hstrange version of msgfmt, the
+ one which comes with xview. This one is *not* usable. It's best
+ you delete^H^H^H^H^H^Hrename it or install this package as in the
+ point above with
+ --program-prefix=g
+
+5. On some system it is better to have strings aligned (I've been told
+ Sparcs like strings aligned to 8 byte boundaries). If you want to
+ have the output of msgfmt aligned you can use the -a option. But you
+ also could change the default value to be different from 1. Take
+ a look at the config.h file, built by configure.
+ (If you change the default value the test of msgfmt will fail!)
+
+6. The locale name alias scheme implemented here is in a similar form
+ implemented in the X Window System. Especially the alias data base
+ file can be shared. Normally this file is found at something like
+
+ /usr/lib/X11/locale/locale.alias
+
+ If you have the X Window System installed try to find this file and
+ specify the path at the make run:
+
+ make aliaspath='/usr/lib/X11/locale:/usr/local/lib/locale'
+
+ (or whatever is appropriate for you). The file name is always
+ locale.alias.
+ In the misc/ subdirectory you find an example for an alias database file.
+
+7. The msgmerge program performs fuzzy search in the message sets. It
+ might run a long time on slow systems. I saw this problem when running
+ it on my old i386DX25. The time can really be several minutes,
+ especially if you have long messages and/or a great number of
+ them.
+ If you have a faster implementation of the fstrcmp() function and
+ want to share it with the rest of use, please contact me.
+
+8. On some systems it will not be possible to compile this package.
+ It is not only this package but any other GNU package, too. These
+ systems do not provide the simplest functionality to run configure.
+ Today are known the following systems:
+
+ configure name description
+ -------------- -----------
+ mips-mips-riscos 2.1.1AC RISCos
diff --git a/README-alpha b/README-alpha
new file mode 100644
index 0000000..633fa11
--- /dev/null
+++ b/README-alpha
@@ -0,0 +1,5 @@
+This is a test release of GNU gettext.
+Please do not send reports about this release to any
+GNU mailing list or newsgroup.
+
+Please send comments and problems to drepper@gnu.org.
diff --git a/README.gemtext b/README.gemtext
new file mode 100644
index 0000000..c5c3b48
--- /dev/null
+++ b/README.gemtext
@@ -0,0 +1,435 @@
+$Revision: 1.1 $
+$Date: 2000/06/16 07:49:23 $
+20
+!!! README for gemtext. !!!
+If you think the above mentioned date is old check out
+http://stud.uni-sb.de/~gufl0000/atari/gemtext. You will find the latest
+version there. You will also find links to ftp sites from where you can
+download gemtext via anonymous ftp.
+
+See the file INSTALL for installing gemtext.
+See the file COPYING for licensing.
+See the file NEWS for information that is not covered by either this file
+or the provided manual pages. All information concerning features of
+gemtext included in any text file that comes along with this package is
+subject to change without notice!
+
+==========================================================================
+
+This is the gemtext package. The gemtext package offers standardized i18n
+(internationalization) features for GEM programs. The package is intended
+to help programmers to internationalize their programs. If you aren't a
+programmer you might want to read the file ABOUT-NLS to get an idea of
+national language support. But you won't need gemtext.
+
+GEM is a registered trademark of Digital Research Company. GEM is mainly
+used on Atari computers or the various emulations available today on other
+platforms. You can also find the so-called PC-GEM for IBM compatible
+machines. If you neither use an Atari nor emulate the Atari's OS you
+won't need gemtext too. Still it might be a good idea to have a look at
+the file ABOUT-NLS.
+
+All programs and libraries contained in this package will work on their
+own, only depending on some executables and libraries that can be found in
+most Unix-like environments. Yet, you will only benefit from gemtext if
+you have the GNU gettext package or another internationalization package
+that can be compared with gettext already installed. You will find the
+latest version of GNU gettext at
+
+ ftp://prep.ai.mit.edu/pub/gnu
+
+It compiles without any problems with the GNU C-compiler and MiNTLib PL46.
+(Well, there's a little problem: If your msgfmt keeps on crashing with a
+bus error try to replace the module obstack.o in your MiNTLib with the
+obstack.c that comes along with GNU gettext. But this is a bug in the
+MiNTLib and not in GNU gettext.)
+
+In the following I will refer to any computer that can make use of
+xgemtext as 'Atari'. I also expect you to be familiar with the C
+programming language and with the well known data structures and function
+calls that are necessary for programming GEM applications.
+
+He, she, they... Quote from the gettext info file:
+ "In this manual, we use *he* when speaking of the programmer or
+ maintainer, *she* when speaking of the translator, and *they* when
+ speaking of the installers or end users of the translated program.
+ This is only a convenience for clarifying the documentation. It
+ is *absolutely* not meant to imply that some roles are more
+ appropriate to males or females. Besides, as you might guess, GNU
+ `gettext' is meant to be useful for people using computers,
+ whatever their sex, race, religion or nationality!"
+
+Last but not least: xgemtext is written in C++. Hence you will need a
+C++ compiler to compile the package. GNU C++ is a good choice if you
+don't already have one. If you don't have the system resources to run the
+compiler you will have to try to get an already compiled version. Good
+news: The library (which is the more important part of the gemtext
+package) is entirely written in plain C to allow easy porting to different
+compiler systems.
+
+
+
+CONTENTS
+========
+ 1. Why gemtext?
+ 2. Alternatives for i18n
+ 3. How to use the GNU gettext package
+ 4. How to use the gemtext package
+ 5. The library rintl
+ 6. Charsets: Atari versus ISO-Latin 1
+ 7. Miscellanea
+
+
+
+1. Why gemtext?
+===============
+
+The Atari's GUI (Graphical User Interface) offers possibilities for
+native language support for a long time already. All necessary graphical
+data and text for the user interface is usually kept in a so-called
+resource file. For example the program foobar.app will normally look for
+the resource file foobar.rsc in the same directory. A programmer aware of
+i18n will usually provide several of these resource file each of them
+containing the entire data in different languages, called e. g. en.rsc,
+fr.rsc, it.rsc and so on. The users have to rename the particular
+resource file in their language to foobar.rsc and the program will still
+behave the same but will display its messages in the chosen language.
+
+This procedere is suboptimal for various reasons.
+
+- The most obvious one is that you keep loads of redundant data in the
+ extra provided resouce files. Usually the strings in the resource
+ files occupy very little space in comparison to the graphical data.
+
+- GEM applications usually expect their resource files to reside at a
+ fixed location and to have a fixed name. Hence, in a multi-user
+ environment you have to choose one particular language for each
+ application or you have to keep different copies of both your resource
+ and other data files.
+
+- Once you have decided to include your resources into your source code
+ you have to say goodbye to the idea of i18n.
+
+- Probably the most important disadvantage of the current system is the
+ effort you have to take in updating your applications. Whenever you
+ have changed the tree structure in your resource file you will have to
+ edit every other resource file immediately if you do the translation
+ yourself. If you let somebody else do your translations she will have
+ enormous difficulties. She will have to click through the entire
+ resource tree, taking care not to change the data structures
+ unwillingly, and picking out the texts that have changed. If you
+ haven't found some trickier system it is probably easier to restart the
+ translation from the beginning.
+
+- Whenever your application has to display a message you have to edit
+ your resource file even for little ones like:
+
+ form_alert (1, "[1][ Memory exhausted! ][ Damned ]");
+
+ Every string that has to be translated has to appear in the resource
+ file. Considering that most resource file formats are restricted to 64
+ kB of length and that most GEM libraries can handle only one single
+ resource file this is often a severe restriction in the design of the
+ GUI.
+
+
+
+2. Alternatives for i18n
+========================
+
+As far as programs are concerned that have to be run via a command line
+interpreter, there is already a portable, standardized system for message
+internationalization, the GNU gettext package. It offers tools for
+preparing all kinds of source files for i18n, tools that help both the
+programmer and translator to keep track of updated versions (and the
+maintainers, too) and it comes along with a free C library that gives
+access to the translated messages at runtime of the program depending on
+the setting of documented environment variables.
+
+You should get a copy of the GNU gettext package now. Yet, if you are too
+curious to download it at once, just go ahead but you might want to reread
+this file later as it refers to information that is available only with
+the GNU gettext package.
+
+The gemtext package should also be useful with NLS-packages (Native
+Language Support) other than GNU gettext to the degree that GNU gettext
+itself is compatible with other standardized packages. Yet, it has been
+only tested with GNU gettext as it is the only available one for Atari.
+
+
+
+3. How to use the GNU gettext package
+=====================================
+
+Forget about the whole GUI thing for a short while to get roughly an idea
+of programming with the GNU gettext package. We'll come back to the GUI
+shortly.
+
+NOTE: This section isn't meant to be an exhaustive description of the GNU
+gettext package. It is intended to give you an overview. If you already
+know the GNU gettext package you might safely skip this section.
+
+Localizing messages in a C program is very easily done. At first you need
+some (usually three) lines of extra code to tell the NLS library functions
+where to find the translated messages. Then you have to go through your
+code and decide for every string whether you want to get it translated or
+not. Strings that should be translated have to be embedded in a function
+call to gettext (). Thus instead of writing:
+
+ printf ("Hello world!\n");
+
+you would now write
+
+ printf (gettext ("Hello world!\n"));
+
+When you're fed up with typing g-e-t-t-e-x-t over and over again you will
+follow the habit of most of your colleagues and
+
+ #define _(s) gettext (s)
+
+well knowing that now only three extra keystrokes will make the rest of
+the world happy.
+
+Very handy, very easy, isn't it? Unfortunately it doesn't work if you use
+strings for example in initialized structures or arrays. Really? Just to
+make sure that you don't abandon the whole thing already, I will tell you
+a secret: It still works! Read the gettext info file and follow the
+nodes Sources -> Special cases.
+
+After having marked all translatable strings in your sources you will want
+to extract them for translation by
+
+ xgettext *.c
+
+producing a file messages.po that contains both the original strings and
+space for the translations. After the file being translated you will
+compile it into a binary by a call to the program msgfmt. This binary
+file will then usually be moved to
+
+ /usr/(local/)share/locale/de/LC_MESSAGES/foobar.mo
+
+provided that your program has been translated into German ('de' is the
+ISO-639 2-letter country code for Germany).
+
+Now you set one of the envariables LANGUAGE, LANG or LC_ALL to 'de' and
+recompile your sources. Your linker will then complain about the
+reference to 'gettext' not being resolved and you will fix the problem by
+linking the program with the 'intl'-library that comes along with gettext
+(and gemtext, too). Surprise, surprise! Your program has learned to say
+hello to the world in yet another language.
+
+After long and satisfying experiences with your chef-d'oeuvre you might
+feel that it is not enough to say hello to the world. You want to say
+hello to the whole universe, too. So what now? Redo the whole thing?
+No! You simply update your sources and extract a new messages file.
+Before translating the file entirely again you should have msgmerge have a
+glimpse at both the original and the updated file. The program msgmerge
+is very clever and will probably guess what you have done. It will
+produce a new .po file that will already contain the strings you have
+translated the last time. It will also not cast away those strings that
+you do not care to translate any longer. It will comment them out
+instead, thus allowing you to change your mind again later. This feature
+is also very handy for corrected misspellings or minor modifications to
+strings. If msgmerge encounters such a case it will mark the maybe
+incorrect translation it guesses to be best as a "fuzzy" translation. If
+you agree with msgmerge, simply remove the "fuzzy" comment.
+
+Well, that's it in brief. Again, if you want to understand the GNU
+gettext package in its whole powerfulness you can't help reading the
+documentation.
+
+
+
+4. How to use the gemtext package
+=================================
+
+Probably you have already seen that it's no longer necessary to put
+strings for alert boxes or other free strings in your resource files.
+What has worked with printf will work with form_alert, too.
+
+And what about resources integrated in your source files? Why not? Most
+resource construction sets offer the possibility to produce a C source
+file as output and running a simple awk script on this file will already
+do the whole job for you. (An important advantage of integrated resources
+is that you're not restricted to 64 kB anymore).
+
+But if you don't bother to write all the routines to fix adresses of
+object trees and so on you will estimate the help of xgemtext from this
+package.
+
+Running
+
+ xgemtext *.rsc
+
+in your source directory will extract all strings from your resource files
+placing them in a file messages.c looking more or less like this:
+
+ /* This file was automatically produced by xgemtext <version> */
+
+ #ifndef gettext_noop
+ #define gettext_noop(s) (s)
+ #endif
+
+ const char* volatile nls_rsc_strings[] = {
+ gettext_noop (" Foobar"),
+ gettext_noop (" File"),
+ gettext_noop (" Options"),
+ gettext_noop (" About Foobar..."),
+ gettext_noop (" Open"),
+ ... /* All other strings in your resource. */
+ 0L
+ }
+
+It looks like a real C source file and it actually is one. Yet, usually
+you will never compile it nor link the corresponding object file. But you
+never know...
+
+Various options control xgemtext's behavior while extracting the strings
+from your resources, see the manual page for detailed information. Of
+course it does not extract only strings from objects of type G_TEXT,
+G_STRING etc. but from all kinds of objects containing text, including
+icons and bitmaps.
+
+So what's the purpose of messages.c if not compiling? You can run
+it (together with your other sources) through xgettext and now you have
+your resource strings in a .po file that can be processed with all the
+tools from the GNU gettext package.
+
+
+
+5. The library rintl
+====================
+
+Your resource file hasn't been patched by xgemtext. So, how to get the
+translated strings into the objects where they should go? You load your
+resource as usual. Now you simply have to take the habit to call
+gettree() for each object tree after fixing the object addresses via
+rsrc_gaddr(). The library function gettree() will walk thru the specified
+object tree replacing each pointer to a string with a pointer to the
+translated versions. It will also modify some members of the internal
+data structures (string length etc.) to the appropriate values.
+
+For simple objects this is all that you have to do. For more complicated
+ones translating the strings might leave your carefully designed objects a
+mess, beginning with menues. Remember that all string lengths may have
+been arbitrarily changed, resulting in objects that might hide each other
+or ugly looking gaps between objects that were meant to be close to each
+other.
+
+You will find numerous functions in the library rintl that will try to
+bring your objects back to a tolerable outer appearance again, each of
+them being called rnl<object_type>(). You will also find a function
+called rnltree() that will try to do the job for entire object trees. You
+can control the behavior of these adapt functions in numerous ways that
+should meet as many requirements as possible. You can specify spaces to
+be left between objects, margins to the tree borders, minimum widths of
+button objects and so on. You can also tell the functions not to walk
+thru the whole object tree but stopping at a certain level, thus allowing
+you to process different parts of your objects each with individual values
+for the control flags and variables.
+
+Menus usually require special treatment. rnlmenu() will usually to the
+job in a satisfying manner.
+
+As you might guess the result still can't be perfect. Your objects might
+need a little (or a whole lot of) fine tuning after being translated.
+Special care is also expected from the translator. She has to follow some
+simple rules while doing her job. You yourself, the programmer, should
+follow some rules when designing your object trees. The rnltree()
+function will work best if it finds all object children in rows and
+columns of constant height. This can be easily achieved by putting object
+children belonging logically together into visible or invisible boxes.
+
+For each library function you will find a manual page describing its
+functionality in detail.
+
+In the subdirectory ``example'' after building the binaries you will find
+a simple example program showing all this in a simple manner. Set the
+envariable LANGUAGE to one of the values de (German), it (Italian), fr
+(French), nl (Dutch), ga (Irish) or pt (portuguese) to select
+your preferred language. Setting the envariable to an unknown
+value will make the example program choose the default values
+``C'' (in this case English).
+
+Select the menu entry ``International...'' to see a simple text displayed
+in your selected language. The entry ``Language...'' might allow you to
+change the language even at runtime but this depends on the existence of
+the putenv() function in your standard C library. If putenv() is not
+found the entry will be disabled. You have to change the language on the
+command line.
+
+In the ``Options'' menu you can follow the metamorphosis of a GEM dialog,
+first without any treatment, then after a call to rnltree() and finally
+after some additional beauty cures. See the source and the manual
+pages rnltree(3) and rnlpush(3) for details.
+
+
+
+6. Charsets: Atari versus ISO-Latin 1
+=====================================
+
+There's a dilemma with the i18n thing. On other platforms (especially of
+the workstation sector) you can not only localize the language but also
+the charset to utilize. AFAIK there's no C library available that allows
+you to do so on Atari.
+
+A couple of years ago there was but one choice for a charset in the Atari
+sector, the charset of the Atari's built-in system font. Now more and
+more Atari users have switched to the universally used ISO-Latin 1 charset
+also known as i-8859-1, especially when using a command line interpreter.
+If you use already internationalized GNU packages you will come across
+this charset, too. (Note that both ISO-Latin 1 and the Atari charset are
+intended for use with western european languages, the Atari's charset
+to a certain extent also for Hebrew and Greek. Hence the following refers
+only to those languages).
+
+I have chosen the following way: As it is very unlikely that you use an
+ISO-Latin 1 charset with GEM, the files containing the messages for the
+example program - which has a GUI - have to be read with the Atari
+charset. But these files shouldn't go into your locale directory. The
+whole thing is provided as an example and should stay where it is (i. e.
+it isn't installed).
+
+For xgemtext you have the choice. If you use an ISO-Latin-1 font (as you
+should do) simply follow the instructions in ABOUT-NLS. If you insist on
+using a font with an Atari codeset set the environment variable LANGUAGE
+(or LC_ALL or LC_xxx) to <ll>.atarist where <ll> should specify the
+language you want to use. When installing xgemtext the appropriate
+directories in your locale directory get created. They will be called
+<localedir>/<ll>.atarist/LC_MESSAGES.
+
+
+7. Miscellanea
+==============
+
+Now something that might leave you a little uneasy: The translating
+project relies on the original programs being written in English. Say you
+have written your program in Rhaeto-Romance and you want to have it
+translated into Irish. Well, the diligent translator from the Aron
+Islands is lucky enough to understand English and she probably won't
+bother to learn Rhaeto-Romance. The only possibility to solve the problem
+is to agree upon one base language and this language is English. If you
+have made it until here through this document I'm sure you will manage to
+write the messages in your sources and resources in English, too.
+
+Of course you will have to explain your users how to benefit from the new
+i18n features of your program. Include the file ABOUT-NLS that is part
+of the GNU gettext distribution. This will tell your users the
+necessary measures to take.
+
+You should also include a copy of the file ATARI.NLS in your sources.
+This file is intended to be read by translators. They will find some
+useful hints for translating messages for GEM programs.
+
+Note that gemtext is *not* part of the GNU project! Bug reports,
+comments, compliments should be sent to the author, flames and criticism
+to /dev/null. Please also note that everything you find in the directory
+intl *is* part of the GNU gettext package. Thus, any comments concerning
+files in this subdirectory should be directed to the maintainer of the GNU
+gettext package. There are some other files that consist partly or
+entirely of copyrighted material by the Free Software Foundation. If in
+doubt check the header texts.
+
+Hope you have fun with gemtext!
+
+Guido Flohr <gufl0000@stud.uni-sb.de>.
diff --git a/THANKS b/THANKS
new file mode 100644
index 0000000..9fb5ed6
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,57 @@
+The GNU NLS utility package is the first full featured package
+directed to NLS support in the GNU packages. It has it's roots in the
+GNU C Library development and of course the (never officially
+released) GNU locale package, mostly written by Jim Meyering.
+Therefore a lot of people participated in the process of creating this
+software.
+
+Written in April-June 1995 by
+Ulrich Drepper drepper@ipd.info.uni-karlsruhe.de
+
+Special thanks to François Pinard <pinard@iro.umontreal.ca>, who did a
+major part of the testing and provided the Emacs PO mode, wrote major
+parts of the manual, and contributed the Perl interface gettext.perl.
+
+Peter Miller <millerp@canb.auug.org.au> invested a lot of his time in making
+gettext usable in other but GNU projects and wrote the msgmerge, msgcmp,
+and msgunfmt programs.
+
+Thanks to all of the following for their valuable
+hints/fixes/discussions/contributions:
+
+Andreas Schwab schwab@issan.informatik.uni-dortmund.de
+Bang Jun Young bangjy@nownuri.nowcom.co.kr
+Bill Perry wmperry@aventail.com
+Bruno Haible haible@ma2s2.mathematik.uni-karlsruhe.de
+Christian von Roques roques@pond.sub.org
+Derek Clegg derek_clegg@next.com
+Enrique Melero Gómez justine@iprolink.ch
+Eric Backus ericb@lsid.hp.com
+Francesco Potortì pot@fly.cnuce.cnr.it
+Frank Donahoe fdonahoe@wilkes1.wilkes.edu
+Greg McGary gkm@magilla.cichlid.com
+Göran Uddeborg gvran@uddeborg.pp.se
+Jakub Jelinek jj@sunsite.ms.mff.cuni.cz
+Jim Meyering meyering@na-net.ornl.gov
+Joshua R. Poulson jrp@plaza.ds.adp.com
+Karl Berry kb@cs.umb.edu
+Karl Eichwalder ke@ke.central.de
+Kaveh R. Ghazi ghazi@caip.rutgers.edu
+Kenichi Handa handa@etl.go.jp
+Larry Schwimmer rosebud@cyclone.stanford.edu
+Marcus Daniels marcus@sysc.pdx.edu
+Max de Mendizabal max@acer.com.mx
+Michel Robitaille robitail@IRO.UMontreal.CA
+Nils Naumann naumann@unileoben.ac.at
+Noah Friedman friedman@splode.com
+Paul Eggert eggert@twinsun.com
+Roland McGrath roland@gnu.ai.mit.edu
+Sakai Kiyotaka ksakai@netwk.ntt-at.co.jp
+Santiago Vila Doncel sanvila@unex.es
+Thomas E. Dickey dickey@clark.net
+Tom Tromey tromey@cygnus.com
+Uwe Ohse uwe@tirka.gun.de
+
+
+Thanks to all members of the translation teams for the different
+languages.
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..8b115d3
--- /dev/null
+++ b/TODO
@@ -0,0 +1,11 @@
+This is simply a loose collection of things I think future versions
+should have/provide. If you have further suggestions please tell me.
+
+* documentation, documentation, documentation ...
+
+* use UTF encoding for distributions
+
+* programs should know about different character sets
+
+* make xgettext understand other languages beside C/C++: Shell scripts,
+ Perl, Tcl?, Scheme, ELisp, AWK
diff --git a/acconfig.h b/acconfig.h
new file mode 100644
index 0000000..e3fd778
--- /dev/null
+++ b/acconfig.h
@@ -0,0 +1,85 @@
+/* Special definitions, processed by autoheader.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation.
+ Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */
+
+/* Default value for alignment of strings in .mo file. */
+#define DEFAULT_OUTPUT_ALIGNMENT 1
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+@TOP@
+
+/* Make sure we see all GNU extensions. */
+#undef _GNU_SOURCE
+
+/* Define to the name of the distribution. */
+#undef PACKAGE
+
+/* Define to the version of the distribution. */
+#undef VERSION
+
+/* Define if you have obstacks. */
+#undef HAVE_OBSTACK
+
+/* Define if <stddef.h> defines ptrdiff_t. */
+#undef HAVE_PTRDIFF_T
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define if you have the parse_printf_format function. */
+#undef HAVE_PARSE_PRINTF_FORMAT
+
+/* Define to 1 if NLS is requested. */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Define as 1 if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+@BOTTOM@
+
+/* We don't test for the basename function but still want to use the
+ version in the libc when compiling for a system using glibc. */
+#ifdef __GNU_LIBRARY__
+# define HAVE_BASENAME 1
+#endif
+
+/* On GNU systems we want to use the extensions. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+
+/* A file name cannot consist of any character possible. INVALID_PATH_CHAR
+ contains the characters not allowed. */
+#ifndef MSDOS
+# define INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177/"
+#else
+/* Something like this for MSDOG. */
+# define INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177\\:."
+#endif
+
+/* Length from which starting on warnings about too long strings are given.
+ Several systems have limits for strings itself, more have problems with
+ strings in their tools (important here: gencat). 1024 bytes is a
+ conservative limit. Because many translation let the message size grow
+ (German translations are always bigger) choose a length < 1024. */
+#define WARN_ID_LEN 900
+
+/* This is the page width for the message_print function. It should
+ not be set to more than 79 characters (Emacs users will appreciate
+ it). It is used to wrap the msgid and msgstr strings, and also to
+ wrap the file position (#:) comments. */
+#define PAGE_WIDTH 79
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..e2b51d2
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,989 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4
+
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+
+# serial 40 AC_PROG_LIBTOOL
+AC_DEFUN(AC_PROG_LIBTOOL,
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+
+# Save cache, so that ltconfig can load it
+AC_CACHE_SAVE
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+|| AC_MSG_ERROR([libtool configure failed])
+
+# Reload cache, that may have been modified by ltconfig
+AC_CACHE_LOAD
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+])
+
+AC_DEFUN(AC_LIBTOOL_SETUP,
+[AC_PREREQ(2.13)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_RANLIB])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags="--cache-file=$cache_file"
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
+[libtool_flags="$libtool_flags --enable-dlopen"])
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[libtool_flags="$libtool_flags --enable-win32-dll"])
+AC_ARG_ENABLE(libtool-lock,
+ [ --disable-libtool-lock avoid locking (might break parallel builds)])
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$lt_target" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw*)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+])
+esac
+])
+
+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
+AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+
+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
+AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
+
+# AC_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AC_ENABLE_SHARED[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AC_ENABLE_SHARED, [dnl
+define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)])
+
+# AC_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AC_ENABLE_STATIC[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AC_ENABLE_STATIC, [dnl
+define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
+])
+
+# AC_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)])
+
+
+# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
+define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(fast-install,
+changequote(<<, >>)dnl
+<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
+])
+
+# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
+AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)])
+
+# AC_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN(AC_PROG_LD,
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+changequote(,)dnl
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+changequote([,])dnl
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(ac_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])
+
+AC_DEFUN(AC_PROG_LD_GNU,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi])
+])
+
+# AC_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN(AC_PROG_NM,
+[AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(ac_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ ac_cv_path_NM="$NM"
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ break
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
+ else
+ ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+fi])
+NM="$ac_cv_path_NM"
+AC_MSG_RESULT([$NM])
+])
+
+# AC_CHECK_LIBM - check for math library
+AC_DEFUN(AC_CHECK_LIBM,
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case "$lt_target" in
+*-*-beos* | *-*-cygwin*)
+ # These system don't have libm
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, main, LIBM="-lm")
+ ;;
+esac
+])
+
+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl convenience library, adds --enable-ltdl-convenience to
+# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'. Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ case "$enable_ltdl_convenience" in
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+ esac
+ LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
+ INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+])
+
+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl installable library, and adds --enable-ltdl-install to
+# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'. Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ AC_CHECK_LIB(ltdl, main,
+ [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+ [if test x"$enable_ltdl_install" = xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ else
+ enable_ltdl_install=yes
+ fi
+ ])
+ if test x"$enable_ltdl_install" = x"yes"; then
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
+ LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
+ INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+ else
+ ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+ LIBLTDL="-lltdl"
+ INCLTDL=
+ fi
+])
+
+dnl old names
+AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
+AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
+AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
+
+dnl This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])dnl
+
+# From Ulrich Drepper.
+
+# serial 1
+
+AC_DEFUN(AM_TYPE_PTRDIFF_T,
+ [AC_CACHE_CHECK([for ptrdiff_t], am_cv_type_ptrdiff_t,
+ [AC_TRY_COMPILE([#include <stddef.h>], [ptrdiff_t p],
+ am_cv_type_ptrdiff_t=yes, am_cv_type_ptrdiff_t=no)])
+ if test $am_cv_type_ptrdiff_t = yes; then
+ AC_DEFINE(HAVE_PTRDIFF_T,1,[Define if system has ptrdiff_t type])
+ fi
+])
+
+dnl From Jim Meyering. Use this if you use the GNU error.[ch].
+dnl FIXME: Migrate into libit
+
+AC_DEFUN(AM_FUNC_ERROR_AT_LINE,
+[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
+ [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
+ am_cv_lib_error_at_line=yes,
+ am_cv_lib_error_at_line=no)])
+ if test $am_cv_lib_error_at_line = no; then
+ LIBOBJS="$LIBOBJS error.o"
+ fi
+ AC_SUBST(LIBOBJS)dnl
+])
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 5
+
+dnl Usage: AM_WITH_NLS([SYMBOL], [LIBDIR], [INCDIR]).
+dnl If SYMBOL is specified and is `no-categets', then the catgets
+dnl checks will be disabled.
+dnl LIBDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl INCDIR is used to find the include files. If empty,
+dnl the value `intl' is used.
+AC_DEFUN(AM_WITH_NLS,
+ [AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ USE_INCLUDED_LIBINTL=no
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ AC_DEFINE(ENABLE_NLS)
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If gettext or catgets are available (in this order) we
+ dnl use this. Else we have to fall back to GNU NLS library.
+ dnl catgets is only used if permitted by option --with-catgets.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ AC_CHECK_HEADER(libintl.h,
+ [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
+ gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CACHE_CHECK([for gettext in libintl],
+ gt_cv_func_gettext_libintl,
+ [AC_CHECK_LIB(intl, gettext,
+ gt_cv_func_gettext_libintl=yes,
+ gt_cv_func_gettext_libintl=no)],
+ gt_cv_func_gettext_libintl=no)])
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT)
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ AC_CHECK_FUNCS(dcgettext)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ INSTOBJEXT=.mo
+ fi
+ fi
+ ])
+
+ifelse([$1], no-catgets, ,[
+ if test "$CATOBJEXT" = "NONE"; then
+ AC_MSG_CHECKING([whether catgets can be used])
+ AC_ARG_WITH(catgets,
+ [ --with-catgets use catgets functions if available],
+ nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
+ AC_MSG_RESULT($nls_cv_use_catgets)
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ dnl No gettext in C library. Try catgets next.
+ AC_CHECK_LIB(i, main)
+ AC_CHECK_FUNC(catgets,
+ [AC_DEFINE(HAVE_CATGETS)
+ INTLOBJS="\$(CATOBJS)"
+ AC_PATH_PROG(GENCAT, gencat, no)dnl
+ if test "$GENCAT" != "no"; then
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
+ if test "$GMSGFMT" = "no"; then
+ AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+ fi
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='ifelse([$2],[],$(top_builddir)/intl/libintl.a,[$2])'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=ifelse([$3],[],intl,[$3])/libintl.h
+ nls_cv_header_libgt=ifelse([$3],[],intl,[$3])/libgettext.h
+ fi])
+ fi
+ fi
+])
+
+ if test "$CATOBJEXT" = "NONE"; then
+ dnl Neither gettext nor catgets in included in the C library.
+ dnl Fall back on GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_SUBST(MSGFMT)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='ifelse([$2],[],$(top_builddir)/intl/libintl.a,[$2])'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=ifelse([$3],[],intl,[$3])/libintl.h
+ nls_cv_header_libgt=ifelse([$3],[],intl,[$3])/libgettext.h
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=ifelse([$3],[],intl,[$3])/libintl.h
+ nls_cv_header_libgt=ifelse([$3],[],intl,[$3])/libgettext.h
+ fi
+ AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLDEPS)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(INTLOBJS)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+dnl Usage: Just like AM_WITH_NLS, which see.
+AC_DEFUN(AM_GNU_GETTEXT,
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next tsearch iconv stpcpy mempcpy])
+
+ AM_LC_MESSAGES
+ AM_WITH_NLS([$1],[$2],[$3])
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl The reference to <locale.h> in the installed <libintl.h> file
+ dnl must be resolved because we cannot expect the users of this
+ dnl to define HAVE_LOCALE_H.
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+ AC_SUBST(INCLUDE_LOCALE_H)
+
+ dnl Determine which catalog format we have (if any is needed)
+ dnl For now we know about two different formats:
+ dnl Linux libc-5 and the normal X/Open format
+ if test -f $srcdir/po2tbl.sed.in; then
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
+
+ dnl Transform the SED scripts while copying because some dumb SEDs
+ dnl cannot handle comments.
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ dnl po2tbl.sed is always needed.
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ dnl In the intl/Makefile.in we have a special dependency which makes
+ dnl only sense for gettext. We comment this out for non-gettext
+ dnl packages.
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+ AC_SUBST(GT_NO)
+ AC_SUBST(GT_YES)
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl *** For now the libtool support in intl/Makefile is not for real.
+ l=
+ AC_SUBST(l)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile. But only do this if the po directory
+ dnl exists in srcdir.
+ if test -d $srcdir/po; then
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ fi
+ ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ fi
+ fi])
+
+
+# serial 1
+
+AC_DEFUN(AM_PATH_LISPDIR,
+ [# If set to t, that means we are running in a shell under Emacs.
+ # If you have an Emacs named "t", then use the full path.
+ test "$EMACS" = t && EMACS=
+ AC_PATH_PROGS(EMACS, emacs xemacs, no)
+ if test $EMACS != "no"; then
+ AC_MSG_CHECKING([where .elc files should go])
+ dnl Set default value
+ lispdir="\$(datadir)/emacs/site-lisp"
+ emacs_flavor=`echo "$EMACS" | sed -e 's,^.*/,,'`
+ if test "x$prefix" = "xNONE"; then
+ if test -d $ac_default_prefix/share/$emacs_flavor/site-lisp; then
+ lispdir="\$(prefix)/share/$emacs_flavor/site-lisp"
+ else
+ if test -d $ac_default_prefix/lib/$emacs_flavor/site-lisp; then
+ lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp"
+ fi
+ fi
+ else
+ if test -d $prefix/share/$emacs_flavor/site-lisp; then
+ lispdir="\$(prefix)/share/$emacs_flavor/site-lisp"
+ else
+ if test -d $prefix/lib/$emacs_flavor/site-lisp; then
+ lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp"
+ fi
+ fi
+ fi
+ AC_MSG_RESULT($lispdir)
+ fi
+ AC_SUBST(lispdir)])
+
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..e1b5871
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1121 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to <autoconf-patches@gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
+if test x"$CC_FOR_BUILD" = x; then
+ if test x"$HOST_CC" != x; then
+ CC_FOR_BUILD="$HOST_CC"
+ else
+ if test x"$CC" != x; then
+ CC_FOR_BUILD="$CC"
+ else
+ CC_FOR_BUILD=cc
+ fi
+ fi
+fi
+
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ cat <<EOF >$dummy.s
+ .globl main
+ .ent main
+main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-cbm-sysv4
+ exit 0;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ arm32:NetBSD:*:*)
+ echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ SR2?01:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:NetBSD:*:*)
+ echo powerpc-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i?86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:4)
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=4.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ sed 's/^ //' << EOF >$dummy.c
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ rm -f $dummy.c $dummy
+ esac
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i?86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ F300:UNIX_System_V:*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ F301:UNIX_System_V:*:*)
+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+ exit 0 ;;
+ hp3[0-9][05]:NetBSD:*:*)
+ echo m68k-hp-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ if test -x /usr/bin/objformat; then
+ if test "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0
+ fi
+ fi
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:NetBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:Linux:*:*)
+
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ ld_help_string=`cd /; ld --help 2>&1`
+ ld_supported_emulations=`echo $ld_help_string \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ *ia64)
+ echo "${UNAME_MACHINE}-unknown-linux"
+ exit 0
+ ;;
+ i?86linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0
+ ;;
+ i?86coff)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0
+ ;;
+ sparclinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ armlinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32arm*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ armelf_linux*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ m68klinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32ppc)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#if defined(__GLIBC__)
+ printf("%s %s\n", __libc_version, __libc_release);
+#else
+ printf("unkown\n");
+#endif
+ return 0;
+}
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0
+ ;;
+ esac
+
+ if test "${UNAME_MACHINE}" = "alpha" ; then
+ sed 's/^ //' <<EOF >$dummy.s
+ .globl main
+ .ent main
+ main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+ elif test "${UNAME_MACHINE}" = "mips" ; then
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ else
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i?86:DYNIX/ptx:4*:*)
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i?86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i?86:*:5:7*)
+ # Fixed at (any) Pentium or better
+ UNAME_MACHINE=i586
+ if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ i?86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ pc:*:*:*)
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:*:6*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-qnx-qnx${UNAME_VERSION}
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..b525a21
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,250 @@
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+/* Special definitions, processed by autoheader.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation.
+ Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */
+
+/* Default value for alignment of strings in .mo file. */
+#define DEFAULT_OUTPUT_ALIGNMENT 1
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+
+/* Define if using alloca.c. */
+#undef C_ALLOCA
+
+/* Define to empty if the keyword does not work. */
+#undef const
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
+
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
+
+/* Define if you don't have vprintf but do have _doprnt. */
+#undef HAVE_DOPRNT
+
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define if you have the vprintf function. */
+#undef HAVE_VPRINTF
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef off_t
+
+/* Define if you need to in order for stat and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+#undef size_t
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Make sure we see all GNU extensions. */
+#undef _GNU_SOURCE
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define if you have the parse_printf_format function. */
+#undef HAVE_PARSE_PRINTF_FORMAT
+
+/* Define to 1 if NLS is requested. */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* Define if you have the dcgettext function. */
+#undef HAVE_DCGETTEXT
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getdelim function. */
+#undef HAVE_GETDELIM
+
+/* Define if you have the getline function. */
+#undef HAVE_GETLINE
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the iconv function. */
+#undef HAVE_ICONV
+
+/* Define if you have the mblen function. */
+#undef HAVE_MBLEN
+
+/* Define if you have the memcpy function. */
+#undef HAVE_MEMCPY
+
+/* Define if you have the memmove function. */
+#undef HAVE_MEMMOVE
+
+/* Define if you have the mempcpy function. */
+#undef HAVE_MEMPCPY
+
+/* Define if you have the memset function. */
+#undef HAVE_MEMSET
+
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the stpncpy function. */
+#undef HAVE_STPNCPY
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
+/* Define if you have the strcspn function. */
+#undef HAVE_STRCSPN
+
+/* Define if you have the strdup function. */
+#undef HAVE_STRDUP
+
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
+
+/* Define if you have the strncasecmp function. */
+#undef HAVE_STRNCASECMP
+
+/* Define if you have the strstr function. */
+#undef HAVE_STRSTR
+
+/* Define if you have the strtoul function. */
+#undef HAVE_STRTOUL
+
+/* Define if you have the tsearch function. */
+#undef HAVE_TSEARCH
+
+/* Define if you have the uname function. */
+#undef HAVE_UNAME
+
+/* Define if you have the vasprintf function. */
+#undef HAVE_VASPRINTF
+
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
+/* Define if you have the i library (-li). */
+#undef HAVE_LIBI
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if system has ptrdiff_t type */
+#undef HAVE_PTRDIFF_T
+
+
+/* We don't test for the basename function but still want to use the
+ version in the libc when compiling for a system using glibc. */
+#ifdef __GNU_LIBRARY__
+# define HAVE_BASENAME 1
+#endif
+
+/* On GNU systems we want to use the extensions. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+
+/* A file name cannot consist of any character possible. INVALID_PATH_CHAR
+ contains the characters not allowed. */
+#ifndef MSDOS
+# define INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177/"
+#else
+/* Something like this for MSDOG. */
+# define INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177\\:."
+#endif
+
+/* Length from which starting on warnings about too long strings are given.
+ Several systems have limits for strings itself, more have problems with
+ strings in their tools (important here: gencat). 1024 bytes is a
+ conservative limit. Because many translation let the message size grow
+ (German translations are always bigger) choose a length < 1024. */
+#define WARN_ID_LEN 900
+
+/* This is the page width for the message_print function. It should
+ not be set to more than 79 characters (Emacs users will appreciate
+ it). It is used to wrap the msgid and msgstr strings, and also to
+ wrap the file position (#:) comments. */
+#define PAGE_WIDTH 79
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..28426bb
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1232 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+ echo Configuration name missing. 1>&2
+ echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+ echo "or $0 ALIAS" 1>&2
+ echo where ALIAS is a recognized configuration type. 1>&2
+ exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+ *local*)
+ echo $1
+ exit 0
+ ;;
+ *)
+ ;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ linux-gnu*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+ | 580 | i960 | h8300 \
+ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+ | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
+ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+ | mips64orion | mips64orionel | mipstx39 | mipstx39el \
+ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+ | mips64vr5000 | miprs64vr5000el | mcore \
+ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+ | thumb | d10v | fr30)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i[34567]86)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ # FIXME: clean up the formatting here.
+ vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+ | xmp-* | ymp-* \
+ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
+ | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
+ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+ | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+ | mipstx39-* | mipstx39el-* | mcore-* \
+ | f301-* | armv*-* | t3e-* \
+ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+ | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-cbm
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-cbm
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-cbm
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ cray2)
+ basic_machine=cray2-cray
+ os=-unicos
+ ;;
+ [ctj]90-cray)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i[34567]86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i[34567]86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i[34567]86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i[34567]86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ i386-go32 | go32)
+ basic_machine=i386-unknown
+ os=-go32
+ ;;
+ i386-mingw32 | mingw32)
+ basic_machine=i386-unknown
+ os=-mingw32
+ ;;
+ i386-qnx | qnx)
+ basic_machine=i386-qnx
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux-gnu
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux-gnu
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ msdos)
+ basic_machine=i386-unknown
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexen)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexen-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=rs6000-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sparclite-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=t3e-cray
+ os=-unicos
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xmp)
+ basic_machine=xmp-cray
+ os=-unicos
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ mips)
+ if [ x$os = x-linux-gnu ]; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sparc | sparcv9)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ c4x*)
+ basic_machine=c4x-none
+ os=-coff
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -qnx)
+ os=-qnx4
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -*MiNT)
+ os=-mint
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f301-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -*MiNT)
+ vendor=atari
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
diff --git a/configure b/configure
new file mode 100755
index 0000000..38f6c5f
--- /dev/null
+++ b/configure
@@ -0,0 +1,4783 @@
+#! /bin/sh
+
+# From configure.in Revision: 1.143
+
+
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+
+
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+
+
+
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+
+
+
+# serial 40 AC_PROG_LIBTOOL
+
+
+
+
+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
+
+
+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
+
+
+# AC_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AC_ENABLE_SHARED[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+
+
+# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
+
+
+# AC_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AC_ENABLE_STATIC[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+
+
+# AC_DISABLE_STATIC - set the default static flag to --disable-static
+
+
+
+# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+
+
+# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
+
+
+# AC_PROG_LD - find the path to the GNU or non-GNU linker
+
+
+
+
+# AC_PROG_NM - find the path to a BSD-compatible name lister
+
+
+# AC_CHECK_LIBM - check for math library
+
+
+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl convenience library, adds --enable-ltdl-convenience to
+# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'. Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+
+
+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl installable library, and adds --enable-ltdl-install to
+# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'. Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+
+
+
+
+# From Ulrich Drepper.
+
+# serial 1
+
+
+
+
+
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 5
+
+
+
+
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+
+
+
+# serial 1
+
+
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-shared[=PKGS] build shared libraries [default=yes]"
+ac_help="$ac_help
+ --enable-static[=PKGS] build static libraries [default=yes]"
+ac_help="$ac_help
+ --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
+ac_help="$ac_help
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
+ac_help="$ac_help
+ --disable-libtool-lock avoid locking (might break parallel builds)"
+ac_help="$ac_help
+ --disable-nls do not use Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
+ac_help="$ac_help
+ --with-catgets use catgets functions if available"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=src/msgfmt.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:723: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:776: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:833: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=gettext
+
+VERSION=0.10.36
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:879: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:892: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:905: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:918: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:931: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+
+
+
+
+ALL_LINGUAS="da de el es fr ko nl no no@nynorsk pl pt sl sv"
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:953: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:983: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1034: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1066: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1077 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1108: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1113: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1141: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_shared=yes
+fi
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval="$enable_static"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_static=yes
+fi
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval="$enable_fast_install"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_fast_install=yes
+fi
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:1248: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:1269: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1289: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:1328: checking for ld used by GCC" >&5
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:1352: checking for GNU ld" >&5
+else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:1355: checking for non-GNU ld" >&5
+fi
+if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:1390: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+
+
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:1406: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ ac_cv_path_NM="$NM"
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ break
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
+ else
+ ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+fi
+fi
+
+NM="$ac_cv_path_NM"
+echo "$ac_t""$NM" 1>&6
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1442: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags="--cache-file=$cache_file"
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+ :
+fi
+
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$lt_target" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 1491 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:1513: checking whether the C compiler needs -belf" >&5
+if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1518 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ lt_cv_cc_needs_belf=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+
+
+esac
+
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:1627: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+ echo "$ac_t""yes" 1>&6
+ ISC=yes # If later tests want to check for ISC.
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ if test "$GCC" = yes; then
+ CC="$CC -posix"
+ else
+ CC="$CC -Xp"
+ fi
+else
+ echo "$ac_t""no" 1>&6
+ ISC=
+fi
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:1659: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+for ac_prog in 'bison -y' byacc
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1716: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_YACC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+YACC="$ac_cv_prog_YACC"
+if test -n "$YACC"; then
+ echo "$ac_t""$YACC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+
+cat >> confdefs.h <<\EOF
+#define _GNU_SOURCE 1
+EOF
+
+
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1754: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1769 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1786 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1803 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1834: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1839 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1864 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1882 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1903 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+for ac_hdr in limits.h malloc.h string.h unistd.h values.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1941: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1946 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:1979: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1984 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:2033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2054: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat > conftest.$ac_ext <<EOF
+#line 2061 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2094: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2099 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2127: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2132 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
+echo "configure:2160: checking for ptrdiff_t" >&5
+if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2165 "configure"
+#include "confdefs.h"
+#include <stddef.h>
+int main() {
+ptrdiff_t p
+; return 0; }
+EOF
+if { (eval echo configure:2172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_type_ptrdiff_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_type_ptrdiff_t=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
+ if test $am_cv_type_ptrdiff_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PTRDIFF_T 1
+EOF
+
+ fi
+
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:2196: checking for working alloca.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2201 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_header_alloca_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2229: checking for alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2234 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_func_alloca_works=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2294: checking whether alloca needs Cray hooks" >&5
+if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2299 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2324: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2329 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2379: checking stack direction for C alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2387 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_stack_direction=1
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+echo $ac_n "checking for vprintf""... $ac_c" 1>&6
+echo "configure:2428: checking for vprintf" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2433 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char vprintf(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char vprintf();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_vprintf) || defined (__stub___vprintf)
+choke me
+#else
+vprintf();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_vprintf=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_vprintf=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_VPRINTF 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test "$ac_cv_func_vprintf" != yes; then
+echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
+echo "configure:2480: checking for _doprnt" >&5
+if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2485 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char _doprnt();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub__doprnt) || defined (__stub____doprnt)
+choke me
+#else
+_doprnt();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func__doprnt=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func__doprnt=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_DOPRNT 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+for ac_func in getcwd mblen memcpy strchr strerror uname
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2535: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2540 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getline memmove memset stpcpy stpncpy strcspn \
+strncasecmp strstr strtoul vasprintf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2591: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2596 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
+fi
+done
+
+
+if test $ac_cv_func_getline != yes; then
+ for ac_func in getdelim
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2649: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2654 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+echo $ac_n "checking for parse_printf_format""... $ac_c" 1>&6
+echo "configure:2704: checking for parse_printf_format" >&5
+if eval "test \"`echo '$''{'ac_cv_func_parse_printf_format'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2709 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char parse_printf_format(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char parse_printf_format();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_parse_printf_format) || defined (__stub___parse_printf_format)
+choke me
+#else
+parse_printf_format();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_parse_printf_format=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_parse_printf_format=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'parse_printf_format`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ gt_cv_func_parse_printf_format=yes
+else
+ echo "$ac_t""no" 1>&6
+gt_cv_func_parse_printf_format=no
+fi
+
+if test $gt_cv_func_parse_printf_format = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PARSE_PRINTF_FORMAT 1
+EOF
+
+else
+ LIBOBJS="$LIBOBJS printf-prs.o"
+fi
+
+echo $ac_n "checking for error_at_line""... $ac_c" 1>&6
+echo "configure:2762: checking for error_at_line" >&5
+if eval "test \"`echo '$''{'am_cv_lib_error_at_line'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2767 "configure"
+#include "confdefs.h"
+
+int main() {
+error_at_line(0, 0, "", 0, "");
+; return 0; }
+EOF
+if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_lib_error_at_line=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_lib_error_at_line=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_lib_error_at_line" 1>&6
+ if test $am_cv_lib_error_at_line = no; then
+ LIBOBJS="$LIBOBJS error.o"
+ fi
+
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2796: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2801 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2835: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2840 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2888: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2896 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3064: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3069 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next tsearch iconv
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3104: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3109 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3161: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3166 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test "${ac_cv_func_mempcpy+set}" != "set"; then
+ for ac_func in mempcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3225: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3230 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_mempcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MEMPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:3287: checking for LC_MESSAGES" >&5
+if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3292 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:3320: checking whether NLS is requested" >&5
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3340: checking whether included gettext is requested" >&5
+ # Check whether --with-included-gettext or --without-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then
+ withval="$with_included_gettext"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3359: checking for libintl.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3364 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
+echo "configure:3386: checking for gettext in libc" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3391 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
+echo "configure:3414: checking for bindtextdomain in -lintl" >&5
+ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3422 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
+echo "configure:3449: checking for gettext in libintl" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
+echo "configure:3454: checking for gettext in -lintl" >&5
+ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3462 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettext();
+
+int main() {
+gettext()
+; return 0; }
+EOF
+if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ gt_cv_func_gettext_libintl=yes
+else
+ echo "$ac_t""no" 1>&6
+gt_cv_func_gettext_libintl=no
+fi
+
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+EOF
+
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3512: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3546: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3551 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3601: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3637: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 3669 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
+EOF
+if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
+echo "configure:3701: checking whether catgets can be used" >&5
+ # Check whether --with-catgets or --without-catgets was given.
+if test "${with_catgets+set}" = set; then
+ withval="$with_catgets"
+ nls_cv_use_catgets=$withval
+else
+ nls_cv_use_catgets=no
+fi
+
+ echo "$ac_t""$nls_cv_use_catgets" 1>&6
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ echo $ac_n "checking for main in -li""... $ac_c" 1>&6
+echo "configure:3714: checking for main in -li" >&5
+ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-li $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3722 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-li $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ echo $ac_n "checking for catgets""... $ac_c" 1>&6
+echo "configure:3757: checking for catgets" >&5
+if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3762 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char catgets(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char catgets();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_catgets) || defined (__stub___catgets)
+choke me
+#else
+catgets();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_catgets=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_catgets=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_CATGETS 1
+EOF
+
+ INTLOBJS="\$(CATOBJS)"
+ # Extract the first word of "gencat", so it can be a program name with args.
+set dummy gencat; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3807: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GENCAT" in
+ /*)
+ ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GENCAT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
+ ;;
+esac
+fi
+GENCAT="$ac_cv_path_GENCAT"
+if test -n "$GENCAT"; then
+ echo "$ac_t""$GENCAT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$GENCAT" != "no"; then
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3843: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test "$GMSGFMT" = "no"; then
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3880: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3915: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ fi
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3974: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4008: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4044: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:4137: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+
+
+ if test -f $srcdir/po2tbl.sed.in; then
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
+echo "configure:4166: checking for linux/version.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4171 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+ l=
+
+
+ if test -d $srcdir/po; then
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ fi
+
+
+# If set to t, that means we are running in a shell under Emacs.
+ # If you have an Emacs named "t", then use the full path.
+ test "$EMACS" = t && EMACS=
+ for ac_prog in emacs xemacs
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4252: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_EMACS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$EMACS" in
+ /*)
+ ac_cv_path_EMACS="$EMACS" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_EMACS="$EMACS" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_EMACS="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+EMACS="$ac_cv_path_EMACS"
+if test -n "$EMACS"; then
+ echo "$ac_t""$EMACS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$EMACS" && break
+done
+test -n "$EMACS" || EMACS="no"
+
+ if test $EMACS != "no"; then
+ echo $ac_n "checking where .elc files should go""... $ac_c" 1>&6
+echo "configure:4290: checking where .elc files should go" >&5
+ lispdir="\$(datadir)/emacs/site-lisp"
+ emacs_flavor=`echo "$EMACS" | sed -e 's,^.*/,,'`
+ if test "x$prefix" = "xNONE"; then
+ if test -d $ac_default_prefix/share/$emacs_flavor/site-lisp; then
+ lispdir="\$(prefix)/share/$emacs_flavor/site-lisp"
+ else
+ if test -d $ac_default_prefix/lib/$emacs_flavor/site-lisp; then
+ lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp"
+ fi
+ fi
+ else
+ if test -d $prefix/share/$emacs_flavor/site-lisp; then
+ lispdir="\$(prefix)/share/$emacs_flavor/site-lisp"
+ else
+ if test -d $prefix/lib/$emacs_flavor/site-lisp; then
+ lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp"
+ fi
+ fi
+ fi
+ echo "$ac_t""$lispdir" 1>&6
+ fi
+
+
+ACLOCAL_VERSION=`sed -e 's/.*Last updated for gettext-\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/p' -e d $srcdir/aclocal.m4`
+
+
+aclocaldir='${datadir}/aclocal'
+
+
+
+test -d intl || mkdir intl
+echo "GNU gettext library from $PACKAGE-$VERSION" > intl/VERSION
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile lib/Makefile intl/Makefile src/Makefile \
+ po/Makefile.in doc/Makefile tests/Makefile m4/Makefile \
+ misc/Makefile misc/gettextize intl/intlh.inst config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@RANLIB@%$RANLIB%g
+s%@LN_S@%$LN_S%g
+s%@LIBTOOL@%$LIBTOOL%g
+s%@YACC@%$YACC%g
+s%@CPP@%$CPP%g
+s%@ALLOCA@%$ALLOCA%g
+s%@LIBOBJS@%$LIBOBJS%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@GENCAT@%$GENCAT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
+s%@EMACS@%$EMACS%g
+s%@lispdir@%$lispdir%g
+s%@ACLOCAL_VERSION@%$ACLOCAL_VERSION%g
+s%@aclocaldir@%$aclocaldir%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile intl/Makefile src/Makefile \
+ po/Makefile.in doc/Makefile tests/Makefile m4/Makefile \
+ misc/Makefile misc/gettextize intl/intlh.inst"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+ac_sources="$nls_cv_header_libgt"
+ac_dests="$nls_cv_header_intl"
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+srcdir=$ac_given_srcdir
+while test -n "$ac_sources"; do
+ set $ac_dests; ac_dest=$1; shift; ac_dests=$*
+ set $ac_sources; ac_source=$1; shift; ac_sources=$*
+
+ echo "linking $srcdir/$ac_source to $ac_dest"
+
+ if test ! -r $srcdir/$ac_source; then
+ { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
+ fi
+ rm -f $ac_dest
+
+ # Make relative symlinks.
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
+ # The dest file is in a subdirectory.
+ test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
+ ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dest_dir_suffix.
+ ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dest_dir_suffix= ac_dots=
+ fi
+
+ case "$srcdir" in
+ [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
+ *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
+ esac
+
+ # Make a symlink if possible; otherwise try a hard link.
+ if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+ ln $srcdir/$ac_source $ac_dest; then :
+ else
+ { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
+ fi
+done
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..0684fda
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,83 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.12)
+AC_REVISION($Revision: 1.1 $)
+AC_INIT(src/msgfmt.c)
+AM_INIT_AUTOMAKE(gettext, 0.10.36)
+AM_CONFIG_HEADER(config.h)
+
+dnl Set of available languages.
+ALL_LINGUAS="da de el es fr ko nl no no@nynorsk pl pt sl sv"
+
+dnl Checks for programs.
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AC_ISC_POSIX
+AC_PROG_INSTALL
+AC_PROG_YACC
+
+dnl Make sure we see all GNU extensions.
+AC_DEFINE(_GNU_SOURCE)
+
+dnl Checks for libraries.
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AM_TYPE_PTRDIFF_T
+
+dnl Checks for library functions.
+AC_FUNC_ALLOCA
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([getcwd mblen memcpy strchr strerror uname])
+AC_REPLACE_FUNCS([getline memmove memset stpcpy stpncpy strcspn \
+strncasecmp strstr strtoul vasprintf])
+if test $ac_cv_func_getline != yes; then
+ AC_CHECK_FUNCS(getdelim)
+fi
+
+AC_CHECK_FUNC(parse_printf_format, gt_cv_func_parse_printf_format=yes,
+ gt_cv_func_parse_printf_format=no)
+if test $gt_cv_func_parse_printf_format = yes; then
+ AC_DEFINE(HAVE_PARSE_PRINTF_FORMAT)
+else
+ LIBOBJS="$LIBOBJS printf-prs.o"
+fi
+
+AM_FUNC_ERROR_AT_LINE
+
+dnl These are the only lines required to internationalize the package.
+dnl (OK, not quite, the AC_OUTPUT has also some parts.)
+AM_GNU_GETTEXT
+
+dnl Check for Emacs and where to install .elc files.
+AM_PATH_LISPDIR
+
+dnl The gettextize script test for the version of the aclocal.m4 file in
+dnl user's project. This must correspond to the number the aclocal.m4
+dnl here has. Extract it.
+changequote(,)dnl
+ACLOCAL_VERSION=`sed -e 's/.*Last updated for gettext-\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/p' -e d $srcdir/aclocal.m4`
+changequote([, ])dnl
+AC_SUBST(ACLOCAL_VERSION)
+
+aclocaldir='${datadir}/aclocal'
+AC_SUBST(aclocaldir)
+
+
+dnl Generate the version information file in the intl/ directory.
+test -d intl || mkdir intl
+echo "GNU gettext library from $PACKAGE-$VERSION" > intl/VERSION
+
+AC_OUTPUT([Makefile lib/Makefile intl/Makefile src/Makefile \
+ po/Makefile.in doc/Makefile tests/Makefile m4/Makefile \
+ misc/Makefile misc/gettextize intl/intlh.inst])
+dnl misc/Makefile misc/gettextize intl/intlh.inst],
+dnl [case "$CONFIG_FILES" in *po/Makefile.in*)
+dnl sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+dnl esac])
diff --git a/doc/Admin/documentation b/doc/Admin/documentation
new file mode 100644
index 0000000..beb1d47
--- /dev/null
+++ b/doc/Admin/documentation
@@ -0,0 +1,1692 @@
+BABYL OPTIONS: -*- rmail -*-
+Version: 5
+Labels:
+Note: This is the header of an rmail file.
+Note: If you are seeing it in rmail,
+Note: it means the file has no messages in it.
+
+1, edited,,
+From: terrell@druhi.ATT.COM (TerrellE)
+Newsgroups: comp.sys.ibm.pc,sci.astro
+Subject: Internationalization of Software?
+Date: 30 Jun 89 19:05:23 GMT
+Reply-To: terrell@druhi.ATT.COM (TerrellE)
+Organization: AT&T, Denver, CO
+
+*** EOOH ***
+From: terrell@druhi.ATT.COM (TerrellE)
+Newsgroups: comp.sys.ibm.pc,sci.astro
+Subject: Internationalization of Software?
+Date: 30 Jun 89 19:05:23 GMT
+Reply-To: terrell@druhi.ATT.COM (TerrellE)
+
+I know that there are some modifications that I will have to perform to
+"internationalize" software products developed for use in the USA.
+These changes include the obvious (translate the program
+and documentation into the right language). However, some of the
+other changes are more subtle. I'm sure that I've overlooked some, but
+here's what I have so far:
+
+Necessary changes to "internationalize" a software product:
+
+1. Flexible date format:
+
+ dd/mm/yy
+ yy/dd/mm
+ yy/mm/dd
+ mm/dd/yy
+
+2. Handle foreign daylight savings time.
+
+3. Flexible radix (decimal) point (i.e. '.' or ','):
+
+ 3.14159
+ 3,14159
+
+4. Allow English or Metric units.
+
+5. Use "one thousand million" rather than "one billion".
+
+6. Flexible time format:
+
+ hh:mm
+ hh.mm
+ hh'mm
+
+7. Allow either ' ' or ',' for thousands delimiters:
+
+ 1,000,000
+ 1 000 000
+
+
+What else is necessary? Overseas users: what changes would you make
+to your "US Version" software to make it approprate for use in other
+countries?
+
+I'll post a summary of the results. Thanks in advance,
+
+
+
+Eric Terrell (att!druhi!terrell)
+
+1,,
+Xref: IRO.UMontreal.CA comp.std.c:13991 comp.software.international:607
+Path: IRO.UMontreal.CA!CC.UMontreal.CA!newsflash.concordia.ca!utcsri!utnut!cs.utexas.edu!howland.reston.ans.net!nctuccca.edu.tw!news.cc.nctu.edu.tw!mall!ywliu
+From: ywliu@beta.wsl.sinica.edu.tw ()
+Newsgroups: comp.std.c,comp.software.international
+Subject: Re: ANSI C Locale Character Sets
+Followup-To: comp.std.c,comp.software.international
+Date: 3 Oct 1994 06:39:25 GMT
+Organization: Computing Center, Academia Sinica
+Lines: 26
+Message-ID: <36o8ut$afu@mall.sinica.edu.tw>
+References: <Cx0Mpy.7Lo@actrix.gen.nz>
+NNTP-Posting-Host: ywliu%@beta.wsl.sinica.edu.tw
+X-Newsreader: TIN [version 1.2 PL0]
+
+*** EOOH ***
+From: ywliu@beta.wsl.sinica.edu.tw ()
+Newsgroups: comp.std.c,comp.software.international
+Subject: Re: ANSI C Locale Character Sets
+Followup-To: comp.std.c,comp.software.international
+Date: 3 Oct 1994 06:39:25 GMT
+Organization: Computing Center, Academia Sinica
+References: <Cx0Mpy.7Lo@actrix.gen.nz>
+NNTP-Posting-Host: ywliu%@beta.wsl.sinica.edu.tw
+X-Newsreader: TIN [version 1.2 PL0]
+
+Gary Houston (ghouston@actrix.gen.nz) wrote:
+: It seems to me there are a couple of details missing from the ANSI C
+: locale stuff:
+
+: 1/ How can a program find out which character set is being used?
+
+
+ You may use setlocale(LC_ALL,NULL) to get the language info.
+
+: 2/ How can a program determine whether text files use multibyte or
+: wide characters, or is it to be assumed that multibyte will
+: always be used?
+
+ As far as I am concerned, the wide character is used as the representation
+inside your program. That is, wide character is your internal data
+representatin form, as I/O operates on multi-byte characters. So, I always
+read/write mutl-bytes and convert to wide character , and vice versa.
+
+: Does anyone know of other standards/conventions/plans which fill
+: in this missing information?
+
+ You may check out P.J. Plauger's "Standard C" column on CUJ May 1993 - July
+1993. There is another one "Internationlization and Localization" in CUJ July
+ 1993 too. I am looking for more material.
+
+Yen-Wei Liu
+
+1, edited, answered,,
+Mail-from: From orac.iinet.com.au!pdcruze Thu Nov 24 17:38:19 1994
+Return-Path: <orac.iinet.com.au!pdcruze>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0rAmnw-00009aC; Thu, 24 Nov 94 17:38 EST
+Received: from lagrande.iro.umontreal.ca by iros1.IRO.UMontreal.CA (8.6.9) with ESMTP
+ id LAA06293; Thu, 24 Nov 1994 11:57:58 -0500
+Received: from saguenay.IRO.UMontreal.CA (root@saguenay32.IRO.UMontreal.CA [132.204.32.54]) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) with ESMTP id LAA23939 for <pinard@lagrande.IRO.UMontreal.CA>; Thu, 24 Nov 1994 11:57:50 -0500
+Received: from uniwa.uwa.edu.au (root@uniwa.uwa.edu.au [130.95.128.1]) by saguenay.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id LAA20957 for <pinard@IRO.UMontreal.CA>; Thu, 24 Nov 1994 11:57:46 -0500
+Received: from orac.iinet.com.au (orac.iinet.com.au [203.0.178.134]) by uniwa.uwa.edu.au (8.6.9/8.6.9) with ESMTP id AAA09394; Fri, 25 Nov 1994 00:57:29 +0800
+Received: from orac.iinet.com.au (pdcruze@localhost [127.0.0.1]) by orac.iinet.com.au (8.6.9/8.6.9) with ESMTP id AAA08605; Fri, 25 Nov 1994 00:57:11 +0800
+Message-Id: <199411241657.AAA08605@orac.iinet.com.au>
+To: pinard@IRO.UMontreal.CA
+cc: meyering@comco.com
+Subject: Re: Starting localization of GNU recode
+In-reply-to: Your message of "Thu, 24 Nov 1994 01:11:00 EST."
+ <m0rAXP2-00008sC@icule>
+Date: Fri, 25 Nov 1994 00:57:10 +0800
+From: "Patrick D'Cruze" <pdcruze@li.org>
+
+*** EOOH ***
+To: pinard@IRO.UMontreal.CA
+cc: meyering@comco.com
+Subject: Re: Starting localization of GNU recode
+In-reply-to: Your message of "Thu, 24 Nov 1994 01:11:00 EST."
+ <m0rAXP2-00008sC@icule>
+Date: Fri, 25 Nov 1994 00:57:10 +0800
+From: "Patrick D'Cruze" <pdcruze@li.org>
+
+> I met a few points of discussion while doing so:
+>
+> * I got to decide that, even if the program will eventually make
+> most of its output in the foreign languages, the input syntax,
+> option values, etc., are not to be localized.
+
+Yes. The purpose of message catalogs was to provide an easy to use method
+for displaying language independent messages. Hence little modifications
+need to be made to support this. However, no easy method exists for
+supporting language-independent inputs. So this will have to be left up to
+the developer to decide how they are going to implement this.
+
+> * it is not useful that I modify the lib/ routines if not done in the
+> true sources. How do you/I/they proceed for getting this job done?
+> I presume that lib/ routines will all use gettext for the time being.
+
+Probably Roland (or another volunteer) will internationalize glibc. Linux's
+libc has already been internationalised and a few message catalogs
+already exist - French, German, Polish. It probably would be useful
+modifying the routines in lib/ for those platforms that will be using
+the routines located in libc/.
+
+> I was expecting a problem which I did not met. All localizable
+> strings were luckily into executable positions, that is, affected
+> to variables or given as parameter to functions. But I will not
+> escape this problem in all my things, and will surely hit some
+> localizable strings in structured initializations. I'll see once
+> there, unless you thought out an all ready solution for this (?).
+
+I've come across this a few times within diffutils. Particularly struct
+definitions and the like. I'll send you a list of guidelines when looking
+for output messages. Will send this to you and Jim tommorrow.
+
+Regards,
+Patrick
+
+
+
+1, edited,,
+Mail-from: From pinard Mon Nov 28 12:15:47 1994
+Return-Path: <pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0rC9fz-00008uC; Mon, 28 Nov 94 12:15 EST
+Message-Id: <m0rC9fz-00008uC@icule>
+Date: Mon, 28 Nov 94 12:15 EST
+From: pinard (Francois Pinard)
+To: Richard M. Stallman <rms@prep.ai.mit.edu>
+CC: Jim Meyering <meyering@comco.com>
+Subject: GNU standards and localized message catalogs
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+
+*** EOOH ***
+Date: Mon, 28 Nov 94 12:15 EST
+From: pinard (Francois Pinard)
+To: Richard M. Stallman <rms@prep.ai.mit.edu>
+CC: Jim Meyering <meyering@comco.com>
+Subject: GNU standards and localized message catalogs
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+
+* We also need a uniform convention about where, in the installed
+hierarchy, to put translations of manuals in long term. The need is
+not immediate. One friend volunteered to translate the GNU recode
+manual in French. If this happens, I would like to know first *if*
+the distribution should install it by default, and where it should
+install it then. If not installed by default, what would be the
+uniform naming scheme for Makefile goals installing documents?
+
+1, edited,,
+Mail-from: From pinard Sat Dec 24 23:51:00 1994
+Return-Path: <pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0rLkv4-00009AC; Sat, 24 Dec 94 23:50 EST
+Message-Id: <m0rLkv4-00009AC@icule>
+Date: Sat, 24 Dec 94 23:50 EST
+From: pinard (Francois Pinard)
+To: rms@gnu.ai.mit.edu
+In-reply-to: <199412250445.XAA25324@mole.gnu.ai.mit.edu> (message from Richard Stallman on Sat, 24 Dec 1994 23:45:19 -0500)
+Subject: Re: GNU standards and localized message catalogs
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+*** EOOH ***
+Date: Sat, 24 Dec 94 23:50 EST
+From: pinard (Francois Pinard)
+To: rms@gnu.ai.mit.edu
+In-reply-to: <199412250445.XAA25324@mole.gnu.ai.mit.edu> (message from Richard Stallman on Sat, 24 Dec 1994 23:45:19 -0500)
+Subject: Re: GNU standards and localized message catalogs
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+ * We also need a uniform convention about where, in the installed
+ hierarchy, to put translations of manuals in long term.
+
+ I think they should go in the Info tree just like English manuals.
+
+Yes, of course. Suppose I have a French recode.info, and an
+English one. This kind of thing will not be immediate, but they
+will come. We need some convention to install both. We are not
+to give them different names, presumably. People will like to
+say, on an individual basis: ``if a French version of something is
+available, I'll prefer it over the standard English one''. So we
+need a convention to stock these, and a convention to select them.
+
+1,,
+Mail-from: From gnu.ai.mit.edu!rms Sun Dec 25 05:16:06 1994
+Return-Path: <gnu.ai.mit.edu!rms>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0rLpze-00009IC; Sun, 25 Dec 94 05:16 EST
+Received: from lagrande.iro.umontreal.ca (lagrande.IRO.UMontreal.CA [132.204.32.32]) by iros1.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id AAA12366 for <icule!pinard>; Sun, 25 Dec 1994 00:01:47 -0500
+Received: from saguenay.IRO.UMontreal.CA (root@saguenay32.IRO.UMontreal.CA [132.204.32.54]) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) with ESMTP id AAA10584 for <pinard@lagrande.IRO.UMontreal.CA>; Sun, 25 Dec 1994 00:01:46 -0500
+Received: from mole.gnu.ai.mit.edu (rms@mole.gnu.ai.mit.edu [128.52.46.33]) by saguenay.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id AAA14869 for <pinard@iro.umontreal.ca>; Sun, 25 Dec 1994 00:01:37 -0500
+Received: by mole.gnu.ai.mit.edu (8.6.9/4.0)
+ id <AAA25411@mole.gnu.ai.mit.edu>; Sun, 25 Dec 1994 00:01:33 -0500
+Date: Sun, 25 Dec 1994 00:01:33 -0500
+Message-Id: <199412250501.AAA25411@mole.gnu.ai.mit.edu>
+From: Richard Stallman <rms@gnu.ai.mit.edu>
+To: pinard@iro.umontreal.ca
+In-reply-to: <m0rLkv4-00009AC@icule> (pinard@iro.umontreal.ca)
+Subject: Re: GNU standards and localized message catalogs
+
+*** EOOH ***
+Date: Sun, 25 Dec 1994 00:01:33 -0500
+From: Richard Stallman <rms@gnu.ai.mit.edu>
+To: pinard@iro.umontreal.ca
+In-reply-to: <m0rLkv4-00009AC@icule> (pinard@iro.umontreal.ca)
+Subject: Re: GNU standards and localized message catalogs
+
+ We need some convention to install both. We are not
+ to give them different names, presumably.
+
+I would give them different names. They would have
+separate menu items in the Info directory. That is the
+easiest way and it seems good enough, so I don't see a reason
+to spend time looking for any other way.
+
+
+1, edited,,
+Mail-from: From pinard Tue Jan 3 16:17:29 1995
+Return-Path: <pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0rPGbe-00008xC; Tue, 3 Jan 95 16:17 EST
+Message-Id: <m0rPGbe-00008xC@icule>
+Date: Tue, 3 Jan 95 16:17 EST
+From: pinard (Francois Pinard)
+To: vern@ee.lbl.gov
+In-reply-to: <199501031914.LAA00333@daffy.ee.lbl.gov> (message from Vern Paxson on Tue, 03 Jan 95 11:14:17 PST)
+Subject: Re: Internationalization of Flex
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+*** EOOH ***
+Date: Tue, 3 Jan 95 16:17 EST
+From: pinard (Francois Pinard)
+To: vern@ee.lbl.gov
+In-reply-to: <199501031914.LAA00333@daffy.ee.lbl.gov> (message from Vern Paxson on Tue, 03 Jan 95 11:14:17 PST)
+Subject: Re: Internationalization of Flex
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+There are two categories of patches: a grouped set at initialization
+time, and all-over-the-place one which marks localizable strings.
+We can consider them separately (but I will most probably end up
+suggesting we give them the same treatment...).
+
+What would be easier would be that the original Flex sources already
+marks all strings which require localization. The way I do it in my
+things is merely replacing each "STRING" by _("STRING") *if* STRING
+should be translated. Flex could then be distributed with:
+
+ #define _(String) (String)
+
+effectively ignoring the marks. I may provide an initial patch
+to you for this. Later on, the maintenance would be relatively
+easy for you: if you add or modify a string, you will have to
+ask yourself if the new or altered string requires translation,
+and include it within _() if you think it should be translated.
+"%s: %d" is an example of string not requiring translation...
+
+The remaining work will be handled by group of volunteers from
+different countries. I took the responsibility of organizing how
+these things will be done. Once in a while, volunteers will provide
+you some COUNTRY.tt files which you might accept to distribute
+with Flex. (COUNTRY is a two letter code, like `de' for German.)
+If the COUNTRY.tt files ever lag with regard to Flex modifications,
+this would not break nationalized Flex: the current mechanics will
+merely return the original English string if a proper translation
+cannot be found. So you do not even have to feel tied to the
+translators for releasing new distributions for Flex. And nothing
+is subject to the GPL so far :-).
+
+The initialization is not very complex, and can be done within
+less than a dozen easy lines of code, hardly GPL'able. I think
+they could be included in standard Flex distribution, while being
+conditionalized out. The only harder modifications come from me,
+and touch Makefile.in, for including all the machinery to prepare
+and install locale message catalogs provided the underlying system
+has what is needed. In the way I am now distributing my things, this
+machinery automatically cut itself out when GNU locale is not usable.
+
+Remain only two modules, currently named libintl.h and libintl.c
+(this might change), which are covered by the GPL, which you
+do not want to distribute with Flex. The Flex README could
+suggest installers to grab them from any other GNU distribution.
+The configuration machinery might automatically check if they have
+been copied by the installer and, if not, forget about localization.
+
+This way, Flex will be easily and widely nationalized, the GPL
+principle will be safe, Flex will stay free of the GPL, and the
+burden on the installers, as well as both you and me, will be
+minimal in the long run.
+
+There is a difficulty I have not studied yet, and which comes from
+the fact that Flex generates C code (Bison has the same problem).
+Flex itself could be nationalized, and this is orthogonal to the fact
+Flex could generate nationalizable scanners. Both are desirable.
+
+
+1, edited,,
+Mail-from: From pinard Thu Jan 12 07:41:07 1995
+Return-Path: <pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0rSOpt-00007LC; Thu, 12 Jan 95 07:41 EST
+Message-Id: <m0rSOpt-00007LC@icule>
+Date: Thu, 12 Jan 95 07:41 EST
+From: pinard (Francois Pinard)
+To: vern@ee.lbl.gov
+In-reply-to: <199501051930.LAA04658@daffy.ee.lbl.gov> (message from Vern Paxson on Thu, 05 Jan 95 11:30:54 PST)
+Subject: Re: Internationalization of Flex
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+*** EOOH ***
+Date: Thu, 12 Jan 95 07:41 EST
+From: pinard (Francois Pinard)
+To: vern@ee.lbl.gov
+In-reply-to: <199501051930.LAA04658@daffy.ee.lbl.gov> (message from Vern Paxson on Thu, 05 Jan 95 11:30:54 PST)
+Subject: Re: Internationalization of Flex
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+Besides, not long after having started this i18n effort for my
+own things, I realized that the i18n attribute should really be
+attached to strings themselves, and not to what we do with them.
+A blatant example is an error message produced by formatting.
+The format string needs i18n, while the result from sprintf may
+have so many different instances that it is unpractical to list
+them all in some error_string_out() routine. I also got other
+cases forcing me to concentrate on strings for i18n.
+
+There is a stylistic issue here. I use _("hello"), adding three
+characters to each localizable string, while you will most probably
+use _( "hello" ), adding five characters per localizable string.
+Yet, it has the advantage of being shorter than error_string_out,
+and be done at the right level.
+
+By merely defining _(String) to be (String), you just turn off
+localization in standard flex, with not a single nanosecond spoiled
+on it. But this will then allow me to produce a quite smaller and
+maintainable patch for i18n of flex.
+
+ This [error_string_out()] routine could then look up every string
+ passed it in a translation table that's compiled into flex
+ like the skel[] array. All that's needed is a public-domain
+ description of the format of the COUNTRY.tt translation files
+ and the rest should be easy.
+
+If I clearly understand your idea, you will compile in flex
+a French table, and obtain a French speaking binary. You will
+produce different binaries for Catalan, Dutch, etc. That is not
+practical on big sites having multinational users.
+
+Right now in my things, the setting of LANG in the environment
+decides the language to use, and there is a single binary to handle
+all things. Further, the evolving GNU locale will soon change its
+*.tt file format, and will try to use the current system underlying
+localization mechanics, if any good one is found at configure time.
+
+There is no need that you redo all this and throw new solutions to
+this whole set of problems. The most workable solution to me looks
+like standard flex distribution already have all _() included -- and
+that you accept routinely adding _() to new localizable strings when
+you are doing flex maintenance, and that a separately distributed
+patch attaches flex to GNU locale complexities, without having you
+discovering and solving them anew.
+
+ Let me know if this is workable (I'm willing to do the work).
+
+Let me take one hour this morning to offer you a patch for _() for
+2.5.0.6, hoping that you will accept it. That would be a start. Let
+me take care of the remaining organizational problems, synchronizing
+with other teams, etc. I already do this for other GNU packages
+and will eventually help with most of them (I've accepted that role).
+
+Once we will have had success with i18ned flex for some time, it
+would then become easier to convince you to go further for other
+aspects (like *producing* i18nable scanners :-).
+
+Let me hope that my pleading for the cause will touch your heart,
+somewhere :-). Keep happy!
+
+--
+François Pinard ``Happy GNU Year!'' pinard@iro.umontreal.ca
+A New Year's gift? Give us Programming Freedom! Write lpf@uunet.uu.net
+
+
+1, edited,,
+Mail-from: From pinard Thu Jan 12 16:44:56 1995
+Return-Path: <pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0rSXKA-00007VC; Thu, 12 Jan 95 16:44 EST
+Message-Id: <m0rSXKA-00007VC@icule>
+Date: Thu, 12 Jan 95 16:44 EST
+From: pinard (Francois Pinard)
+To: vern@ee.lbl.gov
+In-reply-to: <199501121822.KAA21713@daffy.ee.lbl.gov> (message from Vern Paxson on Thu, 12 Jan 95 10:22:40 PST)
+Subject: Re: Internationalization of Flex
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+*** EOOH ***
+Date: Thu, 12 Jan 95 16:44 EST
+From: pinard (Francois Pinard)
+To: vern@ee.lbl.gov
+In-reply-to: <199501121822.KAA21713@daffy.ee.lbl.gov> (message from Vern Paxson on Thu, 12 Jan 95 10:22:40 PST)
+Subject: Re: Internationalization of Flex
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+ I'm not sure having to remember to use error_string_out() instead
+ of fprintf( stderr ... ) is any easier, though.
+
+Not only error strings are being made localizable by the patch I
+shipped this morning, but also statistics, version and help, and
+some debug output. These are not always error messages, and not
+always sent to stderr.
+
+Sometimes in flex, messages are constructed in pieces using %s to
+insert parts. Translating at the string level is the right approach
+in these situations. I'm not sure error_string_out() would have been
+satisfying (but I'm not going to argue, since I have your favor! :-)
+
+1, edited, answered,,
+Mail-from: From twinsun.com!eggert Tue Feb 14 05:16:50 1995
+Path: bloom-beacon.mit.edu!senator-bedfellow.mit.edu!faqserv
+From: mike@vlsivie.tuwien.ac.at
+Newsgroups: comp.unix.questions,comp.std.internat,comp.software.international,comp.lang.c,comp.windows.x,comp.std.c,comp.answers,news.answers
+Subject: Programming for Internationalization FAQ
+Supersedes: <internationalization/programming-faq_787570857@rtfm.mit.edu>
+Followup-To: comp.unix.questions,comp.std.internat,comp.software.international,comp.lang.c,comp.windows.x,comp.std.c
+Date: 15 Jan 1995 10:26:57 GMT
+Organization: TU Wien
+Lines: 564
+Approved: news-answers-request@MIT.EDU
+Expires: 28 Feb 1995 10:26:07 GMT
+Message-ID: <internationalization/programming-faq_790165567@rtfm.mit.edu>
+NNTP-Posting-Host: bloom-picayune.mit.edu
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+Summary: This FAQ discusses writing programs which can handle
+ different language conventions/character sets/etc.
+ Applicable to all character set encodings; with particular
+ emphasis on ISO-8859-1.
+X-Last-Updated: 1994/11/15
+Originator: faqserv@bloom-picayune.MIT.EDU
+Xref: bloom-beacon.mit.edu comp.unix.questions:38263 comp.std.internat:2069 comp.software.international:1289 comp.lang.c:65751 comp.windows.x:34580 comp.std.c:7917 comp.answers:9514 news.answers:33146
+
+*** EOOH ***
+From: mike@vlsivie.tuwien.ac.at
+Newsgroups: comp.unix.questions,comp.std.internat,comp.software.international,comp.lang.c,comp.windows.x,comp.std.c,comp.answers,news.answers
+Subject: Programming for Internationalization FAQ
+Supersedes: <internationalization/programming-faq_787570857@rtfm.mit.edu>
+Followup-To: comp.unix.questions,comp.std.internat,comp.software.international,comp.lang.c,comp.windows.x,comp.std.c
+Date: 15 Jan 1995 10:26:57 GMT
+Organization: TU Wien
+Approved: news-answers-request@MIT.EDU
+Expires: 28 Feb 1995 10:26:07 GMT
+NNTP-Posting-Host: bloom-picayune.mit.edu
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+Summary: This FAQ discusses writing programs which can handle
+ different language conventions/character sets/etc.
+ Applicable to all character set encodings; with particular
+ emphasis on ISO-8859-1.
+X-Last-Updated: 1994/11/15
+Originator: faqserv@bloom-picayune.MIT.EDU
+
+
+Archive-name: internationalization/programming-faq
+Posting-Frequency: monthly
+
+
+
+ Programming for Internationalization
+
+
+
+DISCLAIMER: THE AUTHOR MAKES NO WARRANTY OF ANY KIND WITH REGARD TO
+THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+Note: Most of this was tested on a Sun 10, running SunOS 4.1.* - other
+systems might differ slightly
+
+This FAQ discusses topics related to the use of ISO 8859-1 based 8 bit
+character sets. It discusses how to program applications which support
+the use European (Latin American) national character sets on
+UNIX-based systems and standard C environments.
+
+
+
+1. Which coding should I use for accented characters?
+Use the internationally standardized ISO-8859-1 character set to type
+accented characters. This character set contains all characters
+necessary to type (West) European languages. This encoding is also the
+preferred encoding on the Internet (where accepted - see below).
+
+This character set is also used by AmigaDOS, MS-Windows (Code Page
+1252 in Microsoft Speak. This is for Windows versions delivered in
+the US, Europe (except Eastern Europe) and Latin America. In Windows
+3.1 Microsoft added additional characters in the 0x80-9F range),
+VMS (DEC MCS is a draft version of the current ISO 8859-1 character
+set standard and differs in only two characters) and (most) UNIX
+implementations. MS-DOS uses a different character set and is not
+compatible with this character set.
+
+ISO 8859-X actually is a family of character set standards. Basically
+all of the information given here is also valid for these standards.
+These standards comprise 8859-X:
+8859-1 Europe, Latin America
+8859-2 Eastern Europe
+8859-3 SE Europe/miscellaneous (Esperanto, Maltese, etc.)
+8859-4 Scandinavia/Baltic (mostly covered by 8859-1 also)
+8859-5 Cyrillic
+8859-6 Arabic
+8859-7 Greek
+8859-8 Hebrew
+8859-9 Latin5, same as 8859-1 except for Turkish instead of Icelandic
+8859-10 Latin6, for Eskimo/Scandinavian languages
+
+Another nascent standard is UNICODE (ISO 10646). UNICODE is an
+extension of ISO 8859-1 (which itself is an extension of US-ASCII) to
+16 bit characters. Thus most of the world's languages (including
+Japanese, Korean, Chinese...) can be covered.
+
+Most of the information given here is independent of the character
+encoding used (e.g. DEC MCS, etc.), but can be applied to any
+character set, providing the programming environment has provisions
+for this standard.
+
+
+
+2. Getting your environment right
+To configure your environment such that you can enter, process and
+display 8 bit ISO characters, check out the ISO-8859-1 FAQ available
+via anonymous ftp from ftp.vlsivie.tuwien.ac.at in
+/pub/8bit/FAQ-ISO-8859-1.
+
+
+
+3. Setting your environment for ISO-C (ANSI-C) programs
+The ISO C Standard (ANSI C Standard 4.4) defines several functions for
+supporting localization. To set your international environment on
+program startup, you should make one or several calls to the setlocale
+functions. Calls to this function will predetermine the reaction of
+other localization functions according to your language/country
+environment.
+
+To configure a particular aspect of you environment, say the number
+representation, you would call
+--
+setlocale (LC_NUMERIC, "Germany");
+--
+
+This call would set all number representation functions defined in the
+localization set to return numbers in the format used in Germany. If
+the call was successful, setlocale will return the name of your
+locale. A NULL return value indicates failure. Note that the
+environments are predetermined outside your C program by the system
+you run on. (So the example given here is likely to fail on all but a
+few systems.) Check the setlocale manual page or your system
+documentation to find out about the environments available.
+
+There are several LOCALE types available for different localization
+aspects (currency sign, number representation, characters sets). The
+value they can take is highly system dependent. Also, it should be up
+to the use to define the local environment he needs.
+
+A C program inherits its locale environment variables when it starts up.
+This happens automatically. However, these variables do not
+automatically control the locale used by the library functions, because
+ISO/ANSI C says that all programs start by default in the standard C
+locale. To use the locales specified by the environment, The POSIX
+standard defines the following call:
+-----
+setlocale (LC_ALL, "");
+-----
+
+Of course, you can only set part of your environment, by calling, say:
+----
+setlocale (LC_CTYPE, "");
+----
+This only defines the character classification macros (defined in
+ctype.h).
+
+This is a list of local categories:
+
+ Effect of Specifying Environment Variable
+ category the Value Affected
+ __________________________________________________________
+
+ LC_ALL Sets or queries LANG
+ entire environment
+ LC_COLLATE Changes or queries LC_COLLATE
+ collation sequences
+ LC_CTYPE Changes or queries LC_CTYPE
+ character classifi-
+ cation
+ LC_NUMERIC Changes or queries LC_NUMERIC
+ number format infor-
+ mation
+ LC_TIME Changes or queries LC_TIME
+ time conversion
+ parameters
+ LC_MONETARY Changes or queries LC_MONETARY
+ monetary information
+
+
+
+
+4. Using the locale information for character classification
+If you write a program which supports international use, you should
+use the available standardized functions, as only these will be
+influenced by the setlocale call. Thus, if you want to convert a
+capital letter in c to a lower case letter in l, _don't_ write:
+
+l = c - 'A' + 'a';
+
+While this will work for characters in the US-ASCII character set, it
+will not work with many other character sets. The following,
+standard-conformant code will:
+
+#include <ctype.h>
+
+....
+
+l = tolower(c);
+
+Also note that the second code may actually be faster than even the
+full "C" locale functionality (for most implementations), as it
+replaces a complex expression ( (c<='Z' && c>='A')? c-'A'+a:c; )by a simple
+table lookup!
+
+Note that this ISO standard is independent of the character set
+encoding used!
+
+
+
+5. Language independent messages
+There are two competing standards for language independent messages:
+one by X/Open, and another one by POSIX. The X/Open standard seems to
+have found a larger following as it has been around for a longer time.
+
+5.1 X/Open language independent messages
+X/Open defines a method for providing language-independent messages.
+Error messages are kept in a catalog which is opened upon program
+start with a locale specification. Then the message number and a set
+specification are used to index the message catalog. A default fourth
+argument is specified which will be printed if a particular message
+cannot be found in the catalog.
+
+Here is the world-famous C program using the language-independent
+X/Open message standard:
+--------------------------------------------------------------------------
+#include <stdio.h>
+#include <nl_types.h>
+
+#define SET 1
+#define MSG_HELLO 1
+
+nl_catd catfd;
+
+int main (int argc, char **argv) {
+ /* Open the message catalog. We use the basename of the program
+ * as the catalog name. Of course, several programs can also
+ * share a common catalog.
+ */
+ catfd = catopen (basename (argv [0]), NL_CAT_LOCALE);
+ /* catgets returns message MSG_HELLO from set SET from the
+ * message catalog catfd. If catfd does not refer to a message
+ * catalog, or the requested message cannot be found, the
+ * catalog, or the requested message cannot be found, the
+ * fourth argument is returned.
+ */
+ printf (catgets (catfd, SET, MSG_HELLO, "hello, world\n"));
+ catclose (catfd);
+ return 0;
+}
+-------------------------------------------------------------------------
+
+For catopen, specify the constant NL_CAT_LOCALE to open the message
+catalog for the locale set for the LC_MESSAGES variable; using
+NL_CAT_LOCALE conforms to the XPG4 standard. You can specify 0 (zero)
+for compatibility with XPG3; when oflag is set to zero, the locale set
+for the LANG variable determines the message catalog locale.
+
+Several utilities exist for generating message catalogs and for
+upgrading programs which contain hard-wired strings:
+* gencat is used to generate message catalogs
+[All other programs are OS-specific:]
+* Ultrix and OSF support the extract program which will extract string
+ constants from the C source code, and has an option to replace these
+ strings with calls to catgets.
+* HP/UX has a similar utility called findmsg.
+* Under OSF, message catalogs may be listed with the dspcat utility.
+* HP/UX calls a similar utility dumpmsg.
+
+
+5.2 Sun/XView
+Sun implements a different set of functions functions to support i18n
+of messages (the source is available with the XView code):
+
+You can either use:
+-----------------------------------------------
+
+main()
+{
+ // get the message catalog named "helloprogram"
+ // for the hello world program
+ textdomain("helloprogram");
+
+ // get the translation for the "Hello, world\n" string
+ printf(gettext("Hello, world\n"));
+}
+-----------------------------------------------
+
+or you can roll all in one and write
+
+-----------------------------------------------
+main()
+{
+ // get the translation for the "Hello, world\n" string
+ // from the message catalog "helloprogram"
+ printf(dgettext("helloprogram","Hello, world\n"));
+}
+-----------------------------------------------
+
+The LC_MESSAGES locale category setting determines the locale of
+strings that gettext() returns. The message catalogs are generated
+with either the installtxt or gencat commands.
+
+No opening of files as in the old SYS V and X/Open routines, and no
+handling of message numbers that you must have in a database to
+administer.
+
+
+5.3 POSIX language independent messages
+Neither of the previous two mechanisms is in the POSIX standard.
+There was much disagreement in the POSIX.1 committee about using the
+gettext routines vs. catgets (XPG). In the end the committee couldn't
+agree on anything, so no messaging system was included as part of the
+standard. I believe the informative annex of the standard includes the
+XPG3 messaging interfaces, "...as an example of a messaging system
+that has been implemented..."
+
+They were very careful not to say anywhere that you should use one set
+of interfaces over the other.
+
+
+
+6. Other localization aspects in ISO/ANSI C (and POSIX environments)
+For a more thorough discussion of localization and
+internationalization (aka. i18n), check your system vendors
+documentation, and the C library manual which comes with the FSF's
+glibc library (Chapter 19, 'Locales and Internationalization').
+
+
+
+7. Internationalization under X11
+7.1 Output
+To output text encoded with ISO 8859-1 under X11, simply invoke the X
+display routines with 8 bit characters as you would use them with
+7-bit ASCII. You should however choose a font which contains bitmaps
+for these characters. You can use the xfd utility to display a font
+to verify that it contains a full set of characters.
+
+
+7.2 Input
+If you use a national keyboard (that is a keyboard, which has distinct
+keys for your countries special characters), inputting accents is
+straight forward and you'll get the corresponding characters by using
+the X11 input functions.
+
+Sometimes it may be necessary to input characters for which there are
+no keys on your keyboard (e.g. if you want to enter the German 'ß'
+from a French keyboard).
+
+X11R5 and X11R6 both have extensive support for i18n, but due to a
+variety of factors the R5 i18n was not well understood or widely
+used. Many people resorted to a work-around and might have been
+disappointed when R6 did not include this misfeature. It is important
+to recognize that the correct use of R5 and R6 i18n features will
+ensure maximum portability of your program.
+
+Footnote: Amongst other reasons, the X Consortium decision not to add
+support for input methods to the Xaw Athena widget contributes to this
+situation. Many users (and much of the PD software) live in an
+Xaw-only world, so they will not be able to benefit from this i18n
+effort.
+
+X11 R5 and R6 support input methods for entering non-ASCII, and
+displaying and configuring text, menus etc. for a wide variety of
+languages. This input method has to be installed by the application
+by calls to the Xlib library (or an Xt toolkit call).
+
+[Under X11R5, some X servers (notably the Xsun server) will let you
+enter ISO characters by supplying a built-in escape mechanism, if no
+keys for these characters are on your keyboard, and will pass along
+and display ISO 8859-1. This hack obviated the need to install an
+input method, but was less flexible.]
+
+
+If you are using a toolkit, it is quite simple to support localization
+of you X11 code:
+If you're using a toolkit -- Xt and a widget set like Motif or R6 Xaw --
+you need only add a single line of code to your source. Before any other
+calls to Xt, add a call to XtSetLanguageProc, e.g.:
+
+ int main (int argc, char** argv)
+ {
+ ...
+ XtSetLanguageProc (NULL, NULL, NULL);
+ top = XtAppInitialize ( ... );
+ ...
+ }
+
+The LANG and LC_xxx environment variables (see section 3) will then be
+used to determine the 'input method' for this X application. This
+input method is responsible for managing COMPOSE character sequences
+or any other input mechanism for this particular implementation. Also
+see section 9 of ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/FAQ-ISO-8859-1,
+the FAQ on ISO 8859-1 usage.
+
+
+7.3 Toolkits, Widgets, and I18N
+The preferred way of inputing national characters when a national
+keyboard is not available is one/several input methods. These input
+methods will then support various kinds of compose sequences to enter
+national characters.
+
+The environment variables LANG and/or LC_xxx select the language for
+the Input Method (IM), but if several input methods exist, the
+environment variable XMODIFIERS can be used to select a specific input
+method.
+
+Xlib supports IMs
+Xt supports IMs
+Xaw does not support IMs
+
+Thus, applications written with Xlib or Xt can support IMs (see
+section 7.2 on how to install input methods under Xt), but Xaw based
+applications will not.
+
+Motif 1.2 or greater automatically uses the R5/R6 input method APIs.
+Thus applications using Motif 1.2+ can be made to support IMs.
+Several Motif 1.[01] versions also had similar functionality added to
+them by the respective vendors, but these extensions are
+vendor-specific and not portable.
+
+FOOTNOTE: If you can have comments/corrections for this section and on
+ OpenLook, please let me know.
+
+
+7.4 I18N under X11R6, General Information
+Background information from the X11R6 announcement:
+Internationalization (also known as I18N, there being 18 letters between the
+i and n) of the X Window System, which was originally introduced in Release
+5, has been significantly improved in R6. The R6 I18N architecture follows
+that in R5, being based on the locale model used in ANSI C and POSIX, with
+most of the I18N capability provided by Xlib. R5 introduced a fundamental
+framework for internationalized input and output. It could enable basic
+localization for left-to-right, non-context sensitive, 8-bit or multi-byte
+codeset languages and cultural conventions. However, it did not deal with
+all possible languages and cultural conventions. R6 also does not cover all
+possible languages and cultural conventions, but R6 contains substantial new
+Xlib interfaces to support I18N enhancements, in order to enable additional
+language support and more practical localization.
+
+The additional support is mainly in the area of text display. In order to
+support multi-byte encodings, the concept of a FontSet was introduced in R5.
+In R6, Xlib enhances this concept to a more generalized notion of output
+methods and output contexts. Just as input methods and input contexts sup-
+port complex text input, output methods and output contexts support complex
+and more intelligent text display, dealing not only with multiple fonts but
+also with context dependencies. The result is a general framework to enable
+bi-directional text and context sensitive text display.
+
+The description of the X11R6 internationalization framework is
+available via anonymous ftp from ftp.x.org in
+/pub/R6untarred/xc/doc/specs/i18n.
+
+
+
+8. Supporting I18N Network Protocols
+8.1 MIME
+MIME is specified in RFC 1521 and RFC 1522 which are available from
+ftp.uu.net. There is also a MIME FAQ which is available via anonymous
+ftp from ftp.ics.uci.edu in /mh/contrib/multimedia/mime-faq.txt.gz.
+(This file is in compressed format. You will need the GNU gunzip
+program to decompress this file.)
+
+If you want to write applications which support the MIME protocol,
+there are several libraries/tools which can ease your task:
+
+
+8.1.1 metamail
+Source for supporting MIME (the `metamail' package) in various mail
+readers is available via anonymous ftp from thumper.bellcore.com in
+/pub/nsb. This distribution consists of several utilities, which can
+be called by MIME applications to handle MIME types.
+
+
+8.1.2 MIMElt
+A "lightweight" MIME library available via anon ftp from
+oslonett.no:Software/MsDos/Comm/Offline/mimeltXX.zip
+
+It is source code (ANSI C) packaged as a library to facilitate
+construction of a limited MIME facility (limited == handling only
+character-set aspects of MIME, not the multimedia-aspects). It
+includes hooks to recode character sets into whatever system you are
+running off (e.g. if you read mail on a MsDos platform using CP-850,
+MIMElite may be set up so that QUOTED-PRINTABLE ISO Latin 1 is recoded
+into CP-850 for reading and saving to file).
+
+It's main use is to provide programmers of so-called "off-line
+readers" (used by user's who access Internet mail through dial-up
+service providers) with the tools needed to include proper support for
+QUOTED-PRINTABLE encoding in their product.
+
+The archive also contain a couple of sample applications that
+demonstrates how the library may be used. UNMIME is a stand-alone
+utility to decode MIME-encoded messages (e.g. it works like UUDECODE
+for binary files with BASE64 encoding), SENDMIME is a simple utility
+to send MIME-encoded messages if your service provider doesn't have
+PINE or similar tools.
+
+The current version (2.1) is limited to character set issues. I am
+about to release version 2.2, which will support additional
+Content-Types (e.g. "application/octet-stream").
+
+
+
+9. Programming in Prolog
+SICStus Prolog accepts ISO characters as part of atoms, so you can
+even define goal names containing accented characters. I/O of 8 bit
+characters is (obviously) also supported.
+
+
+
+10. ISO 8859-1 on non-UNIX systems
+10.1 MS-DOS
+MS-DOS generally uses its own characters set. There are several code
+pages (one with the same symbols as ISO 8859-1, albeit at different
+character code positions, which can lead to problems with the transfer
+of data).
+
+If interoperability without data conversion is your goal, you can
+reconfigure your MS-DOS PC to use an ISO-8859-1 code page. Check out
+the anonymous ftp archive ftp.uni-erlangen.de, which contains data on
+how to do this (and other ISO-related stuff) in /pub/doc/ISO/charsets.
+The README file contains an index of the files you need.
+
+Most (all?) C compilers/libraries for MS-DOS have only minimal support
+for the ANSI/POSIX locale mechanism. The setlocale() and localeconv()
+calls (and stuff like strxfrm()) are generally hardwired.
+
+
+10.2 MS Windows
+MS-Windows (using code page 1252) normally uses the first 256
+characters of Unicode, which is (for all practical purposes)
+equivalent to ISO 8859-1. Thus, data representation and conversion
+for interoperability with other ISO 8859-1 compliant systems is not an
+issue.
+
+It seems that C libraries for MS Windows do not support the ANSI/POSIX
+locale mechanism. (If you have any experiences with that, please let
+me know.) There is a POSIX-like mechanism in some Microsoft platform
+services, but none in the compilers from any vendor.
+
+
+10.3 OS/2
+Text mode OS/2 programs generally suffer the same limitations as do
+MS-DOS programs, because the display hardware is the same.
+
+Presentation Manager OS/2 programs using code page 1004 will order
+the font glyphs in the same sequence as ISO 8859-1 (although of
+course whether the glyphs will actually look anything like those
+from ISO 8859-1 depends entirely from the font).
+
+The IBM CSet++ compiler supports full internationalization, with
+several predefined locales.
+
+The Borland C++ compiler supports only the "C" locale.
+
+The Watcom C++ compiler supports only the "C" locale.
+
+The Metaware High C++ compiler supports only the "C" locale. It
+does, however, also support UNICODE, providing UNICODE character
+types and UNICODE versions of the appropriate parts of the standard
+library (including I/O).
+
+
+
+10.4 Apple Macintosh
+MacIntoshes have their own non-standard character encodings;
+the first 128 characters are US-ASCII but the remaining characters are
+non-standard.
+
+I do not know whether C libraries (for which compilers?) for the
+MacIntosh support the ANSI/POSIX locale mechanism. If you have any
+experiences with that, please let me know.
+
+
+10.5 Amiga
+The AmigaOS uses ISO-8859-1. As of OS version 2.1, Amiga-specific
+means of localization are available.
+
+
+
+11. Home location of this document
+The most recent version of this document is available via anonymous
+ftp from ftp.vlsivie.tuwien.ac.at under the file name
+/pub/8bit/ISO-programming.
+
+-----------------
+
+Copyright © 1994 Michael Gschwind (mike@vlsivie.tuwien.ac.at)
+
+This document may be copied for non-commercial purposes, provided this
+copyright notice appears. Publication in any other form requires the
+author's consent.
+
+Dieses Dokument darf unter Angabe dieser urheberrechtlichen
+Bestimmungen zum Zwecke der nicht-kommerziellen Nutzung beliebig
+vervielfältigt werden. Die Publikation in jeglicher anderer Form
+erfordert die Zustimmung des Autors.
+
+Michael Gschwind, Institut f. Technische Informatik, TU Wien
+snail: Treitlstrasse 3-182-2 || A-1040 Wien || Austria
+email: mike@vlsivie.tuwien.ac.at note: real time != real fast
+phone: +(43)(1)58801 8156 fax: +(43)(1)586 9697
+
+
+1, edited, resent,,
+Mail-from: From li.org!owner-li-international Fri Jan 20 08:56:04 1995
+Return-Path: <li.org!owner-li-international>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0rVJon-00009Da; Fri, 20 Jan 95 08:56 EST
+Sender: li.org!owner-li-international
+Received: from lagrande.iro.umontreal.ca (lagrande.IRO.UMontreal.CA [132.204.32.32]) by iros1.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id RAA25970 for <icule!pinard>; Mon, 16 Jan 1995 17:34:02 -0500
+Received: from saguenay.IRO.UMontreal.CA (root@saguenay32.IRO.UMontreal.CA [132.204.32.54]) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) with ESMTP id RAA14270 for <pinard@lagrande.IRO.UMontreal.CA>; Mon, 16 Jan 1995 17:33:53 -0500
+Received: from uniwa.uwa.edu.au (root@uniwa.uwa.edu.au [130.95.128.1]) by saguenay.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id RAA07348 for <pinard@iro.umontreal.ca>; Mon, 16 Jan 1995 17:33:41 -0500
+Received: from orac.aust.li.org (orac.iinet.com.au [203.0.178.134]) by uniwa.uwa.edu.au (8.6.9/8.6.9) with ESMTP id GAA22040; Tue, 17 Jan 1995 06:29:21 +0800
+Received: (from majordom@localhost) by orac.aust.li.org (8.6.9/8.6.9) id FAA01118 for li-international-list; Tue, 17 Jan 1995 05:34:39 +0800
+Received: from alcor (alcor.twinsun.com [198.147.65.1]) by orac.aust.li.org (8.6.9/8.6.9) with ESMTP id FAA01112 for <li-international@li.org>; Tue, 17 Jan 1995 05:34:28 +0800
+Received: from twinsun.com (twinsun.twinsun.com [192.54.239.2]) by alcor (8.6.5/8.6.5) with SMTP id NAA04793 for <li-international@li.org>; Mon, 16 Jan 1995 13:06:52 -0800
+Received: from spot.twinsun.com by twinsun.com (4.1/SMI-4.1)
+ id AA06664; Mon, 16 Jan 95 13:33:30 PST
+Received: by spot.twinsun.com (4.1/SMI-4.1)
+ id AA04256; Mon, 16 Jan 95 13:33:30 PST
+Old-From: eggert@twinsun.com (Paul Eggert)
+Message-Id: <9501162133.AA04256@spot.twinsun.com>
+Date: 16 Jan 1995 13:33:28 -0800
+To: li-international@li.org
+Subject: ISO Normative Addendum 1 and its effect on the C library
+From: International List <li-international@li.org>
+Sender: owner-li-international@li.org
+Precedence: bulk
+Reply-To: LI-international@li.org
+
+*** EOOH ***
+From: eggert@twinsun.com (Paul Eggert)
+Date: 16 Jan 1995 13:33:28 -0800
+To: li-international@li.org
+Subject: ISO Normative Addendum 1 and its effect on the C library
+Reply-To: LI-international@li.org
+
+Normative Addendum 1 (NA1) to the ISO C standard was approved last year,
+and I recently ran across a nice summary written by Clive Feather.
+Please see <http://sf.www.lysator.liu.se/c/nal.html> for this;
+
+Most of the changes required by NA1 are to the C library's wide
+character and multibyte string support. I don't see these changes
+mentioned in the latest glibc snapshot. I asked Roland McGrath,
+glibc's developer, about this, and he replied:
+
+ Date: Mon, 16 Jan 95 15:53:26 -0500
+ From: Roland McGrath <roland@gnu.ai.mit.edu>
+
+ I think if you make the specifications available to the Linux community,
+ the new library functions will get written and contributed to glibc.
+ Try the mailing list li-international@li.org.
+
+So I'm sending this message to li-international. I can forward a copy
+of the NA1 summary to whoever needs it; just ask.
+
+Two of the NA1 changes (__STDC_VERSION__ and digraphs) require changes
+to GCC itself; I've volunteered to do this. One change (namely
+<iso646.h>) can be done either in GCC or in libc, though if GCC does
+digraphs it may make more sense for it to do <iso646.h> as well.
+But the other changes belong to the C library proper.
+
+
+
+1,,
+Mail-from: From twinsun.com!eggert Tue Feb 14 05:16:49 1995
+Return-Path: <twinsun.com!eggert>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0reKJK-00009mC; Tue, 14 Feb 95 05:16 EST
+Received: from lagrande.iro.umontreal.ca (lagrande.IRO.UMontreal.CA [132.204.32.32]) by iros1.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id CAA00816 for <icule!pinard>; Tue, 14 Feb 1995 02:16:27 -0500
+Received: from saguenay.IRO.UMontreal.CA (root@saguenay32.IRO.UMontreal.CA [132.204.32.54]) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) with ESMTP id CAA02807 for <pinard@lagrande.IRO.UMontreal.CA>; Tue, 14 Feb 1995 02:16:20 -0500
+Received: from alcor.twinsun.com (alcor.twinsun.com [198.147.65.1]) by saguenay.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id CAA29451 for <pinard@iro.umontreal.ca>; Tue, 14 Feb 1995 02:16:16 -0500
+Received: from twinsun.com (twinsun.twinsun.com [192.54.239.2]) by alcor.twinsun.com (8.6.5/8.6.5) with SMTP id WAA03362 for <pinard@iro.umontreal.ca>; Mon, 13 Feb 1995 22:44:50 -0800
+Received: from spot.twinsun.com by twinsun.com (4.1/SMI-4.1)
+ id AA08130; Mon, 13 Feb 95 23:15:06 PST
+Received: by spot.twinsun.com (4.1/SMI-4.1)
+ id AA05763; Mon, 13 Feb 95 23:15:05 PST
+From: eggert@twinsun.com (Paul Eggert)
+Message-Id: <9502140715.AA05763@spot.twinsun.com>
+Date: 13 Feb 1995 23:15:04 -0800
+To: pinard@iro.umontreal.ca
+In-Reply-To: <m0rdrDE-00009QC@icule> (pinard@iro.umontreal.ca)
+Subject: Re: glocale and Uniforum gettext simplicity
+
+*** EOOH ***
+From: eggert@twinsun.com (Paul Eggert)
+Date: 13 Feb 1995 23:15:04 -0800
+To: pinard@iro.umontreal.ca
+In-Reply-To: <m0rdrDE-00009QC@icule> (pinard@iro.umontreal.ca)
+Subject: Re: glocale and Uniforum gettext simplicity
+
+
+ Date: Sun, 12 Feb 95 22:12 EST
+ From: pinard@iro.umontreal.ca (Francois Pinard)
+
+ Hello, Paul.
+
+ For more on this topic please see the Programming
+ for Internationalization FAQ (Message-ID:
+ <internationalization/programming-faq_784901999@rtfm.mit.edu>)
+ which I can forward to you if you like.
+
+ Would you do this, please?
+
+Sure, the latest revision be in my next message. For future
+reference, the coordinates are
+<ftp://rtfm.mit.edu/pub/usenet-by-group/comp.answers/internationalization/programming-faq>.
+
+Alas, I haven't had time to work on this much lately -- beset with hardware
+problems at home and no time to fix them....
+
+
+1, edited,,
+Mail-from: From pinard Tue Mar 21 12:53:53 1995
+Return-Path: <pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0rr87q-00009TC; Tue, 21 Mar 95 12:53 EST
+Message-Id: <m0rr87q-00009TC@icule>
+Date: Tue, 21 Mar 95 12:53 EST
+From: pinard (François Pinard)
+To: meyering@comco.com
+CC: drepper@ipd.info.uni-karlsruhe.de
+In-reply-to: <199503211712.LAA25472@idefix.comco.com> (message from Jim Meyering on Tue, 21 Mar 1995 11:12:49 -0600)
+Subject: Re: international fileutils
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+*** EOOH ***
+Date: Tue, 21 Mar 95 12:53 EST
+From: pinard (François Pinard)
+To: meyering@comco.com
+CC: drepper@ipd.info.uni-karlsruhe.de
+In-reply-to: <199503211712.LAA25472@idefix.comco.com> (message from Jim Meyering on Tue, 21 Mar 1995 11:12:49 -0600)
+Subject: Re: international fileutils
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+There are three things to do for each package:
+
+* Adjust Autoconf and Makefiles
+* Mark all localizable strings in sources and doing other adjustments
+* Translating messages for French (and maybe, let's be fair, German :-).
+
+1, edited,,
+Mail-from: From pinard Sun Apr 23 13:26:30 1995
+Return-Path: <pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0s35QR-00008FC; Sun, 23 Apr 95 13:26 EDT
+Message-Id: <m0s35QR-00008FC@icule>
+Date: Sun, 23 Apr 95 13:26 EDT
+From: pinard (François Pinard)
+To: Jim Meyering <meyering@comco.com>,
+ Ulrich Drepper <drepper@gnu.ai.mit.edu>,
+ Roland McGrath <roland@gnu.ai.mit.edu>,
+ Paul Eggert <eggert@twinsun.com>
+Subject: GNU locale and Ulrich's effort
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+*** EOOH ***
+Date: Sun, 23 Apr 95 13:26 EDT
+From: pinard (François Pinard)
+To: Jim Meyering <meyering@comco.com>,
+ Ulrich Drepper <drepper@gnu.ai.mit.edu>,
+ Roland McGrath <roland@gnu.ai.mit.edu>,
+ Paul Eggert <eggert@twinsun.com>
+Subject: GNU locale and Ulrich's effort
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+I'm trying to get started the overall effort for GNU localization,
+by offering translators GNU packages to translate, and the means
+to do so. I also do not want to spoil the energies being offered.
+Many pieces of the puzzle are in place already and, as usual, I
+contemplate them all trying to see what is missing, and working
+towards the complete picture.
+
+Surely to me, GNU locale (glocale, as a package) has to provide a
+fairly complete set of self-contained tools for helping package
+maintainers to internationalize their product, and also for
+localizers to translate message catalogs. Further, being itself
+internationalized, it should be a very carefully crafted example
+for maintainers, about how one might set his/her own package to be
+easily installed while localization is effective, and portably!
+
+
+
+1,,
+Mail-from: From pinard Mon May 1 22:16:31 1995
+Return-Path: <pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0s67Vl-00008NC; Mon, 1 May 95 22:16 EDT
+Message-Id: <m0s67Vl-00008NC@icule>
+Date: Mon, 1 May 95 22:16 EDT
+From: pinard (=?ISO-8859-1?Q?Fran=E7ois_Pinard?=)
+To: gnu@prep.ai.mit.edu
+CC: rms@gnu.ai.mit.edu
+In-reply-to: <9505020044.AA12891@pizza> (gnu@ai.mit.edu)
+Subject: Re: [pinard@iro.umontreal.ca: Internationalizing GNU: the maintainer side]
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+*** EOOH ***
+Date: Mon, 1 May 95 22:16 EDT
+From: pinard (François Pinard)
+To: gnu@prep.ai.mit.edu
+CC: rms@gnu.ai.mit.edu
+In-reply-to: <9505020044.AA12891@pizza> (gnu@ai.mit.edu)
+Subject: Re: [pinard@iro.umontreal.ca: Internationalizing GNU: the maintainer side]
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+ It contains some statements that are harsh and, I believe,
+ not true. The practice of using gettext to mark strings is
+ *not* just "for the time being."
+
+ Fran\cois: Could you work with rms to update the GNU coding
+ standards to describe what GNUers needs to be do to make their
+ GNU programs use GNU Locale.
+
+I may try, but do not know exactly how to proceed. I also confess
+I've rewritten this paragraph twenty times, to merely censor myself.
+
+ We can then post that section of the GNU coding standards, so
+ all the GNUers know what to do.
+
+If GNU ever publishes utilities for Native Language Support, their
+own documentation should explain how to proceed, and maintainers
+should find in there the information they need about what to do.
+GNU standards might state the general principle, something like:
+``GNU programs and packages should be opened to Native Language
+Support (NLS) and, in particular, be able to write their messages
+translated into native languages, as selected at run time by
+environment variables''.
+
+--
+François Pinard ``Vivement GNU!'' <pinard@iro.umontreal.ca>
+Email lpf@uunet.uu.net for info about the League for Programming Freedom.
+
+
+1,,
+Mail-from: From IRO.UMontreal.CA!pinard Tue May 2 05:16:32 1995
+Return-Path: <IRO.UMontreal.CA!pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0s6E4E-0000CaC; Tue, 2 May 95 05:16 EDT
+Received: from lagrande.iro.umontreal.ca (lagrande.IRO.UMontreal.CA [132.204.32.32]) by iros1.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id AAA19507 for <icule!pinard>; Tue, 2 May 1995 00:02:38 -0400
+Received: (from pinard@localhost) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) id AAA00659 for icule!pinard; Tue, 2 May 1995 00:02:37 -0400
+Received: from saguenay.IRO.UMontreal.CA (saguenay32.IRO.UMontreal.CA [132.204.32.54]) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) with ESMTP id AAA00657 for <pinard@lagrande.IRO.UMontreal.CA>; Tue, 2 May 1995 00:02:34 -0400
+Received: from mole.gnu.ai.mit.edu (mole.gnu.ai.mit.edu [128.52.46.33]) by saguenay.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id AAA08792 for <pinard@iro.umontreal.ca>; Tue, 2 May 1995 00:02:33 -0400
+Received: by mole.gnu.ai.mit.edu (8.6.12/8.6.12GNU) id AAA07143; Tue, 2 May 1995 00:02:31 -0400
+Date: Tue, 2 May 1995 00:02:31 -0400
+Message-Id: <199505020402.AAA07143@mole.gnu.ai.mit.edu>
+From: Richard Stallman <rms@gnu.ai.mit.edu>
+To: pinard@IRO.UMontreal.CA
+In-reply-to: <m0s67Vl-00008NC@icule> (pinard@iro.umontreal.ca)
+Subject: Re: [pinard@iro.umontreal.ca: Internationalizing GNU: the maintainer side]
+
+*** EOOH ***
+Date: Tue, 2 May 1995 00:02:31 -0400
+From: Richard Stallman <rms@gnu.ai.mit.edu>
+To: pinard@IRO.UMontreal.CA
+In-reply-to: <m0s67Vl-00008NC@icule> (pinard@iro.umontreal.ca)
+Subject: Re: [pinard@iro.umontreal.ca: Internationalizing GNU: the maintainer side]
+
+ ``GNU programs and packages should be opened to Native Language
+ Support (NLS) and, in particular, be able to write their messages
+ translated into native languages, as selected at run time by
+ environment variables''.
+
+I think that is too vague to be useful. I'd rather put in some
+variant of what you sent before. But I don't have time right now
+to fix it.
+
+
+1, answered, edited,,
+Mail-from: From IRO.UMontreal.CA!pinard Wed May 3 00:19:10 1995
+Return-Path: <IRO.UMontreal.CA!pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0s6Vty-0000CSC; Wed, 3 May 95 00:19 EDT
+Received: from lagrande.iro.umontreal.ca (lagrande.IRO.UMontreal.CA [132.204.32.32]) by iros1.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id XAA19717 for <icule!pinard>; Tue, 2 May 1995 23:51:54 -0400
+Received: (from pinard@localhost) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) id XAA20985 for icule!pinard; Tue, 2 May 1995 23:51:52 -0400
+Received: from saguenay.IRO.UMontreal.CA (saguenay32.IRO.UMontreal.CA [132.204.32.54]) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) with ESMTP id XAA20983 for <pinard@lagrande.IRO.UMontreal.CA>; Tue, 2 May 1995 23:51:49 -0400
+Received: from nz11.rz.uni-karlsruhe.de (nz11.rz.uni-karlsruhe.de [129.13.64.7]) by saguenay.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id XAA12985 for <pinard@iro.umontreal.ca>; Tue, 2 May 1995 23:51:15 -0400
+Received: from ipd.info.uni-karlsruhe.de (actually i44ms.info.uni-karlsruhe.de)
+ by nz11.rz.uni-karlsruhe.de with SMTP (PP);
+ Wed, 3 May 1995 03:54:26 +0200
+Received: from i44pc2.info.uni-karlsruhe.de (i44pc2.info.uni-karlsruhe.de [129.13.171.31])
+ by ipd.info.uni-karlsruhe.de (8.6.4/8.6.4) with SMTP id DAA00768;
+ Wed, 3 May 1995 03:57:08 +0200
+Message-Id: <199505030157.DAA00768@ipd.info.uni-karlsruhe.de>
+To: "ois \"Pinard)\""@rz.uni-karlsruhe.de, meyering@comco.com (Jim Meyering),
+ eggert@twinsun.com (Paul Eggert),
+ roland@gnu.ai.mit.edu (Roland McGrath)
+Original-To: pinard@iro.umontreal.ca (François Pinard),
+ meyering@comco.com (Jim Meyering),
+ eggert@twinsun.com (Paul Eggert),
+ roland@gnu.ai.mit.edu (Roland McGrath)
+PP-Warning: Parse error in original version of preceding To line
+Subject: nlsutils-0.4.2
+Date: Wed, 03 May 1995 03:56:24 +0200
+From: Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
+
+*** EOOH ***
+To: "ois \"Pinard)\""@rz.uni-karlsruhe.de, meyering@comco.com (Jim Meyering),
+ eggert@twinsun.com (Paul Eggert),
+ roland@gnu.ai.mit.edu (Roland McGrath)
+Original-To: pinard@iro.umontreal.ca (François Pinard),
+ meyering@comco.com (Jim Meyering),
+ eggert@twinsun.com (Paul Eggert),
+ roland@gnu.ai.mit.edu (Roland McGrath)
+PP-Warning: Parse error in original version of preceding To line
+Subject: nlsutils-0.4.2
+Date: Wed, 03 May 1995 03:56:24 +0200
+From: Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
+
+I tried hard to limit all external things in the libgintl directory.
+You have to copy this, some variation of my code in aclocal.m4
+and acconfig.h. This should be all.
+
+1, answered,,
+Mail-from: From IRO.UMontreal.CA!pinard Thu May 4 08:22:15 1995
+Return-Path: <IRO.UMontreal.CA!pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0s6zv4-0000CSC; Thu, 4 May 95 08:22 EDT
+Received: from lagrande.iro.umontreal.ca (lagrande.IRO.UMontreal.CA [132.204.32.32]) by iros1.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id HAA19349 for <icule!pinard>; Thu, 4 May 1995 07:48:32 -0400
+Received: (from pinard@localhost) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) id HAA24822 for icule!pinard; Thu, 4 May 1995 07:47:28 -0400
+Received: from saguenay.IRO.UMontreal.CA (saguenay32.IRO.UMontreal.CA [132.204.32.54]) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) with ESMTP id HAA24816 for <pinard@lagrande.IRO.UMontreal.CA>; Thu, 4 May 1995 07:47:25 -0400
+Received: from nz11.rz.uni-karlsruhe.de (nz11.rz.uni-karlsruhe.de [129.13.64.7]) by saguenay.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id HAA17159 for <pinard@iro.umontreal.ca>; Thu, 4 May 1995 07:48:25 -0400
+Received: from ipd.info.uni-karlsruhe.de (actually i44ms.info.uni-karlsruhe.de)
+ by nz11.rz.uni-karlsruhe.de with SMTP (PP);
+ Thu, 4 May 1995 13:45:17 +0200
+Received: from i44pc2.info.uni-karlsruhe.de (i44pc2.info.uni-karlsruhe.de [129.13.171.31])
+ by ipd.info.uni-karlsruhe.de (8.6.4/8.6.4) with SMTP id NAA06097
+ for <pinard@iro.umontreal.ca>; Thu, 4 May 1995 13:48:06 +0200
+Message-Id: <199505041148.NAA06097@ipd.info.uni-karlsruhe.de>
+To: pinard@IRO.UMontreal.CA
+Subject: Re: Path to message?
+In-Reply-To: Your message of "Thu, 4 May 95 00:45 EDT"
+References: <m0s6snG-00008NC@icule>
+X-Mailer: Mew beta version 0.89 on Emacs 19.28.1
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=iso-8859-1
+Date: Thu, 04 May 1995 13:47:46 +0200
+From: Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
+Content-Transfer-Encoding: 8bit
+X-Original-Encoding: quoted-printable
+
+*** EOOH ***
+To: pinard@IRO.UMontreal.CA
+Subject: Re: Path to message?
+In-Reply-To: Your message of "Thu, 4 May 95 00:45 EDT"
+References: <m0s6snG-00008NC@icule>
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=iso-8859-1
+Date: Thu, 04 May 1995 13:47:46 +0200
+From: Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
+Content-Transfer-Encoding: 8bit
+X-Original-Encoding: quoted-printable
+
+From: pinard@iro.umontreal.ca (François Pinard)
+Subject: Path to message?
+Date: Thu, 4 May 95 00:45 EDT
+
+> Ulrich, always me. I do not understand that xgettext --help writes:
+>
+> Suchpfad ist: /usr/local/share/nls/src
+>
+> while /usr/local/share/locale/de/LC_MESSAGES is indeed searched.
+> Could we solve this inconsistency?
+>
+
+Not quite. /usr/local/share/locale/de/LC_MESSAGES is the path where
+the .mo/.cat files will go. The search path (Suchpfad :) represents
+the path to additional directories where other .po files can be found.
+
+I thought to use this feature for standard .po files for, say, libiberty
+etc. Each package would have to translate it again and again but if
+we could install this somewhere and use the -x option to exclude this
+strings from the generation.
+
+Perhaps I should use a different description?
+
+-- Uli
+________---------------------------------------------------------------
+\ / Ulrich Drepper / Univ. at Karlsruhe, Germany / CS Dept. / IPD
+L\inux/ email: drepper@gnu.ai.mit.edu smail: Rubensstr. 5
+ \ / drepper@ipd.info.uni-karlsruhe.de 76149 Karlsruhe
+ \/1.2.7 ------------------------------------------- Germany --------
+
+
+1, forwarded, edited,,
+Mail-from: From pinard Thu May 4 15:27:13 1995
+Return-Path: <pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0s76YH-00008NC; Thu, 4 May 95 15:27 EDT
+Message-Id: <m0s76YH-00008NC@icule>
+Date: Thu, 4 May 95 15:27 EDT
+From: pinard (=?ISO-8859-1?Q?Fran=E7ois_Pinard?=)
+To: ajc@di.uminho.pt
+In-reply-to: <9505041601.AA20254@shiva.di.uminho.pt> (ajc@di.uminho.pt)
+Subject: Re: tar is ready for pt
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+*** EOOH ***
+Date: Thu, 4 May 95 15:27 EDT
+From: pinard (François Pinard)
+To: ajc@di.uminho.pt
+In-reply-to: <9505041601.AA20254@shiva.di.uminho.pt> (ajc@di.uminho.pt)
+Subject: Re: tar is ready for pt
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+Even if it is not completely official yet in GNU, the format of
+translation file is being revised, and the extension is being
+changed from `.tt' to `.po'. This should bring the format closer
+to one of the few standards in existence for translation files.
+Hopefully, we think that translation files will be more easily
+manageable afterwards. We do not want to make a religious issue of
+this format selection, as each standard has proponents and opponents.
+Please help us by being receptive to the format GNU uses.
+
+Existing `.tt' translation files are being converted to `.po' files
+by maintainers. Translators should switch to using the `.po' format,
+as soon as possible. This is an easy job. The `.po' translation
+file format is quite affordable. Schematically, it looks like:
+
+ msgid STRING-TO-TRANSLATE
+ msgstr TRANSLATED-STRING
+
+ msgid STRING-TO-TRANSLATE
+ msgstr TRANSLATED-STRING
+
+ msgid STRING-TO-TRANSLATE
+ msgstr TRANSLATED-STRING
+ [...]
+
+`msgid' and `msgstr' are kind of keywords, written at the beginning
+of a line. Each STRING-TO-TRANSLATE or TRANSLATED-STRING respects
+the C syntax for a character string, including the surrounding
+quotes, escape sequences, and usual techniques for writing multi-line
+C strings.
+
+Outside strings, white lines and comments may be used freely.
+In the schema, white lines preceding the msgid lines are optional.
+Comments start at the beginning of a line with `#' and extend until
+the end of line. Comments written by translators should have the
+initial `#' immediately followed by some white space. If the `#'
+is not immediately followed by white space, this comment is most
+likely generated and managed by specialized GNU tools.
+
+There is a conventional, uniform way of presenting a `.po' file, but
+a description of this format is not yet available. It will be all
+easy to make suggested adjustements at a later time, so do not worry
+right now about precise conventions. Further, there are normalizing
+tools automating conformance to a great extent, to be published soon.
+
+ And another question: what happens when new versions of the
+ program are released, with new messages?
+
+Usually, most GNU packages are pretested before being released.
+All teams of translators are made aware of localizable prereleases.
+A special tool regenerates a `.po' file with obsolescent strings
+commented out, and new strings put in evidence.
+
+Further, for those of us using GNU Emacs, a special editing mode is
+being written for `.po' files, in which mode translators is able
+to navigate easily in the `.po' file, find untranslated entries,
+examine at will the context of these strings in the program sources,
+and also observe other translations already made in other languages,
+for the string being translated.
+
+Teams members should share their translations and resolve linguistic
+or terminological issues. When they reach something satisfying,
+the team should formally submit the translation to the package
+maintainer for the final release. The precise formalities are not
+organized yet, and there are many details to clear up. Some legal
+aspects also have to be addressed, this is under study right now.
+
+Special means should be used for transiting translation files
+over email. The simplest way is using GNU shar in default mode,
+or else, uuencoding the `.po' file prior to mailing.
+
+--
+François Pinard ``Vivement GNU!'' <pinard@iro.umontreal.ca>
+Email lpf@uunet.uu.net for info about the League for Programming Freedom.
+
+
+1, edited,,
+Mail-from: From IRO.UMontreal.CA!pinard Thu Apr 20 16:54:03 1995
+Return-Path: <IRO.UMontreal.CA!pinard>
+Received: by icule (Smail3.1.28.1 #1)
+ id m0s23Ea-0000CxC; Thu, 20 Apr 95 16:53 EDT
+Received: from lagrande.iro.umontreal.ca (lagrande.IRO.UMontreal.CA [132.204.32.32]) by iros1.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id KAA12085 for <icule!pinard>; Thu, 20 Apr 1995 10:13:02 -0400
+Received: (from pinard@localhost) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) id KAA08298 for icule!pinard; Thu, 20 Apr 1995 10:12:34 -0400
+Received: from saguenay.IRO.UMontreal.CA (saguenay32.IRO.UMontreal.CA [132.204.32.54]) by lagrande.iro.umontreal.ca (8.6.9/8.6.9) with ESMTP id KAA08254 for <pinard@lagrande.IRO.UMontreal.CA>; Thu, 20 Apr 1995 10:10:49 -0400
+Received: from nz11.rz.uni-karlsruhe.de (nz11.rz.uni-karlsruhe.de [129.13.64.7]) by saguenay.IRO.UMontreal.CA (8.6.9/8.6.9) with ESMTP id KAA20778 for <pinard@iro.umontreal.ca>; Thu, 20 Apr 1995 10:10:25 -0400
+Received: from ipd.info.uni-karlsruhe.de (actually i44ms.info.uni-karlsruhe.de)
+ by nz11.rz.uni-karlsruhe.de with SMTP (PP);
+ Thu, 20 Apr 1995 16:05:34 +0200
+Received: from i44pc2.info.uni-karlsruhe.de (i44pc2.info.uni-karlsruhe.de [129.13.171.31])
+ by ipd.info.uni-karlsruhe.de (8.6.4/8.6.4) with SMTP id QAA28513;
+ Thu, 20 Apr 1995 16:08:10 +0200
+Message-Id: <199504201408.QAA28513@ipd.info.uni-karlsruhe.de>
+To: pinard@IRO.UMontreal.CA (Francois Pinard),
+ meyering@comco.com (Jim Meyering),
+ roland@gnu.ai.mit.edu (Roland McGrath)
+Subject: more points to discuss
+X-Mailer: Mew beta version 0.89 on Emacs 19.28.1
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=iso-8859-1
+Date: Thu, 20 Apr 1995 16:08:55 +0200
+From: Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
+Content-Transfer-Encoding: 8bit
+X-Original-Encoding: quoted-printable
+
+*** EOOH ***
+To: pinard@IRO.UMontreal.CA (Francois Pinard),
+ meyering@comco.com (Jim Meyering),
+ roland@gnu.ai.mit.edu (Roland McGrath)
+Subject: more points to discuss
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=iso-8859-1
+Date: Thu, 20 Apr 1995 16:08:55 +0200
+From: Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
+Content-Transfer-Encoding: 8bit
+X-Original-Encoding: quoted-printable
+
+BTW my implementation will be able to process a lot of strange situation:
+- strings in preprocessor macros
+- something like gettext ("jkh" "jkhlk")
+or even
+- gettext ("jkkjh\
+sdfsdf")
+
+1, edited,,
+Received: from titan.comco.com (root@titan.comco.com [198.214.63.11]) by idefix.comco.com (8.6.9/8.6.9) with ESMTP id QAA16073 for <meyering@idefix.comco.com>; Sat, 19 Nov 1994 16:03:48 -0600
+Received: from alcor.twinsun.com (alcor.twinsun.com [198.147.65.1]) by titan.comco.com (8.6.9/8.6.9) with ESMTP id QAA03006 for <meyering@comco.com>; Sat, 19 Nov 1994 16:04:38 -0600
+Received: from twinsun.com (twinsun.twinsun.com [192.54.239.2]) by alcor.twinsun.com (8.6.5/8.6.5) with SMTP id NAA19013; Sat, 19 Nov 1994 13:55:18 -0800
+Received: from spot.twinsun.com by twinsun.com (4.1/SMI-4.1)
+ id AA29144; Sat, 19 Nov 94 14:01:01 PST
+Received: by spot.twinsun.com (4.1/SMI-4.1)
+ id AA02990; Sat, 19 Nov 94 14:01:00 PST
+From: eggert@twinsun.com (Paul Eggert)
+Message-Id: <9411192201.AA02990@spot.twinsun.com>
+Date: 19 Nov 1994 14:00:59 -0800
+To: rms@gnu.ai.mit.edu (Richard Stallman)
+Cc: meyering@comco.com, pdcruze@orac.iinet.com.au
+Subject: Re: glocale and diffutils
+Status: RO
+
+*** EOOH ***
+From: eggert@twinsun.com (Paul Eggert)
+Date: 19 Nov 1994 14:00:59 -0800
+To: rms@gnu.ai.mit.edu (Richard Stallman)
+Cc: meyering@comco.com, pdcruze@orac.iinet.com.au
+Subject: Re: glocale and diffutils
+
+The Uniforum proposal addresses this problem by partitioning message
+catalogs into ``textdomains''. Each textdomain can be maintained
+separately. Programs can share textdomains. Messages in different
+textdomains cannot clash. With diffutils, for example, I would expect
+one textdomain for diffutils programs and another for libc. The main
+module would use the default textdomain and invoke `gettext ("No
+newline at end of file")' just as diffutils-2.7.1 does; libc modules
+would use a system textdomain and would invoke something like
+`dgettext ("SYS_libc", "No such file or directory")'.
+
+
+ \ No newline at end of file
diff --git a/doc/Admin/solaris.msgfmt b/doc/Admin/solaris.msgfmt
new file mode 100644
index 0000000..fc46c2d
--- /dev/null
+++ b/doc/Admin/solaris.msgfmt
@@ -0,0 +1,21 @@
+talisker% /usr/bin/msgfmt -h
+usage: msgfmt [-v] [-o filename] [files ... ]
+
+
+talisker% /usr/bin/xgettext -h
+Usage: xgettext [-a [-x exclude-file]] [-jns][-c comment-tag]
+ [-d default-domain] [-m prefix] [-M suffix] [-p pathname] files ...
+ xgettext -h
+
+-a find ALL strings
+-c <comment-tag> get comments containing <flag>
+-d <default-domain> use <default-domain> for default domain
+-h Help
+-j update existing file with the current result
+-M <suffix> fill in msgstr with msgid<suffix>
+-m <prefix> fill in msgstr with <prefix>msgid
+-n line# file name and line number info in output
+-p <pathname> use <pathname> for output file directory
+-s generate sorted output files
+-x <exclude-file> exclude strings in file <exclude-file> from output
+- read stdin, use as a filter (input only)
diff --git a/doc/ChangeLog b/doc/ChangeLog
new file mode 100644
index 0000000..3ec5712
--- /dev/null
+++ b/doc/ChangeLog
@@ -0,0 +1,426 @@
+2000-05-06 Ulrich Drepper <drepper@redhat.com>
+
+ * nls.texi: Add section about "Using gettext in own code".
+
+1999-10-11 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.texi: Fix use of @xref.
+
+1997-09-06 02:13 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.texi: Fix names of autoconf macros now that they are in
+ automake.
+ File NLS is now named ABOUT-NLS.
+ Reported by Bruno Haible <haible@ilog.fr>.
+
+ * nls.texi: Better description of --with-included-gettext.
+
+1997-08-01 15:50 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Require version 1.2.
+
+1997-04-12 17:45 Ulrich Drepper <drepper@cygnus.com>
+
+ * mdate-sh: Update from libit version.
+
+ * mdate-sh: Handle ls output with file type in ls output is
+ starting with -.
+
+1997-04-05 18:14 Ulrich Drepper <drepper@cygnus.com>
+
+ * mdate-sh: Use ls command with -d so that we also can handle
+ directories. Patch by Bruno Haible.
+
+1997-03-11 16:24 Ulrich Drepper <drepper@cygnus.com>
+
+ * nls.texi: Don't mention removed translation teams anymore.
+
+Sat Dec 7 17:53:26 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.texi: We don't need the hack for getting the cedille
+ character anymore.
+
+Tue Dec 3 15:46:09 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (EXTRA_DIST): texinfo.tex is now automatically
+ distributed.
+
+Sun Aug 18 16:55:02 1996 Ulrich Drepper <drepper@myware.rz.uni-karlsruhe.de>
+
+ * nls.texi: Set STATUS to August.
+
+Mon Jun 17 02:29:15 1996 Ulrich Drepper <drepper@myware.rz.uni-karlsruhe.de>
+
+ * gettext.texi: More small fixes.
+
+Sat Jun 15 16:55:00 1996 Ulrich Drepper <drepper@myware.rz.uni-karlsruhe.de>
+
+ * nls.texi, gettext.texi: Some better words by François Pinard.
+
+Fri Jun 14 18:47:23 1996 Santiago Vila Doncel <sanvila@unex.es>
+
+ * gettext.texi: Correct a few typos.
+
+Tue Jun 11 19:31:16 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.texi: A few corrections by Thomas Esken.
+
+Tue Jun 11 15:29:56 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Add variable. Must be defined
+ in all subdirs.
+
+Tue Jun 4 03:43:17 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.texi:
+ Tons of changes. A first step for a real, uptodate manual.
+
+Sun Jun 2 21:21:18 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * iso-apdx.sed, Makefile.am, ISO_639: Initial revision.
+
+Sun May 26 18:21:25 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * nls.texi: Add Arabic.
+
+Fri May 24 18:24:56 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * nls.texi: Add Ukrainian.
+
+Tue May 21 14:25:02 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * nls.texi: Fix typo: outself -> ourself.
+
+ * nls.texi: Correct Indonesian.
+ Add Slovenian and Hungarian.
+
+Sun May 19 15:08:24 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * nls.texi: Update language list. Add Hebrew and Latin.
+
+Sat May 4 00:41:17 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * nls.texi: Rewording by François Pinard.
+
+ * nls.texi: Change explicitely' to `explicitly'. By François Pinard.
+
+Fri May 3 17:21:48 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * matrix.texi: 9605031921
+
+Wed Apr 10 22:04:29 1996 Ulrich Drepper <drepper@myware>
+
+ * nls.texi: matrix.texi now contains table commands.
+
+ * matrix.texi: Update for 960410.
+
+Wed Apr 10 21:58:17 1996 François Pinard <pinard@iro.umontreal.ca>
+
+ * nls.texi: Add Korean to list of languages.
+
+Tue Apr 9 23:28:08 1996 François Pinard <pinard@iro.umontreal.ca>
+
+ * nls.texi: Some better words.
+
+Sat Apr 6 11:13:18 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Add matrix.texi. Reported by François
+ Pinard.
+
+Wed Apr 3 23:40:29 1996 François Pinard <pinard@iro.umontreal.ca>
+
+ * nls.texi: Correct typo: ones -> one.
+
+Tue Apr 2 18:53:01 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all-gettext): New goal. Same as all.
+
+Tue Apr 2 16:13:11 1996 Ulrich Drepper <drepper@myware>
+
+ * nls.texi:
+ Document change in aclocal.m4. Describe --with-catgets option.
+
+Mon Mar 25 23:21:49 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Append iso-apdx.sed, ISO_639,
+ iso-apdx.texi.
+ (gettext.info, gettext.dvi): Depend on iso-apdx.texi.
+ (iso-apdx.texi): New rules. Create file from ISO_639.
+
+Mon Mar 25 02:55:23 1996 François Pinard <pinard@iro.umontreal.ca>
+
+ * gettext.texi: Latest update of PO mode documentation.
+
+Sat Mar 23 14:07:57 1996 François Pinard <pinard@iro.umontreal.ca>
+
+ * gettext.texi: Added changes concerning PO mode changes.
+
+Sat Mar 23 13:46:49 1996 Frank Donahoe <fdonahoe@wilkes1.wilkes.edu>
+
+ * gettext.texi: Fixed many problems with the English language.
+
+Wed Mar 13 21:06:17 1996 Ulrich Drepper <drepper@myware>
+
+ * nls.texi: Changed gnu-translation@prep to gnu-translation@gnu.
+ Suggested by Franc,ois Pinard.
+
+Fri Mar 1 23:46:28 1996 Ulrich Drepper <drepper@myware>
+
+ * nls.texi: STATUS is 1996, not 1995.
+
+Thu Feb 15 03:45:30 1996 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Update documentation for
+ - `--force' option
+ - `-d -' option
+ - new intl/po subdir handling
+
+Mon Feb 12 01:33:49 1996 Ulrich Drepper <drepper@myware>
+
+ * nls.texi: STATUS is January.
+
+ * nls.texi: Omitted pl at lower side.
+
+ * nls.texi: Add pl for gettext to matrix.
+
+Fri Dec 29 14:00:17 1995 Ulrich Drepper <drepper@myware>
+
+ * nls.texi: Incorporate some improvements by Franc,ois Pinard.
+
+Sun Dec 24 14:30:49 1995 Ulrich Drepper <drepper@myware>
+
+ * nls.texi: Small corrections.
+ Updte table for ko translation of gettext.
+
+Tue Dec 19 22:13:40 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (Makefile): Explicitly use $(SHELL) for running
+ shell scripts.
+
+Fri Dec 15 19:34:50 1995 Karl Eichwalder <ke@ke.central.de>
+
+ * gettext.texi: Correct list of needed macros form aclocal.m4.
+
+Mon Dec 4 16:19:29 1995 Ulrich Drepper <drepper@myware>
+
+ * nls.texi (STATUS): Set to November.
+
+Mon Dec 4 16:14:18 1995 Ulrich Drepper <drepper@myware>
+
+ * nls.texi: Update matrix for official release.
+
+Sun Nov 26 01:22:07 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Fix some typos.
+
+Sat Nov 25 02:45:46 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (version.texi): Also depend on ../configure.in.
+
+Thu Nov 23 01:26:35 1995 Ulrich Drepper <drepper@myware>
+
+ * nls.texi:
+ Change README.NLS to ABOUT-NLS. Reported by Franc,ois Pinard.
+
+Tue Nov 14 12:43:22 1995 Ulrich Drepper <drepper@myware>
+
+ * nls.texi: Mention Japanese translation for shar in table.
+
+Thu Nov 9 01:14:49 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi:
+ Document new option --directory and --files-from of xgettext program.
+
+Tue Nov 7 10:54:43 1995 Ulrich Drepper <drepper@myware>
+
+ * nls.texi: CLISP now uses GNU gettext.
+
+Mon Nov 6 17:05:39 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Some more cleanups by Franc,ois Pinard.
+
+Mon Nov 6 00:36:37 1995 Ulrich Drepper <drepper@>
+
+ * nls.texi: Add comment about problems with systems which have GNU
+ gettext previously installed.
+
+Sun Nov 5 21:56:51 1995 Ulrich Drepper <drepper@myware>
+
+ * nls.texi:
+ Advise about always using GNU gettext moved to here from ../README.
+
+ * gettext.texi: Fix some typos reported by Franc,ois Pinard.
+ In descripton of _N change the name to N_.
+
+ * Makefile.in (gettext.info):
+ Remove old .info* files before generating new ones.
+ (stamp-vti): Remove old stamp before generating new one.
+
+Sun Nov 5 19:40:11 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist-gettext): Make synonym for dist.
+
+Sun Nov 5 17:59:31 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Add nls.texi.
+
+ * nls.texi: Initial revision.
+
+ * gettext.texi: Protect RFC and number by @w.
+
+Sun Nov 5 11:38:00 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Suppress error message when ln failed.
+ Remove Emacs local variable definition.
+ (dist): Get files from $(srcdir) explicitly.
+
+ * gettext.texi: Add some comments about gettext_noop and _N.
+ Describe defaults keywords for -k option of xgettext.
+
+Fri Nov 3 00:20:35 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Some small changes by Franc,ois.
+
+Sat Oct 28 23:26:28 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi:
+ Add warning about language changing and not using GNU gettext library.
+
+Sat Oct 28 17:15:07 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Run spell checker. :-) It was necessary.
+
+ * gettext.texi: Document usage of libintl in other programs.
+ Describe changing of language in programs.
+
+Sun Sep 17 23:16:16 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Remove references to ISO 639 in description of
+ locale variable settings.
+
+Wed Aug 23 20:49:57 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Applied Franc,ois' patch from 950821.
+
+Sat Aug 19 17:41:06 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Make only install-data depend on `all'.
+
+ * Makefile.in (install-src):
+ Make behave like install. I.e. really install the manual.
+
+Fri Aug 18 12:33:43 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Changes of 950817 by Franc,ois Pinard.
+
+Mon Aug 14 23:52:20 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): New no-op goal.
+
+Tue Aug 8 01:39:45 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi:
+ Add description of dcgettext() optimization for gcc-2.7.
+
+Fri Aug 4 15:47:10 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Remove `copying instead' message.
+
+Tue Aug 1 15:58:17 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Some typos fixed. Email address update for Eugene
+ H. Dorr. By Franc,ois Pinard.
+
+ * Makefile.in (stamp-vti):
+ Use $(SHELL) and make compilation offside $(srcdir) possible.
+
+Tue Aug 1 08:51:30 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-data): Use sed instead of expr to get basename.
+
+Sun Jul 30 22:17:14 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Minor corrections to menus and typos by Franc,ois.
+ Some more words about LIBS rule in src/Makefile.in.
+ PO mode file is now installed automatically.
+
+Wed Jul 26 01:00:11 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi:
+ Includes latest of Franc,ois' changes for the maintainer chapter.
+ Many little changes and addons.
+
+Mon Jul 24 00:51:38 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Typo changes by Franc,ois.
+ Added section about special cases in translatable strings.
+ Added section about changing Makefiles for Maintainers.
+ Various minor addons.
+
+Wed Jul 19 02:05:45 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi:
+ Fix typo: keywoards -> keywords. Reported by Franc,ois Pinard.
+
+ * gettext.texi:
+ Franc,ois added description of the last changes in Emacs PO mode
+ which allow marking translatable strings in C sources.
+
+Tue Jul 18 21:25:44 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Now we have again gettext.info-[1-4].
+
+ * gettext.texi (Comparison):
+ Some points on comparing catgets vs. gettext are written.
+
+Mon Jul 17 01:03:49 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi: Typo fixed. Reported by Franc,ois Pinard.
+
+Sun Jul 16 13:25:05 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.texi:
+ Latest version for 0.7.4. Changes all by Franc,ois Pinard.
+
+Sun Jul 16 00:17:28 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES):
+ With the current makeinfo (1.63) there are only gettext.info-[123]
+ produced. Remove gettext.info-4. Reported by Erik Backus.
+
+Thu Jul 13 01:41:14 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check): New no-op goal.
+
+ * gettext.texi: Version of 950712 by Franc,ois.
+
+Wed Jul 12 00:32:58 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): now we have gettext.info{,-[1-4]}
+
+ * gettext.texi: First version after rewrite by Franc,ois Pinard.
+
+Mon Jul 3 23:36:25 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Correct for new manual with NLS and po-mode chapter.
+ Do construct po-mode.{texi,dvi} use nls.texi.
+ Last correction on install goal was wrong.
+ Correct installation and unistallation rules.
+
+ * gettext.texi: Version with po-mode and NLS chapter.
+ Minor changes by Franc,ois.
+
+ * gettext.texi: Make NLS part an include file.
+
+Sun Jul 2 12:32:37 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): fix typo.
+
+ * gettext.texi: some more things written about using GNU gettext
+ in own projects.
+
+Sun Jul 2 01:47:02 1995 Ulrich Drepper <drepper@myware>
+
+ * First official release. This directory now contains a very
+ preliminary version of the gettext manual with a quite complete
+ chapter for todays Emacs PO mode by Franc,ois Pinard.
diff --git a/doc/ISO_639 b/doc/ISO_639
new file mode 100644
index 0000000..c90684f
--- /dev/null
+++ b/doc/ISO_639
@@ -0,0 +1,180 @@
+Technical contents of ISO 639:1988 (E/F)
+"Code for the representation of names of languages".
+
+Typed by Keld.Simonsen@dkuug.dk 1990-11-30
+Minor corrections, 1992-09-08 by Keld Simonsen
+Sundanese corrected, 1992-11-11 by Keld Simonsen
+Telugu corrected, 1995-08-24 by Keld Simonsen
+Hebrew, Indonesian, Yiddish corrected 1995-10-10 by Michael Everson
+Inuktitut, Uighur, Zhuang added 1995-10-10 by Michael Everson
+Sinhalese corrected, 1995-10-10 by Michael Everson
+Faeroese corrected to Faroese, 1995-11-18 by Keld Simonsen
+
+Two-letter lower-case symbols are used.
+The Registration Authority for ISO 639 is Infoterm, Osterreichisches
+Normungsinstitut (ON), Postfach 130, A-1021 Vienna, Austria.
+
+aa Afar
+ab Abkhazian
+af Afrikaans
+am Amharic
+ar Arabic
+as Assamese
+ay Aymara
+az Azerbaijani
+
+ba Bashkir
+be Byelorussian
+bg Bulgarian
+bh Bihari
+bi Bislama
+bn Bengali; Bangla
+bo Tibetan
+br Breton
+
+ca Catalan
+co Corsican
+cs Czech
+cy Welsh
+
+da Danish
+de German
+dz Bhutani
+
+el Greek
+en English
+eo Esperanto
+es Spanish
+et Estonian
+eu Basque
+
+fa Persian
+fi Finnish
+fj Fiji
+fo Faroese
+fr French
+fy Frisian
+
+ga Irish
+gd Scots Gaelic
+gl Galician
+gn Guarani
+gu Gujarati
+
+ha Hausa
+he Hebrew (formerly iw)
+hi Hindi
+hr Croatian
+hu Hungarian
+hy Armenian
+
+ia Interlingua
+id Indonesian (formerly in)
+ie Interlingue
+ik Inupiak
+is Icelandic
+it Italian
+iu Inuktitut
+
+ja Japanese
+jw Javanese
+
+ka Georgian
+kk Kazakh
+kl Greenlandic
+km Cambodian
+kn Kannada
+ko Korean
+ks Kashmiri
+ku Kurdish
+ky Kirghiz
+
+la Latin
+ln Lingala
+lo Laothian
+lt Lithuanian
+lv Latvian, Lettish
+
+mg Malagasy
+mi Maori
+mk Macedonian
+ml Malayalam
+mn Mongolian
+mo Moldavian
+mr Marathi
+ms Malay
+mt Maltese
+my Burmese
+
+na Nauru
+ne Nepali
+nl Dutch
+no Norwegian
+
+oc Occitan
+om (Afan) Oromo
+or Oriya
+
+pa Punjabi
+pl Polish
+ps Pashto, Pushto
+pt Portuguese
+
+qu Quechua
+
+rm Rhaeto-Romance
+rn Kirundi
+ro Romanian
+ru Russian
+rw Kinyarwanda
+
+sa Sanskrit
+sd Sindhi
+sg Sangro
+sh Serbo-Croatian
+si Sinhalese
+sk Slovak
+sl Slovenian
+sm Samoan
+sn Shona
+so Somali
+sq Albanian
+sr Serbian
+ss Siswati
+st Sesotho
+su Sundanese
+sv Swedish
+sw Swahili
+
+ta Tamil
+te Telugu
+tg Tajik
+th Thai
+ti Tigrinya
+tk Turkmen
+tl Tagalog
+tn Setswana
+to Tonga
+tr Turkish
+ts Tsonga
+tt Tatar
+tw Twi
+
+ug Uighur
+uk Ukrainian
+ur Urdu
+uz Uzbek
+
+vi Vietnamese
+vo Volapuk
+
+wo Wolof
+
+xh Xhosa
+
+yi Yiddish (formerly ji)
+yo Yoruba
+
+za Zhuang
+zh Chinese
+zu Zulu
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..661c978
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,32 @@
+## Makefile for the doc subdirectory of the GNU NLS Utilities
+## Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+## Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+SED = sed
+
+info_TEXINFOS = gettext.texi
+gettext_TEXINFOS = iso-apdx.texi
+
+EXTRA_DIST = iso-apdx.sed ISO_639 nls.texi matrix.texi
+
+iso-apdx.texi: ISO_639 iso-apdx.sed
+ $(SED) -f $(srcdir)/iso-apdx.sed $(srcdir)/ISO_639 > iso-apdx.tmp
+ rm -f $(srcdir)/iso-apdx.texi
+ mv iso-apdx.tmp $(srcdir)/iso-apdx.texi
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..509f1fd
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,370 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+ACLOCAL_VERSION = @ACLOCAL_VERSION@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+EMACS = @EMACS@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LIBOBJS = @LIBOBJS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+YACC = @YACC@
+aclocaldir = @aclocaldir@
+l = @l@
+lispdir = @lispdir@
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+SED = sed
+
+info_TEXINFOS = gettext.texi
+gettext_TEXINFOS = iso-apdx.texi
+
+EXTRA_DIST = iso-apdx.sed ISO_639 nls.texi matrix.texi
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+TEXI2DVI = texi2dvi
+INFO_DEPS = gettext.info
+DVIS = gettext.dvi
+TEXINFOS = gettext.texi
+DIST_COMMON = $(gettext_TEXINFOS) ChangeLog Makefile.am Makefile.in \
+mdate-sh stamp-vti texinfo.tex version.texi
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnits doc/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+$(srcdir)/version.texi: stamp-vti
+ @:
+
+$(srcdir)/stamp-vti: gettext.texi $(top_srcdir)/configure.in
+ @echo "@set UPDATED `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/gettext.texi`" > vti.tmp
+ @echo "@set EDITION $(VERSION)" >> vti.tmp
+ @echo "@set VERSION $(VERSION)" >> vti.tmp
+ @cmp -s vti.tmp $(srcdir)/version.texi \
+ || (echo "Updating $(srcdir)/version.texi"; \
+ cp vti.tmp $(srcdir)/version.texi)
+ -@rm -f vti.tmp
+ @cp $(srcdir)/version.texi $@
+
+mostlyclean-vti:
+ -rm -f vti.tmp
+
+clean-vti:
+
+distclean-vti:
+
+maintainer-clean-vti:
+ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
+
+gettext.info: gettext.texi version.texi $(gettext_TEXINFOS)
+gettext.dvi: gettext.texi version.texi $(gettext_TEXINFOS)
+
+
+DVIPS = dvips
+
+.texi.info:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texi.dvi:
+ TEXINPUTS=.:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texi:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texinfo.info:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texinfo:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texinfo.dvi:
+ TEXINPUTS=.:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi.info:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.txi.dvi:
+ TEXINPUTS=.:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+.dvi.ps:
+ $(DVIPS) $< -o $@
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ d=$(srcdir); \
+ for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+ if test -f $$d/$$ifile; then \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ done; \
+ else : ; fi
+
+uninstall-info:
+ $(PRE_UNINSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ ii=yes; \
+ else ii=; fi; \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ test -z "$ii" \
+ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
+ done
+ @$(NORMAL_UNINSTALL)
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ done
+
+dist-info: $(INFO_DEPS)
+ list='$(INFO_DEPS)'; \
+ for base in $$list; do \
+ d=$(srcdir); \
+ for file in `cd $$d && eval echo $$base*`; do \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done; \
+ done
+
+mostlyclean-aminfo:
+ -rm -f gettext.aux gettext.cp gettext.cps gettext.dvi gettext.fn \
+ gettext.fns gettext.ky gettext.kys gettext.ps gettext.log \
+ gettext.pg gettext.toc gettext.tp gettext.tps gettext.vr \
+ gettext.vrs gettext.op gettext.tr gettext.cv gettext.cn
+
+clean-aminfo:
+
+distclean-aminfo:
+
+maintainer-clean-aminfo:
+ cd $(srcdir) && for i in $(INFO_DEPS); do \
+ rm -f $$i; \
+ if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
+ rm -f $$i-[0-9]*; \
+ fi; \
+ done
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = doc
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits doc/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+info-am: $(INFO_DEPS)
+info: info-am
+dvi-am: $(DVIS)
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-info-am
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-info
+uninstall: uninstall-am
+all-am: Makefile $(INFO_DEPS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-vti clean-aminfo clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-vti distclean-aminfo distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-vti maintainer-clean-aminfo \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
+install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \
+clean-aminfo maintainer-clean-aminfo tags distdir info-am info dvi-am \
+dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+iso-apdx.texi: ISO_639 iso-apdx.sed
+ $(SED) -f $(srcdir)/iso-apdx.sed $(srcdir)/ISO_639 > iso-apdx.tmp
+ rm -f $(srcdir)/iso-apdx.texi
+ mv iso-apdx.tmp $(srcdir)/iso-apdx.texi
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/gettext.info b/doc/gettext.info
new file mode 100644
index 0000000..51af348
--- /dev/null
+++ b/doc/gettext.info
@@ -0,0 +1,126 @@
+This is Info file gettext.info, produced by Makeinfo version 1.68 from
+the input file gettext.texi.
+
+INFO-DIR-SECTION GNU Gettext Utilities
+START-INFO-DIR-ENTRY
+* Gettext: (gettext). GNU gettext utilities.
+* gettextize: (gettext)gettextize Invocation. Prepare a package for gettext.
+* msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files.
+* msgmerge: (gettext)msgmerge Invocation. Update two PO files into one.
+* xgettext: (gettext)xgettext Invocation. Extract strings into a PO file.
+END-INFO-DIR-ENTRY
+
+ This file provides documentation for GNU `gettext' utilities. It
+also serves as a reference for the free Translation Project.
+
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be stated in a
+translation approved by the Foundation.
+
+
+Indirect:
+gettext.info-1: 1431
+gettext.info-2: 48351
+gettext.info-3: 95765
+gettext.info-4: 145601
+gettext.info-5: 195230
+
+Tag Table:
+(Indirect)
+Node: Top1431
+Node: Introduction6625
+Node: Why8481
+Node: Concepts11727
+Node: Aspects15140
+Node: Files21196
+Node: Overview23464
+Node: Basics34088
+Node: Installation34918
+Node: PO Files36652
+Node: Main PO Commands43407
+Node: Entry Positioning48351
+Node: Normalizing53603
+Node: Sources58055
+Node: Triggering59326
+Node: Mark Keywords61682
+Node: Marking65232
+Node: c-format72873
+Node: Special cases76624
+Node: Initial79487
+Node: xgettext Invocation79809
+Node: C Sources Context83036
+Node: Compendium88015
+Node: Updating88718
+Node: msgmerge Invocation89358
+Node: Translated Entries89532
+Node: Fuzzy Entries90824
+Node: Untranslated Entries93926
+Node: Obsolete Entries95765
+Node: Modifying Translations98897
+Node: Modifying Comments106715
+Node: Subedit111022
+Node: Auxiliary114800
+Node: Binaries117870
+Node: msgfmt Invocation118134
+Node: MO Files120761
+Node: Users128173
+Node: Matrix129654
+Node: Installers130857
+Node: End Users132045
+Node: Programmers132674
+Node: catgets133848
+Node: Interface to catgets135253
+Node: Problems with catgets137254
+Node: gettext138152
+Node: Interface to gettext139393
+Node: Ambiguities141735
+Node: Locating Catalogs144292
+Node: Optimized gettext145601
+Node: Comparison149189
+Node: Using libintl.a154904
+Node: gettext grok155675
+Node: Temp Programmers158534
+Node: Temp Implementations158974
+Node: Temp catgets160340
+Node: Temp WSI162027
+Node: Temp Notes164015
+Node: Translators164504
+Node: Trans Intro 0164883
+Node: Trans Intro 1167532
+Node: Discussions169396
+Node: Organization172551
+Node: Central Coordination174532
+Node: National Teams175660
+Node: Sub-Cultures178172
+Node: Organizational Ideas179091
+Node: Mailing Lists180093
+Node: Information Flow181896
+Node: Maintainers184029
+Node: Flat and Non-Flat185789
+Node: Prerequisites187550
+Node: gettextize Invocation191658
+Node: Adjusting Files195230
+Node: po/POTFILES.in196453
+Node: configure.in197394
+Node: aclocal199521
+Node: acconfig200700
+Node: Makefile201314
+Node: src/Makefile203502
+Node: Conclusion205899
+Node: History206388
+Node: References209848
+Node: Country Codes211403
+
+End Tag Table
diff --git a/doc/gettext.info-1 b/doc/gettext.info-1
new file mode 100644
index 0000000..2718d25
--- /dev/null
+++ b/doc/gettext.info-1
@@ -0,0 +1,999 @@
+This is Info file gettext.info, produced by Makeinfo version 1.68 from
+the input file gettext.texi.
+
+INFO-DIR-SECTION GNU Gettext Utilities
+START-INFO-DIR-ENTRY
+* Gettext: (gettext). GNU gettext utilities.
+* gettextize: (gettext)gettextize Invocation. Prepare a package for gettext.
+* msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files.
+* msgmerge: (gettext)msgmerge Invocation. Update two PO files into one.
+* xgettext: (gettext)xgettext Invocation. Extract strings into a PO file.
+END-INFO-DIR-ENTRY
+
+ This file provides documentation for GNU `gettext' utilities. It
+also serves as a reference for the free Translation Project.
+
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be stated in a
+translation approved by the Foundation.
+
+
+File: gettext.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
+
+GNU `gettext' utilities
+***********************
+
+* Menu:
+
+* Introduction:: Introduction
+* Basics:: PO Files and PO Mode Basics
+* Sources:: Preparing Program Sources
+* Initial:: Making the Initial PO File
+* Updating:: Updating Existing PO Files
+* Binaries:: Producing Binary MO Files
+* Users:: The User's View
+* Programmers:: The Programmer's View
+* Translators:: The Translator's View
+* Maintainers:: The Maintainer's View
+* Conclusion:: Concluding Remarks
+
+* Country Codes:: ISO 639 country codes
+
+ -- The Detailed Node Listing --
+
+Introduction
+
+* Why:: The Purpose of GNU `gettext'
+* Concepts:: I18n, L10n, and Such
+* Aspects:: Aspects in Native Language Support
+* Files:: Files Conveying Translations
+* Overview:: Overview of GNU `gettext'
+
+PO Files and PO Mode Basics
+
+* Installation:: Completing GNU `gettext' Installation
+* PO Files:: The Format of PO Files
+* Main PO Commands:: Main Commands
+* Entry Positioning:: Entry Positioning
+* Normalizing:: Normalizing Strings in Entries
+
+Preparing Program Sources
+
+* Triggering:: Triggering `gettext' Operations
+* Mark Keywords:: How Marks Appears in Sources
+* Marking:: Marking Translatable Strings
+* c-format:: Telling something about the following string
+* Special cases:: Special Cases of Translatable Strings
+
+Making the Initial PO File
+
+* xgettext Invocation:: Invoking the `xgettext' Program
+* C Sources Context:: C Sources Context
+* Compendium:: Using Translation Compendiums
+
+Updating Existing PO Files
+
+* msgmerge Invocation:: Invoking the `msgmerge' Program
+* Translated Entries:: Translated Entries
+* Fuzzy Entries:: Fuzzy Entries
+* Untranslated Entries:: Untranslated Entries
+* Obsolete Entries:: Obsolete Entries
+* Modifying Translations:: Modifying Translations
+* Modifying Comments:: Modifying Comments
+* Auxiliary:: Consulting Auxiliary PO Files
+
+Producing Binary MO Files
+
+* msgfmt Invocation:: Invoking the `msgfmt' Program
+* MO Files:: The Format of GNU MO Files
+
+The User's View
+
+* Matrix:: The Current `ABOUT-NLS' Matrix
+* Installers:: Magic for Installers
+* End Users:: Magic for End Users
+
+The Programmer's View
+
+* catgets:: About `catgets'
+* gettext:: About `gettext'
+* Comparison:: Comparing the two interfaces
+* Using libintl.a:: Using libintl.a in own programs
+* gettext grok:: Being a `gettext' grok
+* Temp Programmers:: Temporary Notes for the Programmers Chapter
+
+About `catgets'
+
+* Interface to catgets:: The interface
+* Problems with catgets:: Problems with the `catgets' interface?!
+
+About `gettext'
+
+* Interface to gettext:: The interface
+* Ambiguities:: Solving ambiguities
+* Locating Catalogs:: Locating message catalog files
+* Optimized gettext:: Optimization of the *gettext functions
+
+Temporary Notes for the Programmers Chapter
+
+* Temp Implementations:: Temporary - Two Possible Implementations
+* Temp catgets:: Temporary - About `catgets'
+* Temp WSI:: Temporary - Why a single implementation
+* Temp Notes:: Temporary - Notes
+
+The Translator's View
+
+* Trans Intro 0:: Introduction 0
+* Trans Intro 1:: Introduction 1
+* Discussions:: Discussions
+* Organization:: Organization
+* Information Flow:: Information Flow
+
+Organization
+
+* Central Coordination:: Central Coordination
+* National Teams:: National Teams
+* Mailing Lists:: Mailing Lists
+
+National Teams
+
+* Sub-Cultures:: Sub-Cultures
+* Organizational Ideas:: Organizational Ideas
+
+The Maintainer's View
+
+* Flat and Non-Flat:: Flat or Non-Flat Directory Structures
+* Prerequisites:: Prerequisite Works
+* gettextize Invocation:: Invoking the `gettextize' Program
+* Adjusting Files:: Files You Must Create or Alter
+
+Files You Must Create or Alter
+
+* po/POTFILES.in:: `POTFILES.in' in `po/'
+* configure.in:: `configure.in' at top level
+* aclocal:: `aclocal.m4' at top level
+* acconfig:: `acconfig.h' at top level
+* Makefile:: `Makefile.in' at top level
+* src/Makefile:: `Makefile.in' in `src/'
+
+Concluding Remarks
+
+* History:: History of GNU `gettext'
+* References:: Related Readings
+
+
+File: gettext.info, Node: Introduction, Next: Basics, Prev: Top, Up: Top
+
+Introduction
+************
+
+ This manual is still in *DRAFT* state. Some sections are still
+ empty, or almost. We keep merging material from other sources
+ (essentially e-mail folders) while the proper integration of this
+ material is delayed.
+
+ In this manual, we use *he* when speaking of the programmer or
+maintainer, *she* when speaking of the translator, and *they* when
+speaking of the installers or end users of the translated program.
+This is only a convenience for clarifying the documentation. It is
+*absolutely* not meant to imply that some roles are more appropriate to
+males or females. Besides, as you might guess, GNU `gettext' is meant
+to be useful for people using computers, whatever their sex, race,
+religion or nationality!
+
+ This chapter explains the goals sought in the creation of GNU
+`gettext' and the free Translation Project. Then, it explains a few
+broad concepts around Native Language Support, and positions message
+translation with regard to other aspects of national and cultural
+variance, as they apply to to programs. It also surveys those files
+used to convey the translations. It explains how the various tools
+interact in the initial generation of these files, and later, how the
+maintenance cycle should usually operate.
+
+ Please send suggestions and corrections to:
+
+ Internet address:
+ bug-gnu-utils@gnu.org
+
+Please include the manual's edition number and update date in your
+messages.
+
+* Menu:
+
+* Why:: The Purpose of GNU `gettext'
+* Concepts:: I18n, L10n, and Such
+* Aspects:: Aspects in Native Language Support
+* Files:: Files Conveying Translations
+* Overview:: Overview of GNU `gettext'
+
+
+File: gettext.info, Node: Why, Next: Concepts, Prev: Introduction, Up: Introduction
+
+The Purpose of GNU `gettext'
+============================
+
+ Usually, programs are written and documented in English, and use
+English at execution time to interact with users. This is true not
+only of GNU software, but also of a great deal of commercial and free
+software. Using a common language is quite handy for communication
+between developers, maintainers and users from all countries. On the
+other hand, most people are less comfortable with English than with
+their own native language, and would prefer to use their mother tongue
+for day to day's work, as far as possible. Many would simply *love* to
+see their computer screen showing a lot less of English, and far more
+of their own language.
+
+ However, to many people, this dream might appear so far fetched that
+they may believe it is not even worth spending time thinking about it.
+They have no confidence at all that the dream might ever become true.
+Yet some have not lost hope, and have organized themselves. The
+Translation Project is a formalization of this hope into a workable
+structure, which has a good chance to get all of us nearer the
+achievement of a truly multi-lingual set of programs.
+
+ GNU `gettext' is an important step for the Translation Project, as
+it is an asset on which we may build many other steps. This package
+offers to programmers, translators and even users, a well integrated
+set of tools and documentation. Specifically, the GNU `gettext'
+utilities are a set of tools that provides a framework within which
+other free packages may produce multi-lingual messages. These tools
+include a set of conventions about how programs should be written to
+support message catalogs, a directory and file naming organization for
+the message catalogs themselves, a runtime library supporting the
+retrieval of translated messages, and a few stand-alone programs to
+massage in various ways the sets of translatable strings, or already
+translated strings. A special mode for Emacs(1) also helps ease
+interested parties into preparing these sets, or bringing them up to
+date.
+
+ GNU `gettext' is designed to minimize the impact of
+internationalization on program sources, keeping this impact as small
+and hardly noticeable as possible. Internationalization has better
+chances of succeeding if it is very light weighted, or at least, appear
+to be so, when looking at program sources.
+
+ The Translation Project also uses the GNU `gettext' distribution as
+a vehicle for documenting its structure and methods. This goes beyond
+the strict technicalities of documenting the GNU `gettext' proper. By
+so doing, translators will find in a single place, as far as possible,
+all they need to know for properly doing their translating work. Also,
+this supplemental documentation might also help programmers, and even
+curious users, in understanding how GNU `gettext' is related to the
+remainder of the Translation Project, and consequently, have a glimpse
+at the *big picture*.
+
+ ---------- Footnotes ----------
+
+ (1) In this manual, all mentions of Emacs refers to either GNU Emacs
+or to XEmacs, which people sometimes call FSF Emacs and Lucid Emacs,
+respectively.
+
+
+File: gettext.info, Node: Concepts, Next: Aspects, Prev: Why, Up: Introduction
+
+I18n, L10n, and Such
+====================
+
+ Two long words appear all the time when we discuss support of native
+language in programs, and these words have a precise meaning, worth
+being explained here, once and for all in this document. The words are
+*internationalization* and *localization*. Many people, tired of
+writing these long words over and over again, took the habit of writing
+"i18n" and "l10n" instead, quoting the first and last letter of each
+word, and replacing the run of intermediate letters by a number merely
+telling how many such letters there are. But in this manual, in the
+sake of clarity, we will patiently write the names in full, each time...
+
+ By "internationalization", one refers to the operation by which a
+program, or a set of programs turned into a package, is made aware of
+and able to support multiple languages. This is a generalization
+process, by which the programs are untied from calling only English
+strings or other English specific habits, and connected to generic ways
+of doing the same, instead. Program developers may use various
+techniques to internationalize their programs. Some of these have been
+standardized. GNU `gettext' offers one of these standards. *Note
+Programmers::.
+
+ By "localization", one means the operation by which, in a set of
+programs already internationalized, one gives the program all needed
+information so that it can adapt itself to handle its input and output
+in a fashion which is correct for some native language and cultural
+habits. This is a particularisation process, by which generic methods
+already implemented in an internationalized program are used in
+specific ways. The programming environment puts several functions to
+the programmers disposal which allow this runtime configuration. The
+formal description of specific set of cultural habits for some country,
+together with all associated translations targeted to the same native
+language, is called the "locale" for this language or country. Users
+achieve localization of programs by setting proper values to special
+environment variables, prior to executing those programs, identifying
+which locale should be used.
+
+ In fact, locale message support is only one component of the cultural
+data that makes up a particular locale. There are a whole host of
+routines and functions provided to aid programmers in developing
+internationalized software and which allow them to access the data
+stored in a particular locale. When someone presently refers to a
+particular locale, they are obviously referring to the data stored
+within that particular locale. Similarly, if a programmer is referring
+to "accessing the locale routines", they are referring to the complete
+suite of routines that access all of the locale's information.
+
+ One uses the expression "Native Language Support", or merely NLS,
+for speaking of the overall activity or feature encompassing both
+internationalization and localization, allowing for multi-lingual
+interactions in a program. In a nutshell, one could say that
+internationalization is the operation by which further localizations
+are made possible.
+
+ Also, very roughly said, when it comes to multi-lingual messages,
+internationalization is usually taken care of by programmers, and
+localization is usually taken care of by translators.
+
+
+File: gettext.info, Node: Aspects, Next: Files, Prev: Concepts, Up: Introduction
+
+Aspects in Native Language Support
+==================================
+
+ For a totally multi-lingual distribution, there are many things to
+translate beyond output messages.
+
+ * As of today, GNU `gettext' offers a complete toolset for
+ translating messages output by C programs. Perl scripts and shell
+ scripts will also need to be translated. Even if there are today
+ some hooks by which this can be done, these hooks are not
+ integrated as well as they should be.
+
+ * Some programs, like `autoconf' or `bison', are able to produce
+ other programs (or scripts). Even if the generating programs
+ themselves are internationalized, the generated programs they
+ produce may need internationalization on their own, and this
+ indirect internationalization could be automated right from the
+ generating program. In fact, quite usually, generating and
+ generated programs could be internationalized independently, as
+ the effort needed is fairly orthogonal.
+
+ * A few programs include textual tables which might need translation
+ themselves, independently of the strings contained in the program
+ itself. For example, RFC 1345 gives an English description for
+ each character which the `recode' program is able to reconstruct
+ at execution. Since these descriptions are extracted from the RFC
+ by mechanical means, translating them properly would require a
+ prior translation of the RFC itself.
+
+ * Almost all programs accept options, which are often worded out so
+ to be descriptive for the English readers; one might want to
+ consider offering translated versions for program options as well.
+
+ * Many programs read, interpret, compile, or are somewhat driven by
+ input files which are texts containing keywords, identifiers, or
+ replies which are inherently translatable. For example, one may
+ want `gcc' to allow diacriticized characters in identifiers or use
+ translated keywords; `rm -i' might accept something else than `y'
+ or `n' for replies, etc. Even if the program will eventually make
+ most of its output in the foreign languages, one has to decide
+ whether the input syntax, option values, etc., are to be localized
+ or not.
+
+ * The manual accompanying a package, as well as all documentation
+ files in the distribution, could surely be translated, too.
+ Translating a manual, with the intent of later keeping up with
+ updates, is a major undertaking in itself, generally.
+
+ As we already stressed, translation is only one aspect of locales.
+Other internationalization aspects are not currently handled by GNU
+`gettext', but perhaps may be handled in future versions. There are
+many attributes that are needed to define a country's cultural
+conventions. These attributes include beside the country's native
+language, the formatting of the date and time, the representation of
+numbers, the symbols for currency, etc. These local "rules" are termed
+the country's locale. The locale represents the knowledge needed to
+support the country's native attributes.
+
+ There are a few major areas which may vary between countries and
+hence, define what a locale must describe. The following list helps
+putting multi-lingual messages into the proper context of other tasks
+related to locales, and also presents some other areas which GNU
+`gettext' might eventually tackle, maybe, one of these days.
+
+*Characters and Codesets*
+ The codeset most commonly used through out the USA and most English
+ speaking parts of the world is the ASCII codeset. However, there
+ are many characters needed by various locales that are not found
+ within this codeset. The 8-bit ISO 8859-1 code set has most of
+ the special characters needed to handle the major European
+ languages. However, in many cases, the ISO 8859-1 font is not
+ adequate. Hence each locale will need to specify which codeset
+ they need to use and will need to have the appropriate character
+ handling routines to cope with the codeset.
+
+*Currency*
+ The symbols used vary from country to country as does the position
+ used by the symbol. Software needs to be able to transparently
+ display currency figures in the native mode for each locale.
+
+*Dates*
+ The format of date varies between locales. For example, Christmas
+ day in 1994 is written as 12/25/94 in the USA and as 25/12/94 in
+ Australia. Other countries might use ISO 8061 dates, etc.
+
+ Time of the day may be noted as HH:MM, HH.MM, or otherwise. Some
+ locales require time to be specified in 24-hour mode rather than
+ as AM or PM. Further, the nature and yearly extent of the
+ Daylight Saving correction vary widely between countries.
+
+*Numbers*
+ Numbers can be represented differently in different locales. For
+ example, the following numbers are all written correctly for their
+ respective locales:
+
+ 12,345.67 English
+ 12.345,67 French
+ 1,2345.67 Asia
+
+ Some programs could go further and use different unit systems, like
+ English units or Metric units, or even take into account variants
+ about how numbers are spelled in full.
+
+*Messages*
+ The most obvious area is the language support within a locale.
+ This is where GNU `gettext' provides the means for developers and
+ users to easily change the language that the software uses to
+ communicate to the user.
+
+ In the near future we see no chance that components of locale
+outside of message handling will be made available for use in other
+packages. The reason for this is that most modern systems provide a
+more or less reasonable support for at least some of the missing
+components. Another point is that the GNU `libc' and Linux will get a
+new and complete implementation of the whole locale functionality which
+could be adopted by system lacking a reasonable locale support.
+
+
+File: gettext.info, Node: Files, Next: Overview, Prev: Aspects, Up: Introduction
+
+Files Conveying Translations
+============================
+
+ The letters PO in `.po' files means Portable Object, to distinguish
+it from `.mo' files, where MO stands for Machine Object. This
+paradigm, as well as the PO file format, is inspired by the NLS
+standard developed by Uniforum, and implemented by Sun in their Solaris
+system.
+
+ PO files are meant to be read and edited by humans, and associate
+each original, translatable string of a given package with its
+translation in a particular target language. A single PO file is
+dedicated to a single target language. If a package supports many
+languages, there is one such PO file per language supported, and each
+package has its own set of PO files. These PO files are best created by
+the `xgettext' program, and later updated or refreshed through the
+`msgmerge' program. Program `xgettext' extracts all marked messages
+from a set of C files and initializes a PO file with empty
+translations. Program `msgmerge' takes care of adjusting PO files
+between releases of the corresponding sources, commenting obsolete
+entries, initializing new ones, and updating all source line
+references. Files ending with `.pot' are kind of base translation
+files found in distributions, in PO file format, and `.pox' files are
+often temporary PO files.
+
+ MO files are meant to be read by programs, and are binary in nature.
+A few systems already offer tools for creating and handling MO files as
+part of the Native Language Support coming with the system, but the
+format of these MO files is often different from system to system, and
+non-portable. They do not necessary use `.mo' for file extensions, but
+since system libraries are also used for accessing these files, it
+works as long as the system is self-consistent about it. If GNU
+`gettext' is able to interface with the tools already provided with
+systems, it will consequently let these provided tools take care of
+generating the MO files. Or else, if such tools are not found or do
+not seem usable, GNU `gettext' will use its own ways and its own format
+for MO files. Files ending with `.gmo' are really MO files, when it is
+known that these files use the GNU format.
+
+
+File: gettext.info, Node: Overview, Prev: Files, Up: Introduction
+
+Overview of GNU `gettext'
+=========================
+
+ The following diagram summarizes the relation between the files
+handled by GNU `gettext' and the tools acting on these files. It is
+followed by a somewhat detailed explanations, which you should read
+while keeping an eye on the diagram. Having a clear understanding of
+these interrelations would surely help programmers, translators and
+maintainers.
+
+ Original C Sources ---> PO mode ---> Marked C Sources ---.
+ |
+ .---------<--- GNU gettext Library |
+ .--- make <---+ |
+ | `---------<--------------------+-----------'
+ | |
+ | .-----<--- PACKAGE.pot <--- xgettext <---' .---<--- PO Compendium
+ | | | ^
+ | | `---. |
+ | `---. +---> PO mode ---.
+ | +----> msgmerge ------> LANG.pox --->--------' |
+ | .---' |
+ | | |
+ | `-------------<---------------. |
+ | +--- LANG.po <--- New LANG.pox <----'
+ | .--- LANG.gmo <--- msgfmt <---'
+ | |
+ | `---> install ---> /.../LANG/PACKAGE.mo ---.
+ | +---> "Hello world!"
+ `-------> install ---> /.../bin/PROGRAM -------'
+
+ The indication `PO mode' appears in two places in this picture, and
+you may safely read it as merely meaning "hand editing", using any
+editor of your choice, really. However, for those of you being the
+lucky users of Emacs, PO mode has been specifically created for
+providing a cozy environment for editing or modifying PO files. While
+editing a PO file, PO mode allows for the easy browsing of auxiliary
+and compendium PO files, as well as for following references into the
+set of C program sources from which PO files have been derived. It has
+a few special features, among which are the interactive marking of
+program strings as translatable, and the validatation of PO files with
+easy repositioning to PO file lines showing errors.
+
+ As a programmer, the first step to bringing GNU `gettext' into your
+package is identifying, right in the C sources, those strings which are
+meant to be translatable, and those which are untranslatable. This
+tedious job can be done a little more comfortably using emacs PO mode,
+but you can use any means familiar to you for modifying your C sources.
+Beside this some other simple, standard changes are needed to properly
+initialize the translation library. *Note Sources::, for more
+information about all this.
+
+ For newly written software the strings of course can and should be
+marked while writing the it. The `gettext' approach makes this very
+easy. Simply put the following lines at the beginning of each file or
+in a central header file:
+
+ #define _(String) (String)
+ #define N_(String) (String)
+ #define textdomain(Domain)
+ #define bindtextdomain(Package, Directory)
+
+Doing this allows you to prepare the sources for internationalization.
+Later when you feel ready for the step to use the `gettext' library
+simply remove these definitions, include `libintl.h' and link against
+`libintl.a'. That is all you have to change.
+
+ Once the C sources have been modified, the `xgettext' program is
+used to find and extract all translatable strings, and create an
+initial PO file out of all these. This `PACKAGE.pot' file contains all
+original program strings. It has sets of pointers to exactly where in
+C sources each string is used. All translations are set to empty. The
+letter `t' in `.pot' marks this as a Template PO file, not yet oriented
+towards any particular language. *Note xgettext Invocation::, for more
+details about how one calls the `xgettext' program. If you are
+*really* lazy, you might be interested at working a lot more right
+away, and preparing the whole distribution setup (*note
+Maintainers::.). By doing so, you spare yourself typing the `xgettext'
+command, as `make' should now generate the proper things automatically
+for you!
+
+ The first time through, there is no `LANG.po' yet, so the `msgmerge'
+step may be skipped and replaced by a mere copy of `PACKAGE.pot' to
+`LANG.pox', where LANG represents the target language.
+
+ Then comes the initial translation of messages. Translation in
+itself is a whole matter, still exclusively meant for humans, and whose
+complexity far overwhelms the level of this manual. Nevertheless, a
+few hints are given in some other chapter of this manual (*note
+Translators::.). You will also find there indications about how to
+contact translating teams, or becoming part of them, for sharing your
+translating concerns with others who target the same native language.
+
+ While adding the translated messages into the `LANG.pox' PO file, if
+you do not have Emacs handy, you are on your own for ensuring that your
+efforts fully respect the PO file format, and quoting conventions
+(*note PO Files::.). This is surely not an impossible task, as this is
+the way many people have handled PO files already for Uniforum or
+Solaris. On the other hand, by using PO mode in Emacs, most details of
+PO file format are taken care of for you, but you have to acquire some
+familiarity with PO mode itself. Besides main PO mode commands (*note
+Main PO Commands::.), you should know how to move between entries
+(*note Entry Positioning::.), and how to handle untranslated entries
+(*note Untranslated Entries::.).
+
+ If some common translations have already been saved into a compendium
+PO file, translators may use PO mode for initializing untranslated
+entries from the compendium, and also save selected translations into
+the compendium, updating it (*note Compendium::.). Compendium files
+are meant to be exchanged between members of a given translation team.
+
+ Programs, or packages of programs, are dynamic in nature: users write
+bug reports and suggestion for improvements, maintainers react by
+modifying programs in various ways. The fact that a package has
+already been internationalized should not make maintainers shy of
+adding new strings, or modifying strings already translated. They just
+do their job the best they can. For the Translation Project to work
+smoothly, it is important that maintainers do not carry translation
+concerns on their already loaded shoulders, and that translators be
+kept as free as possible of programmatic concerns.
+
+ The only concern maintainers should have is carefully marking new
+strings as translatable, when they should be, and do not otherwise
+worry about them being translated, as this will come in proper time.
+Consequently, when programs and their strings are adjusted in various
+ways by maintainers, and for matters usually unrelated to translation,
+`xgettext' would construct `PACKAGE.pot' files which are evolving over
+time, so the translations carried by `LANG.po' are slowly fading out of
+date.
+
+ It is important for translators (and even maintainers) to understand
+that package translation is a continuous process in the lifetime of a
+package, and not something which is done once and for all at the start.
+After an initial burst of translation activity for a given package,
+interventions are needed once in a while, because here and there,
+translated entries become obsolete, and new untranslated entries
+appear, needing translation.
+
+ The `msgmerge' program has the purpose of refreshing an already
+existing `LANG.po' file, by comparing it with a newer `PACKAGE.pot'
+template file, extracted by `xgettext' out of recent C sources. The
+refreshing operation adjusts all references to C source locations for
+strings, since these strings move as programs are modified. Also,
+`msgmerge' comments out as obsolete, in `LANG.pox', those already
+translated entries which are no longer used in the program sources
+(*note Obsolete Entries::.). It finally discovers new strings and
+inserts them in the resulting PO file as untranslated entries (*note
+Untranslated Entries::.). *Note msgmerge Invocation::, for more
+information about what `msgmerge' really does.
+
+ Whatever route or means taken, the goal is to obtain an updated
+`LANG.pox' file offering translations for all strings. When this is
+properly achieved, this file `LANG.pox' may take the place of the
+previous official `LANG.po' file.
+
+ The temporal mobility, or fluidity of PO files, is an integral part
+of the translation game, and should be well understood, and accepted.
+People resisting it will have a hard time participating in the
+Translation Project, or will give a hard time to other participants! In
+particular, maintainers should relax and include all available official
+PO files in their distributions, even if these have not recently been
+updated, without banging or otherwise trying to exert pressure on the
+translator teams to get the job done. The pressure should rather come
+from the community of users speaking a particular language, and
+maintainers should consider themselves fairly relieved of any concern
+about the adequacy of translation files. On the other hand, translators
+should reasonably try updating the PO files they are responsible for,
+while the package is undergoing pretest, prior to an official
+distribution.
+
+ Once the PO file is complete and dependable, the `msgfmt' program is
+used for turning the PO file into a machine-oriented format, which may
+yield efficient retrieval of translations by the programs of the
+package, whenever needed at runtime (*note MO Files::.). *Note msgfmt
+Invocation::, for more information about all modalities of execution
+for the `msgfmt' program.
+
+ Finally, the modified and marked C sources are compiled and linked
+with the GNU `gettext' library, usually through the operation of
+`make', given a suitable `Makefile' exists for the project, and the
+resulting executable is installed somewhere users will find it. The MO
+files themselves should also be properly installed. Given the
+appropriate environment variables are set (*note End Users::.), the
+program should localize itself automatically, whenever it executes.
+
+ The remainder of this manual has the purpose of explaining in depth
+the various steps outlined above.
+
+
+File: gettext.info, Node: Basics, Next: Sources, Prev: Introduction, Up: Top
+
+PO Files and PO Mode Basics
+***************************
+
+ The GNU `gettext' toolset helps programmers and translators at
+producing, updating and using translation files, mainly those PO files
+which are textual, editable files. This chapter stresses the format of
+PO files, and contains a PO mode starter. PO mode description is
+spread throughout this manual instead of being concentrated in one
+place. Here we present only the basics of PO mode.
+
+* Menu:
+
+* Installation:: Completing GNU `gettext' Installation
+* PO Files:: The Format of PO Files
+* Main PO Commands:: Main Commands
+* Entry Positioning:: Entry Positioning
+* Normalizing:: Normalizing Strings in Entries
+
+
+File: gettext.info, Node: Installation, Next: PO Files, Prev: Basics, Up: Basics
+
+Completing GNU `gettext' Installation
+=====================================
+
+ Once you have received, unpacked, configured and compiled the GNU
+`gettext' distribution, the `make install' command puts in place the
+programs `xgettext', `msgfmt', `gettext', and `msgmerge', as well as
+their available message catalogs. To top off a comfortable
+installation, you might also want to make the PO mode available to your
+Emacs users.
+
+ During the installation of the PO mode, you might want modify your
+file `.emacs', once and for all, so it contains a few lines looking
+like:
+
+ (setq auto-mode-alist
+ (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode) auto-mode-alist))
+ (autoload 'po-mode "po-mode")
+
+ Later, whenever you edit some `.po', `.pot' or `.pox' file, or any
+file having the string `.po.' within its name, Emacs loads
+`po-mode.elc' (or `po-mode.el') as needed, and automatically activates
+PO mode commands for the associated buffer. The string *PO* appears in
+the mode line for any buffer for which PO mode is active. Many PO
+files may be active at once in a single Emacs session.
+
+ If you are using Emacs version 20 or better, and have already
+installed the appropriate international fonts on your system, you may
+also manage for the these fonts to be automatically loaded and used for
+displaying the translations on your Emacs screen, whenever necessary.
+For this to happen, you might want to add the lines:
+
+ (autoload 'po-find-file-coding-system "po-mode")
+ (modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
+ 'po-find-file-coding-system)
+
+to your `.emacs' file.
+
+
+File: gettext.info, Node: PO Files, Next: Main PO Commands, Prev: Installation, Up: Basics
+
+The Format of PO Files
+======================
+
+ A PO file is made up of many entries, each entry holding the relation
+between an original untranslated string and its corresponding
+translation. All entries in a given PO file usually pertain to a
+single project, and all translations are expressed in a single target
+language. One PO file "entry" has the following schematic structure:
+
+ WHITE-SPACE
+ # TRANSLATOR-COMMENTS
+ #. AUTOMATIC-COMMENTS
+ #: REFERENCE...
+ #, FLAG...
+ msgid UNTRANSLATED-STRING
+ msgstr TRANSLATED-STRING
+
+ The general structure of a PO file should be well understood by the
+translator. When using PO mode, very little has to be known about the
+format details, as PO mode takes care of them for her.
+
+ Entries begin with some optional white space. Usually, when
+generated through GNU `gettext' tools, there is exactly one blank line
+between entries. Then comments follow, on lines all starting with the
+character `#'. There are two kinds of comments: those which have some
+white space immediately following the `#', which comments are created
+and maintained exclusively by the translator, and those which have some
+non-white character just after the `#', which comments are created and
+maintained automatically by GNU `gettext' tools. All comments, of
+either kind, are optional.
+
+ After white space and comments, entries show two strings, giving
+first the untranslated string as it appears in the original program
+sources, and then, the translation of this string. The original string
+is introduced by the keyword `msgid', and the translation, by `msgstr'.
+The two strings, untranslated and translated, are quoted in various
+ways in the PO file, using `"' delimiters and `\' escapes, but the
+translator does not really have to pay attention to the precise quoting
+format, as PO mode fully intend to take care of quoting for her.
+
+ The `msgid' strings, as well as automatic comments, are produced and
+managed by other GNU `gettext' tools, and PO mode does not provide
+means for the translator to alter these. The most she can do is merely
+deleting them, and only by deleting the whole entry. On the other
+hand, the `msgstr' string, as well as translator comments, are really
+meant for the translator, and PO mode gives her the full control she
+needs.
+
+ The comment lines beginning with `#,' are special because they are
+not completely ignored by the programs as comments generally are. The
+comma separated list of FLAGs is used by the `msgfmt' program to give
+the user some better disgnostic messages. Currently there are two
+forms of flags defined:
+
+`fuzzy'
+ This flag can be generated by the `msgmerge' program or it can be
+ inserted by the translator herself. It shows that the `msgstr'
+ string might not be a correct translation (anymore). Only the
+ translator can judge if the translation requires further
+ modification, or is acceptable as is. Once satisfied with the
+ translation, she then removes this `fuzzy' attribute. The
+ `msgmerge' programs inserts this when it combined the `msgid' and
+ `msgstr' entries after fuzzy search only. *Note Fuzzy Entries::.
+
+`c-format'
+`no-c-format'
+ These flags should not be added by a human. Instead only the
+ `xgettext' program adds them. In an automatized PO file processing
+ system as proposed here the user changes would be thrown away
+ again as soon as the `xgettext' program generates a new template
+ file.
+
+ In case the `c-format' flag is given for a string the `msgfmt'
+ does some more tests to check to validity of the translation.
+ *Note msgfmt Invocation::.
+
+ It happens that some lines, usually whitespace or comments, follow
+the very last entry of a PO file. Such lines are not part of any entry,
+and PO mode is unable to take action on those lines. By using the PO
+mode function `M-x po-normalize', the translator may get rid of those
+spurious lines. *Note Normalizing::.
+
+ The remainder of this section may be safely skipped by those using
+PO mode, yet it may be interesting for everybody to have a better idea
+of the precise format of a PO file. On the other hand, those not
+having Emacs handy should carefully continue reading on.
+
+ Each of UNTRANSLATED-STRING and TRANSLATED-STRING respects the C
+syntax for a character string, including the surrounding quotes and
+imbedded backslashed escape sequences. When the time comes to write
+multi-line strings, one should not use escaped newlines. Instead, a
+closing quote should follow the last character on the line to be
+continued, and an opening quote should resume the string at the
+beginning of the following PO file line. For example:
+
+ msgid ""
+ "Here is an example of how one might continue a very long string\n"
+ "for the common case the string represents multi-line output.\n"
+
+In this example, the empty string is used on the first line, to allow
+better alignment of the `H' from the word `Here' over the `f' from the
+word `for'. In this example, the `msgid' keyword is followed by three
+strings, which are meant to be concatenated. Concatenating the empty
+string does not change the resulting overall string, but it is a way
+for us to comply with the necessity of `msgid' to be followed by a
+string on the same line, while keeping the multi-line presentation
+left-justified, as we find this to be a cleaner disposition. The empty
+string could have been omitted, but only if the string starting with
+`Here' was promoted on the first line, right after `msgid'.(1) It was
+not really necessary either to switch between the two last quoted
+strings immediately after the newline `\n', the switch could have
+occurred after *any* other character, we just did it this way because
+it is neater.
+
+ One should carefully distinguish between end of lines marked as `\n'
+*inside* quotes, which are part of the represented string, and end of
+lines in the PO file itself, outside string quotes, which have no
+incidence on the represented string.
+
+ Outside strings, white lines and comments may be used freely.
+Comments start at the beginning of a line with `#' and extend until the
+end of the PO file line. Comments written by translators should have
+the initial `#' immediately followed by some white space. If the `#'
+is not immediately followed by white space, this comment is most likely
+generated and managed by specialized GNU tools, and might disappear or
+be replaced unexpectedly when the PO file is given to `msgmerge'.
+
+ ---------- Footnotes ----------
+
+ (1) This limitation is not imposed by GNU `gettext', but comes from
+the `msgfmt' implementation on Solaris.
+
+
+File: gettext.info, Node: Main PO Commands, Next: Entry Positioning, Prev: PO Files, Up: Basics
+
+Main PO mode Commands
+=====================
+
+ After setting up Emacs with something similar to the lines in *Note
+Installation::, PO mode is activated for a window when Emacs finds a PO
+file in that window. This puts the window read-only and establishes a
+po-mode-map, which is a genuine Emacs mode, in a way that is not derived
+from text mode in any way. Functions found on `po-mode-hook', if any,
+will be executed.
+
+ When PO mode is active in a window, the letters `PO' appear in the
+mode line for that window. The mode line also displays how many
+entries of each kind are held in the PO file. For example, the string
+`132t+3f+10u+2o' would tell the translator that the PO mode contains
+132 translated entries (*note Translated Entries::., 3 fuzzy entries
+(*note Fuzzy Entries::.), 10 untranslated entries (*note Untranslated
+Entries::.) and 2 obsolete entries (*note Obsolete Entries::.).
+Zero-coefficients items are not shown. So, in this example, if the
+fuzzy entries were unfuzzied, the untranslated entries were translated
+and the obsolete entries were deleted, the mode line would merely
+display `145t' for the counters.
+
+ The main PO commands are those which do not fit into the other
+categories of subsequent sections. These allow for quitting PO mode or
+for managing windows in special ways.
+
+`U'
+ Undo last modification to the PO file.
+
+`Q'
+ Quit processing and save the PO file.
+
+`q'
+ Quit processing, possibly after confirmation.
+
+`O'
+ Temporary leave the PO file window.
+
+`?'
+`h'
+ Show help about PO mode.
+
+`='
+ Give some PO file statistics.
+
+`V'
+ Batch validate the format of the whole PO file.
+
+ The command `U' (`po-undo') interfaces to the Emacs *undo* facility.
+*Note Undoing Changes: (emacs)Undo. Each time `U' is typed,
+modifications which the translator did to the PO file are undone a
+little more. For the purpose of undoing, each PO mode command is
+atomic. This is especially true for the `<RET>' command: the whole
+edition made by using a single use of this command is undone at once,
+even if the edition itself implied several actions. However, while in
+the editing window, one can undo the edition work quite parsimoniously.
+
+ The commands `Q' (`po-quit') and `q' (`po-confirm-and-quit') are
+used when the translator is done with the PO file. The former is a bit
+less verbose than the latter. If the file has been modified, it is
+saved to disk first. In both cases, and prior to all this, the
+commands check if some untranslated message remains in the PO file and,
+if yes, the translator is asked if she really wants to leave off
+working with this PO file. This is the preferred way of getting rid of
+an Emacs PO file buffer. Merely killing it through the usual command
+`C-x k' (`kill-buffer') is not the tidiest way to proceed.
+
+ The command `O' (`po-other-window') is another, softer way, to leave
+PO mode, temporarily. It just moves the cursor to some other Emacs
+window, and pops one if necessary. For example, if the translator just
+got PO mode to show some source context in some other, she might
+discover some apparent bug in the program source that needs correction.
+This command allows the translator to change sex, become a programmer,
+and have the cursor right into the window containing the program she
+(or rather *he*) wants to modify. By later getting the cursor back in
+the PO file window, or by asking Emacs to edit this file once again, PO
+mode is then recovered.
+
+ The command `h' (`po-help') displays a summary of all available PO
+mode commands. The translator should then type any character to resume
+normal PO mode operations. The command `?' has the same effect as `h'.
+
+ The command `=' (`po-statistics') computes the total number of
+entries in the PO file, the ordinal of the current entry (counted from
+1), the number of untranslated entries, the number of obsolete entries,
+and displays all these numbers.
+
+ The command `V' (`po-validate') launches `msgfmt' in verbose mode
+over the current PO file. This command first offers to save the
+current PO file on disk. The `msgfmt' tool, from GNU `gettext', has
+the purpose of creating a MO file out of a PO file, and PO mode uses
+the features of this program for checking the overall format of a PO
+file, as well as all individual entries.
+
+ The program `msgfmt' runs asynchronously with Emacs, so the
+translator regains control immediately while her PO file is being
+studied. Error output is collected in the Emacs `*compilation*' buffer,
+displayed in another window. The regular Emacs command `C-x`'
+(`next-error'), as well as other usual compile commands, allow the
+translator to reposition quickly to the offending parts of the PO file.
+Once the cursor is on the line in error, the translator may decide on
+any PO mode action which would help correcting the error.
+
diff --git a/doc/gettext.info-2 b/doc/gettext.info-2
new file mode 100644
index 0000000..20de9bc
--- /dev/null
+++ b/doc/gettext.info-2
@@ -0,0 +1,1127 @@
+This is Info file gettext.info, produced by Makeinfo version 1.68 from
+the input file gettext.texi.
+
+INFO-DIR-SECTION GNU Gettext Utilities
+START-INFO-DIR-ENTRY
+* Gettext: (gettext). GNU gettext utilities.
+* gettextize: (gettext)gettextize Invocation. Prepare a package for gettext.
+* msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files.
+* msgmerge: (gettext)msgmerge Invocation. Update two PO files into one.
+* xgettext: (gettext)xgettext Invocation. Extract strings into a PO file.
+END-INFO-DIR-ENTRY
+
+ This file provides documentation for GNU `gettext' utilities. It
+also serves as a reference for the free Translation Project.
+
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be stated in a
+translation approved by the Foundation.
+
+
+File: gettext.info, Node: Entry Positioning, Next: Normalizing, Prev: Main PO Commands, Up: Basics
+
+Entry Positioning
+=================
+
+ The cursor in a PO file window is almost always part of an entry.
+The only exceptions are the special case when the cursor is after the
+last entry in the file, or when the PO file is empty. The entry where
+the cursor is found to be is said to be the current entry. Many PO
+mode commands operate on the current entry, so moving the cursor does
+more than allowing the translator to browse the PO file, this also
+selects on which entry commands operate.
+
+ Some PO mode commands alter the position of the cursor in a
+specialized way. A few of those special purpose positioning are
+described here, the others are described in following sections.
+
+`.'
+ Redisplay the current entry.
+
+`n'
+`n'
+ Select the entry after the current one.
+
+`p'
+`p'
+ Select the entry before the current one.
+
+`<'
+ Select the first entry in the PO file.
+
+`>'
+ Select the last entry in the PO file.
+
+`m'
+ Record the location of the current entry for later use.
+
+`l'
+ Return to a previously saved entry location.
+
+`x'
+ Exchange the current entry location with the previously saved one.
+
+ Any Emacs command able to reposition the cursor may be used to
+select the current entry in PO mode, including commands which move by
+characters, lines, paragraphs, screens or pages, and search commands.
+However, there is a kind of standard way to display the current entry
+in PO mode, which usual Emacs commands moving the cursor do not
+especially try to enforce. The command `.' (`po-current-entry') has
+the sole purpose of redisplaying the current entry properly, after the
+current entry has been changed by means external to PO mode, or the
+Emacs screen otherwise altered.
+
+ It is yet to be decided if PO mode helps the translator, or otherwise
+irritates her, by forcing a rigid window disposition while she is doing
+her work. We originally had quite precise ideas about how windows
+should behave, but on the other hand, anyone used to Emacs is often
+happy to keep full control. Maybe a fixed window disposition might be
+offered as a PO mode option that the translator might activate or
+deactivate at will, so it could be offered on an experimental basis.
+If nobody feels a real need for using it, or a compulsion for writing
+it, we should drop this whole idea. The incentive for doing it should
+come from translators rather than programmers, as opinions from an
+experienced translator are surely more worth to me than opinions from
+programmers *thinking* about how *others* should do translation.
+
+ The commands `n' (`po-next-entry') and `p' (`po-previous-entry')
+move the cursor the entry following, or preceding, the current one. If
+`n' is given while the cursor is on the last entry of the PO file, or
+if `p' is given while the cursor is on the first entry, no move is done.
+
+ The commands `<' (`po-first-entry') and `>' (`po-last-entry') move
+the cursor to the first entry, or last entry, of the PO file. When the
+cursor is located past the last entry in a PO file, most PO mode
+commands will return an error saying `After last entry'. Moreover, the
+commands `<' and `>' have the special property of being able to work
+even when the cursor is not into some PO file entry, and one may use
+them for nicely correcting this situation. But even these commands
+will fail on a truly empty PO file. There are development plans for
+the PO mode for it to interactively fill an empty PO file from sources.
+*Note Marking::.
+
+ The translator may decide, before working at the translation of a
+particular entry, that she needs to browse the remainder of the PO
+file, maybe for finding the terminology or phraseology used in related
+entries. She can of course use the standard Emacs idioms for saving
+the current cursor location in some register, and use that register for
+getting back, or else, use the location ring.
+
+ PO mode offers another approach, by which cursor locations may be
+saved onto a special stack. The command `m' (`po-push-location')
+merely adds the location of current entry to the stack, pushing the
+already saved locations under the new one. The command `r'
+(`po-pop-location') consumes the top stack element and reposition the
+cursor to the entry associated with that top element. This position is
+then lost, for the next `r' will move the cursor to the previously
+saved location, and so on until no locations remain on the stack.
+
+ If the translator wants the position to be kept on the location
+stack, maybe for taking a look at the entry associated with the top
+element, then go elsewhere with the intent of getting back later, she
+ought to use `m' immediately after `r'.
+
+ The command `x' (`po-exchange-location') simultaneously reposition
+the cursor to the entry associated with the top element of the stack of
+saved locations, and replace that top element with the location of the
+current entry before the move. Consequently, repeating the `x' command
+toggles alternatively between two entries. For achieving this, the
+translator will position the cursor on the first entry, use `m', then
+position to the second entry, and merely use `x' for making the switch.
+
+
+File: gettext.info, Node: Normalizing, Prev: Entry Positioning, Up: Basics
+
+Normalizing Strings in Entries
+==============================
+
+ There are many different ways for encoding a particular string into a
+PO file entry, because there are so many different ways to split and
+quote multi-line strings, and even, to represent special characters by
+backslahsed escaped sequences. Some features of PO mode rely on the
+ability for PO mode to scan an already existing PO file for a
+particular string encoded into the `msgid' field of some entry. Even
+if PO mode has internally all the built-in machinery for implementing
+this recognition easily, doing it fast is technically difficult. To
+facilitate a solution to this efficiency problem, we decided on a
+canonical representation for strings.
+
+ A conventional representation of strings in a PO file is currently
+under discussion, and PO mode experiments with a canonical
+representation. Having both `xgettext' and PO mode converging towards
+a uniform way of representing equivalent strings would be useful, as
+the internal normalization needed by PO mode could be automatically
+satisfied when using `xgettext' from GNU `gettext'. An explicit PO
+mode normalization should then be only necessary for PO files imported
+from elsewhere, or for when the convention itself evolves.
+
+ So, for achieving normalization of at least the strings of a given
+PO file needing a canonical representation, the following PO mode
+command is available:
+
+`M-x po-normalize'
+ Tidy the whole PO file by making entries more uniform.
+
+ The special command `M-x po-normalize', which has no associate keys,
+revises all entries, ensuring that strings of both original and
+translated entries use uniform internal quoting in the PO file. It
+also removes any crumb after the last entry. This command may be
+useful for PO files freshly imported from elsewhere, or if we ever
+improve on the canonical quoting format we use. This canonical format
+is not only meant for getting cleaner PO files, but also for greatly
+speeding up `msgid' string lookup for some other PO mode commands.
+
+ `M-x po-normalize' presently makes three passes over the entries.
+The first implements heuristics for converting PO files for GNU
+`gettext' 0.6 and earlier, in which `msgid' and `msgstr' fields were
+using K&R style C string syntax for multi-line strings. These
+heuristics may fail for comments not related to obsolete entries and
+ending with a backslash; they also depend on subsequent passes for
+finalizing the proper commenting of continued lines for obsolete
+entries. This first pass might disappear once all oldish PO files
+would have been adjusted. The second and third pass normalize all
+`msgid' and `msgstr' strings respectively. They also clean out those
+trailing backslashes used by XView's `msgfmt' for continued lines.
+
+ Having such an explicit normalizing command allows for importing PO
+files from other sources, but also eases the evolution of the current
+convention, evolution driven mostly by aesthetic concerns, as of now.
+It is easy to make suggested adjustments at a later time, as the
+normalizing command and eventually, other GNU `gettext' tools should
+greatly automate conformance. A description of the canonical string
+format is given below, for the particular benefit of those not having
+Emacs handy, and who would nevertheless want to handcraft their PO
+files in nice ways.
+
+ Right now, in PO mode, strings are single line or multi-line. A
+string goes multi-line if and only if it has *embedded* newlines, that
+is, if it matches `[^\n]\n+[^\n]'. So, we would have:
+
+ msgstr "\n\nHello, world!\n\n\n"
+
+ but, replacing the space by a newline, this becomes:
+
+ msgstr ""
+ "\n"
+ "\n"
+ "Hello,\n"
+ "world!\n"
+ "\n"
+ "\n"
+
+ We are deliberately using a caricatural example, here, to make the
+point clearer. Usually, multi-lines are not that bad looking. It is
+probable that we will implement the following suggestion. We might
+lump together all initial newlines into the empty string, and also all
+newlines introducing empty lines (that is, for N > 1, the N-1'th last
+newlines would go together on a separate string), so making the
+previous example appear:
+
+ msgstr "\n\n"
+ "Hello,\n"
+ "world!\n"
+ "\n\n"
+
+ There are a few yet undecided little points about string
+normalization, to be documented in this manual, once these questions
+settle.
+
+
+File: gettext.info, Node: Sources, Next: Initial, Prev: Basics, Up: Top
+
+Preparing Program Sources
+*************************
+
+ For the programmer, changes to the C source code fall into three
+categories. First, you have to make the localization functions known
+to all modules needing message translation. Second, you should
+properly trigger the operation of GNU `gettext' when the program
+initializes, usually from the `main' function. Last, you should
+identify and especially mark all constant strings in your program
+needing translation.
+
+ Presuming that your set of programs, or package, has been adjusted
+so all needed GNU `gettext' files are available, and your `Makefile'
+files are adjusted (*note Maintainers::.), each C module having
+translated C strings should contain the line:
+
+ #include <libintl.h>
+
+ The remaining changes to your C sources are discussed in the further
+sections of this chapter.
+
+* Menu:
+
+* Triggering:: Triggering `gettext' Operations
+* Mark Keywords:: How Marks Appears in Sources
+* Marking:: Marking Translatable Strings
+* c-format:: Telling something about the following string
+* Special cases:: Special Cases of Translatable Strings
+
+
+File: gettext.info, Node: Triggering, Next: Mark Keywords, Prev: Sources, Up: Sources
+
+Triggering `gettext' Operations
+===============================
+
+ The initialization of locale data should be done with more or less
+the same code in every program, as demonstrated below:
+
+ int
+ main (argc, argv)
+ int argc;
+ char argv;
+ {
+ ...
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+ ...
+ }
+
+ PACKAGE and LOCALEDIR should be provided either by `config.h' or by
+the Makefile. For now consult the `gettext' sources for more
+information.
+
+ The use of `LC_ALL' might not be appropriate for you. `LC_ALL'
+includes all locale categories and especially `LC_CTYPE'. This later
+category is responsible for determining character classes with the
+`isalnum' etc. functions from `ctype.h' which could especially for
+programs, which process some kind of input language, be wrong. For
+example this would mean that a source code using the c, (c-cedilla
+character) is runnable in France but not in the U.S.
+
+ Some systems also have problems with parsing number using the
+`scanf' functions if an other but the `LC_ALL' locale is used. The
+standards say that additional formats but the one known in the `"C"'
+locale might be recognized. But some systems seem to reject numbers in
+the `"C"' locale format. In some situation, it might also be a problem
+with the notation itself which makes it impossible to recognize whether
+the number is in the `"C"' locale or the local format. This can happen
+if thousands separator characters are used. Some locales define this
+character accordfing to the national conventions to `'.'' which is the
+same character used in the `"C"' locale to denote the decimal point.
+
+ So it is sometimes necessary to replace the `LC_ALL' line in the
+code above by a sequence of `setlocale' lines
+
+ {
+ ...
+ setlocale (LC_TIME, "");
+ setlocale (LC_MESSAGES, "");
+ ...
+ }
+
+or to switch for and back to the character class in question. On all
+POSIX conformant systems the locale categories `LC_CTYPE',
+`LC_COLLATE', `LC_MONETARY', `LC_NUMERIC', and `LC_TIME' are available.
+On some modern systems there is also a locale `LC_MESSAGES' which is
+called on some old, XPG2 compliant systems `LC_RESPONSES'.
+
+
+File: gettext.info, Node: Mark Keywords, Next: Marking, Prev: Triggering, Up: Sources
+
+How Marks Appears in Sources
+============================
+
+ All strings requiring translation should be marked in the C sources.
+Marking is done in such a way that each translatable string appears to
+be the sole argument of some function or preprocessor macro. There are
+only a few such possible functions or macros meant for translation, and
+their names are said to be marking keywords. The marking is attached
+to strings themselves, rather than to what we do with them. This
+approach has more uses. A blatant example is an error message produced
+by formatting. The format string needs translation, as well as some
+strings inserted through some `%s' specification in the format, while
+the result from `sprintf' may have so many different instances that it
+is impractical to list them all in some `error_string_out()' routine,
+say.
+
+ This marking operation has two goals. The first goal of marking is
+for triggering the retrieval of the translation, at run time. The
+keyword are possibly resolved into a routine able to dynamically return
+the proper translation, as far as possible or wanted, for the argument
+string. Most localizable strings are found in executable positions,
+that is, attached to variables or given as parameters to functions.
+But this is not universal usage, and some translatable strings appear
+in structured initializations. *Note Special cases::.
+
+ The second goal of the marking operation is to help `xgettext' at
+properly extracting all translatable strings when it scans a set of
+program sources and produces PO file templates.
+
+ The canonical keyword for marking translatable strings is `gettext',
+it gave its name to the whole GNU `gettext' package. For packages
+making only light use of the `gettext' keyword, macro or function, it
+is easily used *as is*. However, for packages using the `gettext'
+interface more heavily, it is usually more convenient to give the main
+keyword a shorter, less obtrusive name. Indeed, the keyword might
+appear on a lot of strings all over the package, and programmers
+usually do not want nor need their program sources to remind them
+forcefully, all the time, that they are internationalized. Further, a
+long keyword has the disadvantage of using more horizontal space,
+forcing more indentation work on sources for those trying to keep them
+within 79 or 80 columns.
+
+ Many packages use `_' (a simple underline) as a keyword, and write
+`_("Translatable string")' instead of `gettext ("Translatable
+string")'. Further, the coding rule, from GNU standards, wanting that
+there is a space between the keyword and the opening parenthesis is
+relaxed, in practice, for this particular usage. So, the textual
+overhead per translatable string is reduced to only three characters:
+the underline and the two parentheses. However, even if GNU `gettext'
+uses this convention internally, it does not offer it officially. The
+real, genuine keyword is truly `gettext' indeed. It is fairly easy for
+those wanting to use `_' instead of `gettext' to declare:
+
+ #include <libintl.h>
+ #define _(String) gettext (String)
+
+instead of merely using `#include <libintl.h>'.
+
+ Later on, the maintenance is relatively easy. If, as a programmer,
+you add or modify a string, you will have to ask yourself if the new or
+altered string requires translation, and include it within `_()' if you
+think it should be translated. `"%s: %d"' is an example of string
+*not* requiring translation!
+
+
+File: gettext.info, Node: Marking, Next: c-format, Prev: Mark Keywords, Up: Sources
+
+Marking Translatable Strings
+============================
+
+ In PO mode, one set of features is meant more for the programmer than
+for the translator, and allows him to interactively mark which strings,
+in a set of program sources, are translatable, and which are not. Even
+if it is a fairly easy job for a programmer to find and mark such
+strings by other means, using any editor of his choice, PO mode makes
+this work more comfortable. Further, this gives translators who feel a
+little like programmers, or programmers who feel a little like
+translators, a tool letting them work at marking translatable strings
+in the program sources, while simultaneously producing a set of
+translation in some language, for the package being internationalized.
+
+ The set of program sources, targetted by the PO mode commands
+describe here, should have an Emacs tags table constructed for your
+project, prior to using these PO file commands. This is easy to do.
+In any shell window, change the directory to the root of your project,
+then execute a command resembling:
+
+ etags src/*.[hc] lib/*.[hc]
+
+presuming here you want to process all `.h' and `.c' files from the
+`src/' and `lib/' directories. This command will explore all said
+files and create a `TAGS' file in your root directory, somewhat
+summarizing the contents using a special file format Emacs can
+understand.
+
+ For packages following the GNU coding standards, there is a make
+goal `tags' or `TAGS' which construct the tag files in all directories
+and for all files containing source code.
+
+ Once your `TAGS' file is ready, the following commands assist the
+programmer at marking translatable strings in his set of sources. But
+these commands are necessarily driven from within a PO file window, and
+it is likely that you do not even have such a PO file yet. This is not
+a problem at all, as you may safely open a new, empty PO file, mainly
+for using these commands. This empty PO file will slowly fill in while
+you mark strings as translatable in your program sources.
+
+`,'
+ Search through program sources for a string which looks like a
+ candidate for translation.
+
+`M-,'
+ Mark the last string found with `_()'.
+
+`M-.'
+ Mark the last string found with a keyword taken from a set of
+ possible keywords. This command with a prefix allows some
+ management of these keywords.
+
+ The `,' (`po-tags-search') command search for the next occurrence of
+a string which looks like a possible candidate for translation, and
+displays the program source in another Emacs window, positioned in such
+a way that the string is near the top of this other window. If the
+string is too big to fit whole in this window, it is positioned so only
+its end is shown. In any case, the cursor is left in the PO file
+window. If the shown string would be better presented differently in
+different native languages, you may mark it using `M-,' or `M-.'.
+Otherwise, you might rather ignore it and skip to the next string by
+merely repeating the `,' command.
+
+ A string is a good candidate for translation if it contains a
+sequence of three or more letters. A string containing at most two
+letters in a row will be considered as a candidate if it has more
+letters than non-letters. The command disregards strings containing no
+letters, or isolated letters only. It also disregards strings within
+comments, or strings already marked with some keyword PO mode knows
+(see below).
+
+ If you have never told Emacs about some `TAGS' file to use, the
+command will request that you specify one from the minibuffer, the
+first time you use the command. You may later change your `TAGS' file
+by using the regular Emacs command `M-x visit-tags-table', which will
+ask you to name the precise `TAGS' file you want to use. *Note Tag
+Tables: (emacs)Tags.
+
+ Each time you use the `,' command, the search resumes from where it
+was left by the previous search, and goes through all program sources,
+obeying the `TAGS' file, until all sources have been processed.
+However, by giving a prefix argument to the command (`C-u ,'), you may
+request that the search be restarted all over again from the first
+program source; but in this case, strings that you recently marked as
+translatable will be automatically skipped.
+
+ Using this `,' command does not prevent using of other regular Emacs
+tags commands. For example, regular `tags-search' or
+`tags-query-replace' commands may be used without disrupting the
+independent `,' search sequence. However, as implemented, the
+*initial* `,' command (or the `,' command is used with a prefix) might
+also reinitialize the regular Emacs tags searching to the first tags
+file, this reinitialization might be considered spurious.
+
+ The `M-,' (`po-mark-translatable') command will mark the recently
+found string with the `_' keyword. The `M-.'
+(`po-select-mark-and-mark') command will request that you type one
+keyword from the minibuffer and use that keyword for marking the
+string. Both commands will automatically create a new PO file
+untranslated entry for the string being marked, and make it the current
+entry (making it easy for you to immediately proceed to its
+translation, if you feel like doing it right away). It is possible
+that the modifications made to the program source by `M-,' or `M-.'
+render some source line longer than 80 columns, forcing you to break
+and re-indent this line differently. You may use the `O' command from
+PO mode, or any other window changing command from Emacs, to break out
+into the program source window, and do any needed adjustments. You
+will have to use some regular Emacs command to return the cursor to the
+PO file window, if you want command `,' for the next string, say.
+
+ The `M-.' command has a few built-in speedups, so you do not have to
+explicitly type all keywords all the time. The first such speedup is
+that you are presented with a *preferred* keyword, which you may accept
+by merely typing `<RET>' at the prompt. The second speedup is that you
+may type any non-ambiguous prefix of the keyword you really mean, and
+the command will complete it automatically for you. This also means
+that PO mode has to *know* all your possible keywords, and that it will
+not accept mistyped keywords.
+
+ If you reply `?' to the keyword request, the command gives a list of
+all known keywords, from which you may choose. When the command is
+prefixed by an argument (`C-u M-.'), it inhibits updating any program
+source or PO file buffer, and does some simple keyword management
+instead. In this case, the command asks for a keyword, written in
+full, which becomes a new allowed keyword for later `M-.' commands.
+Moreover, this new keyword automatically becomes the *preferred*
+keyword for later commands. By typing an already known keyword in
+response to `C-u M-.', one merely changes the *preferred* keyword and
+does nothing more.
+
+ All keywords known for `M-.' are recognized by the `,' command when
+scanning for strings, and strings already marked by any of those known
+keywords are automatically skipped. If many PO files are opened
+simultaneously, each one has its own independent set of known keywords.
+There is no provision in PO mode, currently, for deleting a known
+keyword, you have to quit the file (maybe using `q') and reopen it
+afresh. When a PO file is newly brought up in an Emacs window, only
+`gettext' and `_' are known as keywords, and `gettext' is preferred for
+the `M-.' command. In fact, this is not useful to prefer `_', as this
+one is already built in the `M-,' command.
+
+
+File: gettext.info, Node: c-format, Next: Special cases, Prev: Marking, Up: Sources
+
+Special Comments preceding Keywords
+===================================
+
+ In C programs strings are often used within calls of functions from
+the `printf' family. The special thing about these format strings is
+that they can contain format specifiers introduced with `%'. Assume we
+have the code
+
+ printf (gettext ("String `%s' has %d characters\n"), s, strlen (s));
+
+A possible German translation for the above string might be:
+
+ "%d Zeichen lang ist die Zeichenkette `%s'"
+
+ A C programmer, even if he cannot speak German, will recognize that
+there is something wrong here. The order of the two format specifiers
+is changed but of course the arguments in the `printf' don't have.
+This will most probably lead to problems because now the length of the
+string is regarded as the address.
+
+ To prevent errors at runtime caused by translations the `msgfmt'
+tool can check statically whether the arguments in the original and the
+translation string match in type and number. If this is not the case a
+warning will be given and the error cannot causes problems at runtime.
+
+If the word order in the above German translation would be correct one
+would have to write
+
+ "%2$d Zeichen lang ist die Zeichenkette `%1$s'"
+
+The routines in `msgfmt' know about this special notation.
+
+ Because not all strings in a program must be format strings it is not
+useful for `msgfmt' to test all the strings in the `.po' file. This
+might cause problems because the string might contain what looks like a
+format specifier, but the string is not used in `printf'.
+
+ Therefore the `xgettext' adds a special tag to those messages it
+thinks might be a format string. There is no absolute rule for this,
+only a heuristic. In the `.po' file the entry is marked using the
+`c-format' flag in the `#,' comment line (*note PO Files::.).
+
+ The careful reader now might say that this again can cause problems.
+The heuristic might guess it wrong. This is true and therefore
+`xgettext' knows about special kind of comment which lets the
+programmer take over the decision. If in the same line or the
+immediately preceding line of the `gettext' keyword the `xgettext'
+program find a comment containing the words `xgettext:c-format' it will
+mark the string in any case with the `c-format' flag. This kind of
+comment should be used when `xgettext' does not recognize the string as
+a format string but is really is one and it should be tested. Please
+note that when the comment is in the same line of the `gettext'
+keyword, it must be before the string to be translated.
+
+ This situation happens quite often. The `printf' function is often
+called with strings which do not contain a format specifier. Of course
+one would normally use `fputs' but it does happen. In this case
+`xgettext' does not recognize this as a format string but what happens
+if the translation introduces a valid format specifier? The `printf'
+function will try to access one of the parameter but none exists
+because the original code does not refer to any parameter.
+
+ `xgettext' of course could make a wrong decision the other way
+round. A string marked as a format string is not really a format
+string. In this case the `msgfmt' might give too many warnings and
+would prevent translating the `.po' file. The method to prevent this
+wrong decision is similar to the one used above, only the comment to
+use must contain the string `xgettext:no-c-format'.
+
+ If a string is marked with `c-format' and this is not correct the
+user can find out who is responsible for the decision. See *Note
+xgettext Invocation:: to see how the `--debug' option can be used for
+solving this problem.
+
+
+File: gettext.info, Node: Special cases, Prev: c-format, Up: Sources
+
+Special Cases of Translatable Strings
+=====================================
+
+ The attentive reader might now point out that it is not always
+possible to mark translatable string with `gettext' or something like
+this. Consider the following case:
+
+ {
+ static const char *messages[] = {
+ "some very meaningful message",
+ "and another one"
+ };
+ const char *string;
+ ...
+ string
+ = index > 1 ? "a default message" : messages[index];
+
+ fputs (string);
+ ...
+ }
+
+ While it is no problem to mark the string `"a default message"' it
+is not possible to mark the string initializers for `messages'. What
+is to be done? We have to fulfill two tasks. First we have to mark the
+strings so that the `xgettext' program (*note xgettext Invocation::.)
+can find them, and second we have to translate the string at runtime
+before printing them.
+
+ The first task can be fulfilled by creating a new keyword, which
+names a no-op. For the second we have to mark all access points to a
+string from the array. So one solution can look like this:
+
+ #define gettext_noop(String) (String)
+
+ {
+ static const char *messages[] = {
+ gettext_noop ("some very meaningful message"),
+ gettext_noop ("and another one")
+ };
+ const char *string;
+ ...
+ string
+ = index > 1 ? gettext ("a default message") : gettext (messages[index]);
+
+ fputs (string);
+ ...
+ }
+
+ Please convince yourself that the string which is written by `fputs'
+is translated in any case. How to get `xgettext' know the additional
+keyword `gettext_noop' is explained in *Note xgettext Invocation::.
+
+ The above is of course not the only solution. You could also come
+along with the following one:
+
+ #define gettext_noop(String) (String)
+
+ {
+ static const char *messages[] = {
+ gettext_noop ("some very meaningful message",
+ gettext_noop ("and another one")
+ };
+ const char *string;
+ ...
+ string
+ = index > 1 ? gettext_noop ("a default message") : messages[index];
+
+ fputs (gettext (string));
+ ...
+ }
+
+ But this has some drawbacks. First the programmer has to take care
+that he uses `gettext_noop' for the string `"a default message"'. A
+use of `gettext' could have in rare cases unpredictable results. The
+second reason is found in the internals of the GNU `gettext' Library
+which will make this solution less efficient.
+
+ One advantage is that you need not make control flow analysis to make
+sure the output is really translated in any case. But this analysis is
+generally not very difficult. If it should be in any situation you can
+use this second method in this situation.
+
+
+File: gettext.info, Node: Initial, Next: Updating, Prev: Sources, Up: Top
+
+Making the Initial PO File
+**************************
+
+* Menu:
+
+* xgettext Invocation:: Invoking the `xgettext' Program
+* C Sources Context:: C Sources Context
+* Compendium:: Using Translation Compendiums
+
+
+File: gettext.info, Node: xgettext Invocation, Next: C Sources Context, Prev: Initial, Up: Initial
+
+Invoking the `xgettext' Program
+===============================
+
+ xgettext [OPTION] INPUTFILE ...
+
+`-a'
+`--extract-all'
+ Extract all strings.
+
+`-c [TAG]'
+`--add-comments[=TAG]'
+ Place comment block with TAG (or those preceding keyword lines) in
+ output file.
+
+`-C'
+`--c++'
+ Recognize C++ style comments.
+
+`--debug'
+ Use the flags `c-format' and `possible-c-format' to show who was
+ responsible for marking a message as a format string. The later
+ form is used if the `xgettext' program decided, the format form is
+ used if the programmer prescribed it.
+
+ By default only the `c-format' form is used. The translator should
+ not have to care about these details.
+
+`-d NAME'
+`--default-domain=NAME'
+ Use `NAME.po' for output (instead of `messages.po').
+
+ The special domain name `-' or `/dev/stdout' means to write the
+ output to `stdout'.
+
+`-D DIRECTORY'
+`--directory=DIRECTORY'
+ Change to DIRECTORY before beginning to search and scan source
+ files. The resulting `.po' file will be written relative to the
+ original directory, though.
+
+`-f FILE'
+`--files-from=FILE'
+ Read the names of the input files from FILE instead of getting
+ them from the command line.
+
+`--force'
+ Always write output file even if no message is defined.
+
+`-h'
+`--help'
+ Display this help and exit.
+
+`-I LIST'
+`--input-path=LIST'
+ List of directories searched for input files.
+
+`-j'
+`--join-existing'
+ Join messages with existing file.
+
+`-k WORD'
+`--keyword[=WORD]'
+ Additonal keyword to be looked for (without WORD means not to use
+ default keywords).
+
+ The default keywords, which are always looked for if not explicitly
+ disabled, are `gettext', `dgettext', `dcgettext' and
+ `gettext_noop'.
+
+`-m [STRING]'
+`--msgstr-prefix[=STRING]'
+ Use STRING or "" as prefix for msgstr entries.
+
+`-M [STRING]'
+`--msgstr-suffix[=STRING]'
+ Use STRING or "" as suffix for msgstr entries.
+
+`--no-location'
+ Do not write `#: FILENAME:LINE' lines.
+
+`-n'
+`--add-location'
+ Generate `#: FILENAME:LINE' lines (default).
+
+`--omit-header'
+ Don't write header with `msgid ""' entry.
+
+ This is useful for testing purposes because it eliminates a source
+ of variance for generated `.gmo' files. We can ship some of these
+ files in the GNU `gettext' package, and the result of regenerating
+ them through `msgfmt' should yield the same values.
+
+`-p DIR'
+`--output-dir=DIR'
+ Output files will be placed in directory DIR.
+
+`-s'
+`--sort-output'
+ Generate sorted output and remove duplicates.
+
+`--strict'
+ Write out strict Uniforum conforming PO file.
+
+`-v'
+`--version'
+ Output version information and exit.
+
+`-x FILE'
+`--exclude-file=FILE'
+ Entries from FILE are not extracted.
+
+ Search path for supplementary PO files is:
+`/usr/local/share/nls/src/'.
+
+ If INPUTFILE is `-', standard input is read.
+
+ This implementation of `xgettext' is able to process a few awkward
+cases, like strings in preprocessor macros, ANSI concatenation of
+adjacent strings, and escaped end of lines for continued strings.
+
+
+File: gettext.info, Node: C Sources Context, Next: Compendium, Prev: xgettext Invocation, Up: Initial
+
+C Sources Context
+=================
+
+ PO mode is particularily powerful when used with PO files created
+through GNU `gettext' utilities, as those utilities insert special
+comments in the PO files they generate. Some of these special comments
+relate the PO file entry to exactly where the untranslated string
+appears in the program sources.
+
+ When the translator gets to an untranslated entry, she is fairly
+often faced with an original string which is not as informative as it
+normally should be, being succinct, cryptic, or otherwise ambiguous.
+Before chosing how to translate the string, she needs to understand
+better what the string really means and how tight the translation has
+to be. Most of times, when problems arise, the only way left to make
+her judgment is looking at the true program sources from where this
+string originated, searching for surrounding comments the programmer
+might have put in there, and looking around for helping clues of *any*
+kind.
+
+ Surely, when looking at program sources, the translator will receive
+more help if she is a fluent programmer. However, even if she is not
+versed in programming and feels a little lost in C code, the translator
+should not be shy at taking a look, once in a while. It is most
+probable that she will still be able to find some of the hints she
+needs. She will learn quickly to not feel uncomfortable in program
+code, paying more attention to programmer's comments, variable and
+function names (if he dared chosing them well), and overall
+organization, than to programmation itself.
+
+ The following commands are meant to help the translator at getting
+program source context for a PO file entry.
+
+`s'
+ Resume the display of a program source context, or cycle through
+ them.
+
+`M-s'
+ Display of a program source context selected by menu.
+
+`S'
+ Add a directory to the search path for source files.
+
+`M-S'
+ Delete a directory from the search path for source files.
+
+ The commands `s' (`po-cycle-reference') and `M-s'
+(`po-select-source-reference') both open another window displaying some
+source program file, and already positioned in such a way that it shows
+an actual use of the string to be translated. By doing so, the command
+gives source program context for the string. But if the entry has no
+source context references, or if all references are unresolved along
+the search path for program sources, then the command diagnoses this as
+an error.
+
+ Even if `s' (or `M-s') opens a new window, the cursor stays in the
+PO file window. If the translator really wants to get into the program
+source window, she ought to do it explicitly, maybe by using command
+`O'.
+
+ When `s' is typed for the first time, or for a PO file entry which
+is different of the last one used for getting source context, then the
+command reacts by giving the first context available for this entry, if
+any. If some context has already been recently displayed for the
+current PO file entry, and the translator wandered off to do other
+things, typing `s' again will merely resume, in another window, the
+context last displayed. In particular, if the translator moved the
+cursor away from the context in the source file, the command will bring
+the cursor back to the context. By using `s' many times in a row, with
+no other commands intervening, PO mode will cycle to the next available
+contexts for this particular entry, getting back to the first context
+once the last has been shown.
+
+ The command `M-s' behaves differently. Instead of cycling through
+references, it lets the translator choose of particular reference among
+many, and displays that reference. It is best used with completion, if
+the translator types `<TAB>' immediately after `M-s', in response to
+the question, she will be offered a menu of all possible references, as
+a reminder of which are the acceptable answers. This command is useful
+only where there are really many contexts available for a single string
+to translate.
+
+ Program source files are usually found relative to where the PO file
+stands. As a special provision, when this fails, the file is also
+looked for, but relative to the directory immediately above it. Those
+two cases take proper care of most PO files. However, it might happen
+that a PO file has been moved, or is edited in a different place than
+its normal location. When this happens, the translator should tell PO
+mode in which directory normally sits the genuine PO file. Many such
+directories may be specified, and all together, they constitute what is
+called the "search path" for program sources. The command `S'
+(`po-consider-source-path') is used to interactively enter a new
+directory at the front of the search path, and the command `M-S'
+(`po-ignore-source-path') is used to select, with completion, one of
+the directories she does not want anymore on the search path.
+
+
+File: gettext.info, Node: Compendium, Prev: C Sources Context, Up: Initial
+
+Using Translation Compendiums
+=============================
+
+ Compendiums are yet to be implemented.
+
+ An incoming PO mode feature will let the translator maintain a
+compendium of already achieved translations. A "compendium" is a
+special PO file containing a set of translations recurring in many
+different packages. The translator will be given commands for adding
+entries to her compendium, and later initializing untranslated entries,
+or updating already translated entries, from translations kept in the
+compendium. For this to work, however, the compendium would have to be
+normalized. *Note Normalizing::.
+
+
+File: gettext.info, Node: Updating, Next: Binaries, Prev: Initial, Up: Top
+
+Updating Existing PO Files
+**************************
+
+* Menu:
+
+* msgmerge Invocation:: Invoking the `msgmerge' Program
+* Translated Entries:: Translated Entries
+* Fuzzy Entries:: Fuzzy Entries
+* Untranslated Entries:: Untranslated Entries
+* Obsolete Entries:: Obsolete Entries
+* Modifying Translations:: Modifying Translations
+* Modifying Comments:: Modifying Comments
+* Subedit:: Mode for Editing Translations
+* Auxiliary:: Consulting Auxiliary PO Files
+
+
+File: gettext.info, Node: msgmerge Invocation, Next: Translated Entries, Prev: Updating, Up: Updating
+
+Invoking the `msgmerge' Program
+===============================
+
+
+File: gettext.info, Node: Translated Entries, Next: Fuzzy Entries, Prev: msgmerge Invocation, Up: Updating
+
+Translated Entries
+==================
+
+ Each PO file entry for which the `msgstr' field has been filled with
+a translation, and which is not marked as fuzzy (*note Fuzzy
+Entries::.), is a said to be a "translated" entry. Only translated
+entries will later be compiled by GNU `msgfmt' and become usable in
+programs. Other entry types will be excluded; translation will not
+occur for them.
+
+ Some commands are more specifically related to translated entry
+processing.
+
+`t'
+ Find the next translated entry.
+
+`M-t'
+ Find the previous translated entry.
+
+ The commands `t' (`po-next-translated-entry') and `M-t'
+(`po-previous-transted-entry') move forwards or backwards, chasing for
+an translated entry. If none is found, the search is extended and
+wraps around in the PO file buffer.
+
+ Translated entries usually result from the translator having edited
+in a translation for them, *Note Modifying Translations::. However, if
+the variable `po-auto-fuzzy-on-edit' is not `nil', the entry having
+received a new translation first becomes a fuzzy entry, which ought to
+be later unfuzzied before becoming an official, genuine translated
+entry. *Note Fuzzy Entries::.
+
+
+File: gettext.info, Node: Fuzzy Entries, Next: Untranslated Entries, Prev: Translated Entries, Up: Updating
+
+Fuzzy Entries
+=============
+
+ Each PO file entry may have a set of "attributes", which are
+qualities given an name and explicitely associated with the entry
+translation, using a special system comment. One of these attributes
+has the name `fuzzy', and entries having this attribute are said to
+have a fuzzy translation. They are called fuzzy entries, for short.
+
+ Fuzzy entries, even if they account for translated entries for most
+other purposes, usually call for revision by the translator. Those may
+be produced by applying the program `msgmerge' to update an older
+translated PO files according to a new PO template file, when this tool
+hypothesises that some new `msgid' has been modified only slightly out
+of an older one, and chooses to pair what it thinks to be the old
+translation for the new modified entry. The slight alteration in the
+original string (the `msgid' string) should often be reflected in the
+translated string, and this requires the intervention of the
+translator. For this reason, `msgmerge' might mark some entries as
+being fuzzy.
+
+ Also, the translator may decide herself to mark an entry as fuzzy
+for her own convenience, when she wants to remember that the entry has
+to be later revisited. So, some commands are more specifically related
+to fuzzy entry processing.
+
+`f'
+ Find the next fuzzy entry.
+
+`M-f'
+ Find the previous fuzzy entry.
+
+`<TAB>'
+ Remove the fuzzy attribute of the current entry.
+
+ The commands `f' (`po-next-fuzzy') and `M-f' (`po-previous-fuzzy')
+move forwards or backwards, chasing for a fuzzy entry. If none is
+found, the search is extended and wraps around in the PO file buffer.
+
+ The command `<TAB>' (`po-unfuzzy') removes the fuzzy attribute
+associated with an entry, usually leaving it translated. Further, if
+the variable `po-auto-select-on-unfuzzy' has not the `nil' value, the
+`<TAB>' command will automatically chase for another interesting entry
+to work on. The initial value of `po-auto-select-on-unfuzzy' is `nil'.
+
+ The initial value of `po-auto-fuzzy-on-edit' is `nil'. However, if
+the variable `po-auto-fuzzy-on-edit' is set to `t', any entry edited
+through the `<RET>' command is marked fuzzy, as a way to ensure some
+kind of double check, later. In this case, the usual paradigm is that
+an entry becomes fuzzy (if not already) whenever the translator
+modifies it. If she is satisfied with the translation, she then uses
+`<TAB>' to pick another entry to work on, clearing the fuzzy attribute
+on the same blow. If she is not satisfied yet, she merely uses `<SPC>'
+to chase another entry, leaving the entry fuzzy.
+
+ The translator may also use the `<DEL>' command
+(`po-fade-out-entry') over any translated entry to mark it as being
+fuzzy, when she wants to easily leave a trace she wants to later return
+working at this entry.
+
+ Also, when time comes to quit working on a PO file buffer with the
+`q' command, the translator is asked for confirmation, if fuzzy string
+still exists.
+
+
+File: gettext.info, Node: Untranslated Entries, Next: Obsolete Entries, Prev: Fuzzy Entries, Up: Updating
+
+Untranslated Entries
+====================
+
+ When `xgettext' originally creates a PO file, unless told otherwise,
+it initializes the `msgid' field with the untranslated string, and
+leaves the `msgstr' string to be empty. Such entries, having an empty
+translation, are said to be "untranslated" entries. Later, when the
+programmer slightly modifies some string right in the program, this
+change is later reflected in the PO file by the appearance of a new
+untranslated entry for the modified string.
+
+ The usual commands moving from entry to entry consider untranslated
+entries on the same level as active entries. Untranslated entries are
+easily recognizable by the fact they end with `msgstr ""'.
+
+ The work of the translator might be (quite naively) seen as the
+process of seeking after an untranslated entry, editing a translation
+for it, and repeating these actions until no untranslated entries
+remain. Some commands are more specifically related to untranslated
+entry processing.
+
+`u'
+ Find the next untranslated entry.
+
+`M-u'
+ Find the previous untranslated entry.
+
+`k'
+ Turn the current entry into an untranslated one.
+
+ The commands `u' (`po-next-untranslated-entry') and `M-u'
+(`po-previous-untransted-entry') move forwards or backwards, chasing
+for an untranslated entry. If none is found, the search is extended
+and wraps around in the PO file buffer.
+
+ An entry can be turned back into an untranslated entry by merely
+emptying its translation, using the command `k' (`po-kill-msgstr').
+*Note Modifying Translations::.
+
+ Also, when time comes to quit working on a PO file buffer with the
+`q' command, the translator is asked for confirmation, if some
+untranslated string still exists.
+
diff --git a/doc/gettext.info-3 b/doc/gettext.info-3
new file mode 100644
index 0000000..cd5db2b
--- /dev/null
+++ b/doc/gettext.info-3
@@ -0,0 +1,1072 @@
+This is Info file gettext.info, produced by Makeinfo version 1.68 from
+the input file gettext.texi.
+
+INFO-DIR-SECTION GNU Gettext Utilities
+START-INFO-DIR-ENTRY
+* Gettext: (gettext). GNU gettext utilities.
+* gettextize: (gettext)gettextize Invocation. Prepare a package for gettext.
+* msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files.
+* msgmerge: (gettext)msgmerge Invocation. Update two PO files into one.
+* xgettext: (gettext)xgettext Invocation. Extract strings into a PO file.
+END-INFO-DIR-ENTRY
+
+ This file provides documentation for GNU `gettext' utilities. It
+also serves as a reference for the free Translation Project.
+
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be stated in a
+translation approved by the Foundation.
+
+
+File: gettext.info, Node: Obsolete Entries, Next: Modifying Translations, Prev: Untranslated Entries, Up: Updating
+
+Obsolete Entries
+================
+
+ By "obsolete" PO file entries, we mean those entries which are
+commented out, usually by `msgmerge' when it found that the translation
+is not needed anymore by the package being localized.
+
+ The usual commands moving from entry to entry consider obsolete
+entries on the same level as active entries. Obsolete entries are
+easily recognizable by the fact that all their lines start with `#',
+even those lines containing `msgid' or `msgstr'.
+
+ Commands exist for emptying the translation or reinitializing it to
+the original untranslated string. Commands interfacing with the kill
+ring may force some previously saved text into the translation. The
+user may interactively edit the translation. All these commands may
+apply to obsolete entries, carefully leaving the entry obsolete after
+the fact.
+
+ Moreover, some commands are more specifically related to obsolete
+entry processing.
+
+`o'
+ Find the next obsolete entry.
+
+`M-o'
+ Find the previous obsolete entry.
+
+`<DEL>'
+ Make an active entry obsolete, or zap out an obsolete entry.
+
+ The commands `o' (`po-next-obsolete-entry') and `M-o'
+(`po-previous-obsolete-entry') move forwards or backwards, chasing for
+an obsolete entry. If none is found, the search is extended and wraps
+around in the PO file buffer.
+
+ PO mode does not provide ways for un-commenting an obsolete entry
+and making it active, because this would reintroduce an original
+untranslated string which does not correspond to any marked string in
+the program sources. This goes with the philosophy of never
+introducing useless `msgid' values.
+
+ However, it is possible to comment out an active entry, so making it
+obsolete. GNU `gettext' utilities will later react to the
+disappearance of a translation by using the untranslated string. The
+command `<DEL>' (`po-fade-out-entry') pushes the current entry a little
+further towards annihilation. If the entry is active (it is a
+translated entry), then it is first made fuzzy. If it is already fuzzy,
+then the entry is merely commented out, with confirmation. If the entry
+is already obsolete, then it is completely deleted from the PO file.
+It is easy to recycle the translation so deleted into some other PO file
+entry, usually one which is untranslated. *Note Modifying
+Translations::.
+
+ Here is a quite interesting problem to solve for later development of
+PO mode, for those nights you are not sleepy. The idea would be that
+PO mode might become bright enough, one of these days, to make good
+guesses at retrieving the most probable candidate, among all obsolete
+entries, for initializing the translation of a newly appeared string.
+I think it might be a quite hard problem to do this algorithmically, as
+we have to develop good and efficient measures of string similarity.
+Right now, PO mode completely lets the decision to the translator, when
+the time comes to find the adequate obsolete translation, it merely
+tries to provide handy tools for helping her to do so.
+
+
+File: gettext.info, Node: Modifying Translations, Next: Modifying Comments, Prev: Obsolete Entries, Up: Updating
+
+Modifying Translations
+======================
+
+ PO mode prevents direct edition of the PO file, by the usual means
+Emacs give for altering a buffer's contents. By doing so, it pretends
+helping the translator to avoid little clerical errors about the
+overall file format, or the proper quoting of strings, as those errors
+would be easily made. Other kinds of errors are still possible, but
+some may be caught and diagnosed by the batch validation process, which
+the translator may always trigger by the `V' command. For all other
+errors, the translator has to rely on her own judgment, and also on the
+linguistic reports submitted to her by the users of the translated
+package, having the same mother tongue.
+
+ When the time comes to create a translation, correct an error
+diagnosed mechanically or reported by a user, the translators have to
+resort to using the following commands for modifying the translations.
+
+`<RET>'
+ Interactively edit the translation.
+
+`<LFD>'
+ Reinitialize the translation with the original, untranslated
+ string.
+
+`k'
+ Save the translation on the kill ring, and delete it.
+
+`w'
+ Save the translation on the kill ring, without deleting it.
+
+`y'
+ Replace the translation, taking the new from the kill ring.
+
+ The command `<RET>' (`po-edit-msgstr') opens a new Emacs window
+meant to edit in a new translation, or to modify an already existing
+translation. The new window contains a copy of the translation taken
+from the current PO file entry, all ready for edition, expunged of all
+quoting marks, fully modifiable and with the complete extent of Emacs
+modifying commands. When the translator is done with her
+modifications, she may use `C-c C-c' to close the subedit window with
+the automatically requoted results, or `C-c C-k' to abort her
+modifications. *Note Subedit::, for more information.
+
+ The command `<LFD>' (`po-msgid-to-msgstr') initializes, or
+reinitializes the translation with the original string. This command is
+normally used when the translator wants to redo a fresh translation of
+the original string, disregarding any previous work.
+
+ It is possible to arrange so, whenever editing an untranslated
+entry, the `<LFD>' command be automatically executed. If you set
+`po-auto-edit-with-msgid' to `t', the translation gets initialised with
+the original string, in case none exist already. The default value for
+`po-auto-edit-with-msgid' is `nil'.
+
+ In fact, whether it is best to start a translation with an empty
+string, or rather with a copy of the original string, is a matter of
+taste or habit. Sometimes, the source language and the target language
+are so different that is simply best to start writing on an empty page.
+At other times, the source and target languages are so close that it
+would be a waste to retype a number of words already being written in
+the original string. A translator may also like having the original
+string right under her eyes, as she will progressively overwrite the
+original text with the translation, even if this requires some extra
+editing work to get rid of the original.
+
+ The command `k' (`po-kill-msgstr') merely empties the translation
+string, so turning the entry into an untranslated one. But while doing
+so, its previous contents is put apart in a special place, known as the
+kill ring. The command `w' (`po-kill-ring-save-msgstr') has also the
+effect of taking a copy of the translation onto the kill ring, but it
+otherwise leaves the entry alone, and does *not* remove the translation
+from the entry. Both commands use exactly the Emacs kill ring, which
+is shared between buffers, and which is well known already to Emacs
+lovers.
+
+ The translator may use `k' or `w' many times in the course of her
+work, as the kill ring may hold several saved translations. From the
+kill ring, strings may later be reinserted in various Emacs buffers.
+In particular, the kill ring may be used for moving translation strings
+between different entries of a single PO file buffer, or if the
+translator is handling many such buffers at once, even between PO files.
+
+ To facilitate exchanges with buffers which are not in PO mode, the
+translation string put on the kill ring by the `k' command is fully
+unquoted before being saved: external quotes are removed, multi-lines
+strings are concatenated, and backslashed escaped sequences are turned
+into their corresponding characters. In the special case of obsolete
+entries, the translation is also uncommented prior to saving.
+
+ The command `y' (`po-yank-msgstr') completely replaces the
+translation of the current entry by a string taken from the kill ring.
+Following Emacs terminology, we then say that the replacement string is
+"yanked" into the PO file buffer. *Note Yanking: (emacs)Yanking. The
+first time `y' is used, the translation receives the value of the most
+recent addition to the kill ring. If `y' is typed once again,
+immediately, without intervening keystrokes, the translation just
+inserted is taken away and replaced by the second most recent addition
+to the kill ring. By repeating `y' many times in a row, the translator
+may travel along the kill ring for saved strings, until she finds the
+string she really wanted.
+
+ When a string is yanked into a PO file entry, it is fully and
+automatically requoted for complying with the format PO files should
+have. Further, if the entry is obsolete, PO mode then appropriately
+push the inserted string inside comments. Once again, translators
+should not burden themselves with quoting considerations besides, of
+course, the necessity of the translated string itself respective to the
+program using it.
+
+ Note that `k' or `w' are not the only commands pushing strings on
+the kill ring, as almost any PO mode command replacing translation
+strings (or the translator comments) automatically save the old string
+on the kill ring. The main exceptions to this general rule are the
+yanking commands themselves.
+
+ To better illustrate the operation of killing and yanking, let's use
+an actual example, taken from a common situation. When the programmer
+slightly modifies some string right in the program, his change is later
+reflected in the PO file by the appearance of a new untranslated entry
+for the modified string, and the fact that the entry translating the
+original or unmodified string becomes obsolete. In many cases, the
+translator might spare herself some work by retrieving the unmodified
+translation from the obsolete entry, then initializing the untranslated
+entry `msgstr' field with this retrieved translation. Once this done,
+the obsolete entry is not wanted anymore, and may be safely deleted.
+
+ When the translator finds an untranslated entry and suspects that a
+slight variant of the translation exists, she immediately uses `m' to
+mark the current entry location, then starts chasing obsolete entries
+with `o', hoping to find some translation corresponding to the
+unmodified string. Once found, she uses the `<DEL>' command for
+deleting the obsolete entry, knowing that `<DEL>' also *kills* the
+translation, that is, pushes the translation on the kill ring. Then,
+`r' returns to the initial untranslated entry, `y' then *yanks* the
+saved translation right into the `msgstr' field. The translator is
+then free to use `<RET>' for fine tuning the translation contents, and
+maybe to later use `u', then `m' again, for going on with the next
+untranslated string.
+
+ When some sequence of keys has to be typed over and over again, the
+translator may find it useful to become better acquainted with the Emacs
+capability of learning these sequences and playing them back under
+request. *Note Keyboard Macros: (emacs)Keyboard Macros.
+
+
+File: gettext.info, Node: Modifying Comments, Next: Subedit, Prev: Modifying Translations, Up: Updating
+
+Modifying Comments
+==================
+
+ Any translation work done seriously will raise many linguistic
+difficulties, for which decisions have to be made, and the choices
+further documented. These documents may be saved within the PO file in
+form of translator comments, which the translator is free to create,
+delete, or modify at will. These comments may be useful to herself
+when she returns to this PO file after a while.
+
+ Comments not having whitespace after the initial `#', for example,
+those beginning with `#.' or `#:', are *not* translator comments, they
+are exclusively created by other `gettext' tools. So, the commands
+below will never alter such system added comments, they are not meant
+for the translator to modify. *Note PO Files::.
+
+ The following commands are somewhat similar to those modifying
+translations, so the general indications given for those apply here.
+*Note Modifying Translations::.
+
+`#'
+ Interactively edit the translator comments.
+
+`K'
+ Save the translator comments on the kill ring, and delete it.
+
+`W'
+ Save the translator comments on the kill ring, without deleting it.
+
+`Y'
+ Replace the translator comments, taking the new from the kill ring.
+
+ These commands parallel PO mode commands for modifying the
+translation strings, and behave much the same way as they do, except
+that they handle this part of PO file comments meant for translator
+usage, rather than the translation strings. So, if the descriptions
+given below are slightly succinct, it is because the full details have
+already been given. *Note Modifying Translations::.
+
+ The command `#' (`po-edit-comment') opens a new Emacs window
+containing a copy of the translator comments on the current PO file
+entry. If there are no such comments, PO mode understands that the
+translator wants to add a comment to the entry, and she is presented
+with an empty screen. Comment marks (`#') and the space following them
+are automatically removed before edition, and reinstated after. For
+translator comments pertaining to obsolete entries, the uncommenting
+and recommenting operations are done twice. Once in the editing
+window, the keys `C-c C-c' allow the translator to tell she is finished
+with editing the comment. *Note Subedit::, for further details.
+
+ Functions found on `po-subedit-mode-hook', if any, are executed after
+the string has been inserted in the edit buffer.
+
+ The command `K' (`po-kill-comment') get rid of all translator
+comments, while saving those comments on the kill ring. The command
+`W' (`po-kill-ring-save-comment') takes a copy of the translator
+comments on the kill ring, but leaves them undisturbed in the current
+entry. The command `Y' (`po-yank-comment') completely replaces the
+translator comments by a string taken at the front of the kill ring.
+When this command is immediately repeated, the comments just inserted
+are withdrawn, and replaced by other strings taken along the kill ring.
+
+ On the kill ring, all strings have the same nature. There is no
+distinction between *translation* strings and *translator comments*
+strings. So, for example, let's presume the translator has just
+finished editing a translation, and wants to create a new translator
+comment to document why the previous translation was not good, just to
+remember what was the problem. Foreseeing that she will do that in her
+documentation, the translator may want to quote the previous
+translation in her translator comments. To do so, she may initialize
+the translator comments with the previous translation, still at the
+head of the kill ring. Because editing already pushed the previous
+translation on the kill ring, she merely has to type `M-w' prior to
+`#', and the previous translation will be right there, all ready for
+being introduced by some explanatory text.
+
+ On the other hand, presume there are some translator comments already
+and that the translator wants to add to those comments, instead of
+wholly replacing them. Then, she should edit the comment right away
+with `#'. Once inside the editing window, she can use the regular
+Emacs commands `C-y' (`yank') and `M-y' (`yank-pop') to get the
+previous translation where she likes.
+
+
+File: gettext.info, Node: Subedit, Next: Auxiliary, Prev: Modifying Comments, Up: Updating
+
+Details of Sub Edition
+======================
+
+ The PO subedit minor mode has a few peculiarities worth being
+described in fuller detail. It installs a few commands over the usual
+editing set of Emacs, which are described below.
+
+`C-c C-c'
+ Complete edition.
+
+`C-c C-k'
+ Abort edition.
+
+`C-c C-a'
+ Consult auxiliary PO files.
+
+ The windows contents represents a translation for a given message,
+or a translator comment. The translator may modify this window to her
+heart's content. Once this done, the command `C-c C-c'
+(`po-subedit-exit') may be used to return the edited translation into
+the PO file, replacing the original translation, even if it moved out of
+sight or if buffers were switched.
+
+ If the translator becomes unsatisfied with her translation or
+comment, to the extent she prefers keeping what was existent prior to
+the `<RET>' or `#' command, she may use the command `C-c C-k'
+(`po-subedit-abort') to merely get rid of edition, while preserving the
+original translation or comment. Another way would be for her to exit
+normally with `C-c C-c', then type `U' once for undoing the whole
+effect of last edition.
+
+ The command `C-c C-a' allows for glancing through translations
+already achieved in other languages, directly while editing the current
+translation. This may be quite convenient when the translator is fluent
+at many languages, but of course, only makes sense when such completed
+auxiliary PO files are already available to her (*note Auxiliary::.).
+
+ Functions found on `po-subedit-mode-hook', if any, are executed after
+the string has been inserted in the edit buffer.
+
+ While editing her translation, the translator should pay attention
+to not inserting unwanted `<RET>' (carriage returns) characters at the
+end of the translated string if those are not meant to be there, or to
+removing such characters when they are required. Since these
+characters are not visible in the editing buffer, they are easily
+introduced by mistake. To help her, `<RET>' automatically puts the
+character `<' at the end of the string being edited, but this `<' is
+not really part of the string. On exiting the editing window with
+`C-c C-c', PO mode automatically removes such `<' and all whitespace
+added after it. If the translator adds characters after the
+terminating `<', it looses its delimiting property and integrally
+becomes part of the string. If she removes the delimiting `<', then
+the edited string is taken *as is*, with all trailing newlines, even if
+invisible. Also, if the translated string ought to end itself with a
+genuine `<', then the delimiting `<' may not be removed; so the string
+should appear, in the editing window, as ending with two `<' in a row.
+
+ When a translation (or a comment) is being edited, the translator
+may move the cursor back into the PO file buffer and freely move to
+other entries, browsing at will. If, with an edition pending, the
+translator wanders in the PO file buffer, she may decide to start
+modifying another entry. Each entry being edited has its own subedit
+buffer. It is possible to simultaneously edit the translation *and*
+the comment of a single entry, or to edit entries in different PO
+files, all at once. Typing `<RET>' on a field already being edited
+merely resume that particular edit. Yet, the translator should better
+be comfortable at handling many Emacs windows!
+
+ Pending subedits may be completed or aborted in any order, regardless
+of how or when they were started. When many subedits are pending and
+the translator asks for quitting the PO file (with the `q' command),
+subedits are automatically resumed one at a time, so she may decide for
+each of them.
+
+
+File: gettext.info, Node: Auxiliary, Prev: Subedit, Up: Updating
+
+Consulting Auxiliary PO Files
+=============================
+
+ PO mode is able to help the knowledgeable translator, being fluent in
+many languages, at taking advantage of translations already achieved in
+other languages she just happens to know. It provides these other
+language translations as additional context for her own work. Moreover,
+it has features to ease the production of translations for many
+languages at once, for translators preferring to work in this way.
+
+ An "auxiliary" PO file is an existing PO file meant for the same
+package the translator is working on, but targeted to a different mother
+tongue language. Commands exist for declaring and handling auxiliary
+PO files, and also for showing contexts for the entry under work.
+
+ Here are the auxiliary file commands available in PO mode.
+
+`a'
+ Seek auxiliary files for another translation for the same entry.
+
+`M-a'
+ Switch to a particular auxiliary file.
+
+`A'
+ Declare this PO file as an auxiliary file.
+
+`M-A'
+ Remove this PO file from the list of auxiliary files.
+
+ Command `A' (`po-consider-as-auxiliary') adds the current PO file to
+the list of auxiliary files, while command `M-A'
+(`po-ignore-as-auxiliary' just removes it.
+
+ The command `a' (`po-cycle-auxiliary') seeks all auxiliary PO files,
+round-robin, searching for a translated entry in some other language
+having an `msgid' field identical as the one for the current entry.
+The found PO file, if any, takes the place of the current PO file in
+the display (its window gets on top). Before doing so, the current PO
+file is also made into an auxiliary file, if not already. So, `a' in
+this newly displayed PO file will seek another PO file, and so on, so
+repeating `a' will eventually yield back the original PO file.
+
+ The command `M-a' (`po-select-auxiliary') asks the translator for
+her choice of a particular auxiliary file, with completion, and then
+switches to that selected PO file. The command also checks if the
+selected file has an `msgid' field identical as the one for the current
+entry, and if yes, this entry becomes current. Otherwise, the cursor
+of the selected file is left undisturbed.
+
+ For all this to work fully, auxiliary PO files will have to be
+normalized, in that way that `msgid' fields should be written *exactly*
+the same way. It is possible to write `msgid' fields in various ways
+for representing the same string, different writing would break the
+proper behaviour of the auxiliary file commands of PO mode. This is not
+expected to be much a problem in practice, as most existing PO files
+have their `msgid' entries written by the same GNU `gettext' tools.
+
+ However, PO files initially created by PO mode itself, while marking
+strings in source files, are normalised differently. So are PO files
+resulting of the the `M-x normalize' command. Until these
+discrepancies between PO mode and other GNU `gettext' tools get fully
+resolved, the translator should stay aware of normalisation issues.
+
+
+File: gettext.info, Node: Binaries, Next: Users, Prev: Updating, Up: Top
+
+Producing Binary MO Files
+*************************
+
+* Menu:
+
+* msgfmt Invocation:: Invoking the `msgfmt' Program
+* MO Files:: The Format of GNU MO Files
+
+
+File: gettext.info, Node: msgfmt Invocation, Next: MO Files, Prev: Binaries, Up: Binaries
+
+Invoking the `msgfmt' Program
+=============================
+
+ Usage: msgfmt [OPTION] FILENAME.po ...
+
+`-a NUMBER'
+`--alignment=NUMBER'
+ Align strings to NUMBER bytes (default: 1).
+
+`-h'
+`--help'
+ Display this help and exit.
+
+`--no-hash'
+ Binary file will not include the hash table.
+
+`-o FILE'
+`--output-file=FILE'
+ Specify output file name as FILE.
+
+`--strict'
+ Direct the program to work strictly following the Uniforum/Sun
+ implementation. Currently this only affects the naming of the
+ output file. If this option is not given the name of the output
+ file is the same as the domain name. If the strict Uniforum mode
+ is enable the suffix `.mo' is added to the file name if it is not
+ already present.
+
+ We find this behaviour of Sun's implementation rather silly and so
+ by default this mode is *not* selected.
+
+`-v'
+`--verbose'
+ Detect and diagnose input file anomalies which might represent
+ translation errors. The `msgid' and `msgstr' strings are studied
+ and compared. It is considered abnormal that one string starts or
+ ends with a newline while the other does not.
+
+ Also, if the string represents a format sring used in a
+ `printf'-like function both strings should have the same number of
+ `%' format specifiers, with matching types. If the flag
+ `c-format' or `possible-c-format' appears in the special comment
+ <#,> for this entry a check is performed. For example, the check
+ will diagnose using `%.*s' against `%s', or `%d' against `%s', or
+ `%d' against `%x'. It can even handle positional parameters.
+
+ Normally the `xgettext' program automatically decides whether a
+ string is a format string or not. This algorithm is not perfect,
+ though. It might regard a string as a format string though it is
+ not used in a `printf'-like function and so `msgfmt' might report
+ errors where there are none. Or the other way round: a string is
+ not regarded as a format string but it is used in a `printf'-like
+ function.
+
+ So solve this problem the programmer can dictate the decision to
+ the `xgettext' program (*note c-format::.). The translator should
+ not consider removing the flag from the <#,> line. This "fix"
+ would be reversed again as soon as `msgmerge' is called the next
+ time.
+
+`-V'
+`--version'
+ Output version information and exit.
+
+ If input file is `-', standard input is read. If output file is
+`-', output is written to standard output.
+
+
+File: gettext.info, Node: MO Files, Prev: msgfmt Invocation, Up: Binaries
+
+The Format of GNU MO Files
+==========================
+
+ The format of the generated MO files is best described by a picture,
+which appears below.
+
+ The first two words serve the identification of the file. The magic
+number will always signal GNU MO files. The number is stored in the
+byte order of the generating machine, so the magic number really is two
+numbers: `0x950412de' and `0xde120495'. The second word describes the
+current revision of the file format. For now the revision is 0. This
+might change in future versions, and ensures that the readers of MO
+files can distinguish new formats from old ones, so that both can be
+handled correctly. The version is kept separate from the magic number,
+instead of using different magic numbers for different formats, mainly
+because `/etc/magic' is not updated often. It might be better to have
+magic separated from internal format version identification.
+
+ Follow a number of pointers to later tables in the file, allowing
+for the extension of the prefix part of MO files without having to
+recompile programs reading them. This might become useful for later
+inserting a few flag bits, indication about the charset used, new
+tables, or other things.
+
+ Then, at offset O and offset T in the picture, two tables of string
+descriptors can be found. In both tables, each string descriptor uses
+two 32 bits integers, one for the string length, another for the offset
+of the string in the MO file, counting in bytes from the start of the
+file. The first table contains descriptors for the original strings,
+and is sorted so the original strings are in increasing lexicographical
+order. The second table contains descriptors for the translated
+strings, and is parallel to the first table: to find the corresponding
+translation one has to access the array slot in the second array with
+the same index.
+
+ Having the original strings sorted enables the use of simple binary
+search, for when the MO file does not contain an hashing table, or for
+when it is not practical to use the hashing table provided in the MO
+file. This also has another advantage, as the empty string in a PO
+file GNU `gettext' is usually *translated* into some system information
+attached to that particular MO file, and the empty string necessarily
+becomes the first in both the original and translated tables, making
+the system information very easy to find.
+
+ The size S of the hash table can be zero. In this case, the hash
+table itself is not contained in the MO file. Some people might prefer
+this because a precomputed hashing table takes disk space, and does not
+win *that* much speed. The hash table contains indices to the sorted
+array of strings in the MO file. Conflict resolution is done by double
+hashing. The precise hashing algorithm used is fairly dependent of GNU
+`gettext' code, and is not documented here.
+
+ As for the strings themselves, they follow the hash file, and each
+is terminated with a <NUL>, and this <NUL> is not counted in the length
+which appears in the string descriptor. The `msgfmt' program has an
+option selecting the alignment for MO file strings. With this option,
+each string is separately aligned so it starts at an offset which is a
+multiple of the alignment value. On some RISC machines, a correct
+alignment will speed things up.
+
+ Nothing prevents a MO file from having embedded <NUL>s in strings.
+However, the program interface currently used already presumes that
+strings are <NUL> terminated, so embedded <NUL>s are somewhat useless.
+But MO file format is general enough so other interfaces would be later
+possible, if for example, we ever want to implement wide characters
+right in MO files, where <NUL> bytes may accidently appear.
+
+ This particular issue has been strongly debated in the GNU `gettext'
+development forum, and it is expectable that MO file format will evolve
+or change over time. It is even possible that many formats may later
+be supported concurrently. But surely, we have to start somewhere, and
+the MO file format described here is a good start. Nothing is cast in
+concrete, and the format may later evolve fairly easily, so we should
+feel comfortable with the current approach.
+
+ byte
+ +------------------------------------------+
+ 0 | magic number = 0x950412de |
+ | |
+ 4 | file format revision = 0 |
+ | |
+ 8 | number of strings | == N
+ | |
+ 12 | offset of table with original strings | == O
+ | |
+ 16 | offset of table with translation strings | == T
+ | |
+ 20 | size of hashing table | == S
+ | |
+ 24 | offset of hashing table | == H
+ | |
+ . .
+ . (possibly more entries later) .
+ . .
+ | |
+ O | length & offset 0th string ----------------.
+ O + 8 | length & offset 1st string ------------------.
+ ... ... | |
+ O + ((N-1)*8)| length & offset (N-1)th string | | |
+ | | | |
+ T | length & offset 0th translation ---------------.
+ T + 8 | length & offset 1st translation -----------------.
+ ... ... | | | |
+ T + ((N-1)*8)| length & offset (N-1)th translation | | | | |
+ | | | | | |
+ H | start hash table | | | | |
+ ... ... | | | |
+ H + S * 4 | end hash table | | | | |
+ | | | | | |
+ | NUL terminated 0th string <----------------' | | |
+ | | | | |
+ | NUL terminated 1st string <------------------' | |
+ | | | |
+ ... ... | |
+ | | | |
+ | NUL terminated 0th translation <---------------' |
+ | | |
+ | NUL terminated 1st translation <-----------------'
+ | |
+ ... ...
+ | |
+ +------------------------------------------+
+
+
+File: gettext.info, Node: Users, Next: Programmers, Prev: Binaries, Up: Top
+
+The User's View
+***************
+
+ When GNU `gettext' will truly have reached is goal, average users
+should feel some kind of astonished pleasure, seeing the effect of that
+strange kind of magic that just makes their own native language appear
+everywhere on their screens. As for naive users, they would ideally
+have no special pleasure about it, merely taking their own language for
+*granted*, and becoming rather unhappy otherwise.
+
+ So, let's try to describe here how we would like the magic to
+operate, as we want the users' view to be the simplest, among all ways
+one could look at GNU `gettext'. All other software engineers:
+programmers, translators, maintainers, should work together in such a
+way that the magic becomes possible. This is a long and progressive
+undertaking, and information is available about the progress of the
+Translation Project.
+
+ When a package is distributed, there are two kind of users:
+"installers" who fetch the distribution, unpack it, configure it,
+compile it and install it for themselves or others to use; and "end
+users" that call programs of the package, once these have been
+installed at their site. GNU `gettext' is offering magic for both
+installers and end users.
+
+* Menu:
+
+* Matrix:: The Current `ABOUT-NLS' Matrix
+* Installers:: Magic for Installers
+* End Users:: Magic for End Users
+
+
+File: gettext.info, Node: Matrix, Next: Installers, Prev: Users, Up: Users
+
+The Current `ABOUT-NLS' Matrix
+==============================
+
+ Languages are not equally supported in all packages using GNU
+`gettext'. To know if some package uses GNU `gettext', one may check
+the distribution for the `ABOUT-NLS' information file, for some `LL.po'
+files, often kept together into some `po/' directory, or for an `intl/'
+directory. Internationalized packages have usually many `LL.po' files,
+where LL represents the language. *Note End Users:: for a complete
+description of the format for LL.
+
+ More generally, a matrix is available for showing the current state
+of the Translation Project, listing which packages are prepared for
+multi-lingual messages, and which languages is supported by each.
+Because this information changes often, this matrix is not kept within
+this GNU `gettext' manual. This information is often found in file
+`ABOUT-NLS' from various distributions, but is also as old as the
+distribution itself. A recent copy of this `ABOUT-NLS' file,
+containing up-to-date information, should generally be found on the
+Translation Project sites, and also on most GNU archive sites.
+
+
+File: gettext.info, Node: Installers, Next: End Users, Prev: Matrix, Up: Users
+
+Magic for Installers
+====================
+
+ By default, packages fully using GNU `gettext', internally, are
+installed in such a way that they to allow translation of messages. At
+*configuration* time, those packages should automatically detect
+whether the underlying host system provides usable `catgets' or
+`gettext' functions. If neither is present, the GNU `gettext' library
+should be automatically prepared and used. Installers may use special
+options at configuration time for changing this behavior. The command
+`./configure --with-included-gettext' bypasses system `catgets' or
+`gettext' to use GNU `gettext' instead, while `./configure
+--disable-nls' produces program totally unable to translate messages.
+
+ Internationalized packages have usually many `LL.po' files. Unless
+translations are disabled, all those available are installed together
+with the package. However, the environment variable `LINGUAS' may be
+set, prior to configuration, to limit the installed set. `LINGUAS'
+should then contain a space separated list of two-letter codes, stating
+which languages are allowed.
+
+
+File: gettext.info, Node: End Users, Prev: Installers, Up: Users
+
+Magic for End Users
+===================
+
+ We consider here those packages using GNU `gettext' internally, and
+for which the installers did not disable translation at *configure*
+time. Then, users only have to set the `LANG' environment variable to
+the appropriate `LL' prior to using the programs in the package. *Note
+Matrix::. For example, let's presume a German site. At the shell
+prompt, users merely have to execute `setenv LANG de' (in `csh') or
+`export LANG; LANG=de' (in `sh'). They could even do this from their
+`.login' or `.profile' file.
+
+
+File: gettext.info, Node: Programmers, Next: Translators, Prev: Users, Up: Top
+
+The Programmer's View
+*********************
+
+ One aim of the current message catalog implementation provided by
+GNU `gettext' was to use the systems message catalog handling, if the
+installer wishes to do so. So we perhaps should first take a look at
+the solutions we know about. The people in the POSIX committee does not
+manage to agree on one of the semi-official standards which we'll
+describe below. In fact they couldn't agree on anything, so nothing
+decide only to include an example of an interface. The major Unix
+vendors are split in the usage of the two most important
+specifications: X/Opens catgets vs. Uniforums gettext interface. We'll
+describe them both and later explain our solution of this dilemma.
+
+* Menu:
+
+* catgets:: About `catgets'
+* gettext:: About `gettext'
+* Comparison:: Comparing the two interfaces
+* Using libintl.a:: Using libintl.a in own programs
+* gettext grok:: Being a `gettext' grok
+* Temp Programmers:: Temporary Notes for the Programmers Chapter
+
+
+File: gettext.info, Node: catgets, Next: gettext, Prev: Programmers, Up: Programmers
+
+About `catgets'
+===============
+
+ The `catgets' implementation is defined in the X/Open Portability
+Guide, Volume 3, XSI Supplementary Definitions, Chapter 5. But the
+process of creating this standard seemed to be too slow for some of the
+Unix vendors so they created their implementations on preliminary
+versions of the standard. Of course this leads again to problems while
+writing platform independent programs: even the usage of `catgets' does
+not guarantee a unique interface.
+
+ Another, personal comment on this that only a bunch of committee
+members could have made this interface. They never really tried to
+program using this interface. It is a fast, memory-saving
+implementation, an user can happily live with it. But programmers hate
+it (at least me and some others do...)
+
+ But we must not forget one point: after all the trouble with
+transfering the rights on Unix(tm) they at last came to X/Open, the
+very same who published this specifications. This leads me to making
+the prediction that this interface will be in future Unix standards
+(e.g. Spec1170) and therefore part of all Unix implementation
+(implementations, which are *allowed* to wear this name).
+
+* Menu:
+
+* Interface to catgets:: The interface
+* Problems with catgets:: Problems with the `catgets' interface?!
+
+
+File: gettext.info, Node: Interface to catgets, Next: Problems with catgets, Prev: catgets, Up: catgets
+
+The Interface
+-------------
+
+ The interface to the `catgets' implementation consists of three
+functions which correspond to those used in file access: `catopen' to
+open the catalog for using, `catgets' for accessing the message tables,
+and `catclose' for closing after work is done. Prototypes for the
+functions and the needed definitions are in the `<nl_types.h>' header
+file.
+
+ `catopen' is used like in this:
+
+ nl_catd catd = catopen ("catalog_name", 0);
+
+ The function takes as the argument the name of the catalog. This
+usual refers to the name of the program or the package. The second
+parameter is not further specified in the standard. I don't even know
+whether it is implemented consistently among various systems. So the
+common advice is to use `0' as the value. The return value is a handle
+to the message catalog, equivalent to handles to file returned by
+`open'.
+
+ This handle is of course used in the `catgets' function which can be
+used like this:
+
+ char *translation = catgets (catd, set_no, msg_id, "original string");
+
+ The first parameter is this catalog descriptor. The second parameter
+specifies the set of messages in this catalog, in which the message
+described by `msg_id' is obtained. `catgets' therefore uses a
+three-stage addressing:
+
+ catalog name => set number => message ID => translation
+
+ The fourth argument is not used to address the translation. It is
+given as a default value in case when one of the addressing stages
+fail. One important thing to remember is that although the return type
+of catgets is `char *' the resulting string *must not* be changed. It
+should better `const char *', but the standard is published in 1988,
+one year before ANSI C.
+
+The last of these function functions is used and behaves as expected:
+
+ catclose (catd);
+
+ After this no `catgets' call using the descriptor is legal anymore.
+
+
+File: gettext.info, Node: Problems with catgets, Prev: Interface to catgets, Up: catgets
+
+Problems with the `catgets' Interface?!
+---------------------------------------
+
+ Now that this descriptions seemed to be really easy where are the
+problem we speak of. In fact the interface could be used in a
+reasonable way, but constructing the message catalogs is a pain. The
+reason for this lies in the third argument of `catgets': the unique
+message ID. This has to be a numeric value for all messages in a single
+set. Perhaps you could imagine the problems keeping such list while
+changing the source code. Add a new message here, remove one there. Of
+course there have been developed a lot of tools helping to organize this
+chaos but one as the other fails in one aspect or the other. We don't
+want to say that the other approach has no problems but they are far
+more easily to manage.
+
+
+File: gettext.info, Node: gettext, Next: Comparison, Prev: catgets, Up: Programmers
+
+About `gettext'
+===============
+
+ The definition of the `gettext' interface comes from a Uniforum
+proposal and it is followed by at least one major Unix vendor (Sun) in
+its last developments. It is not specified in any official standard,
+though.
+
+ The main points about this solution is that it does not follow the
+method of normal file handling (open-use-close) and that it does not
+burden the programmer so many task, especially the unique key handling.
+Of course here is also a unique key needed, but this key is the message
+itself (how long or short it is). See *Note Comparison:: for a more
+detailed comparison of the two methods.
+
+ The following section contains a rather detailed description of the
+interface. We make it that detailed because this is the interface we
+chose for the GNU `gettext' Library. Programmers interested in using
+this library will be interested in this description.
+
+* Menu:
+
+* Interface to gettext:: The interface
+* Ambiguities:: Solving ambiguities
+* Locating Catalogs:: Locating message catalog files
+* Optimized gettext:: Optimization of the *gettext functions
+
+
+File: gettext.info, Node: Interface to gettext, Next: Ambiguities, Prev: gettext, Up: gettext
+
+The Interface
+-------------
+
+ The minimal functionality an interface must have is a) to select a
+domain the strings are coming from (a single domain for all programs is
+not reasonable because its construction and maintenance is difficult,
+perhaps impossible) and b) to access a string in a selected domain.
+
+ This is principally the description of the `gettext' interface. It
+has an global domain which unqualified usages reference. Of course this
+domain is selectable by the user.
+
+ char *textdomain (const char *domain_name);
+
+ This provides the possibility to change or query the current status
+of the current global domain of the `LC_MESSAGE' category. The
+argument is a null-terminated string, whose characters must be legal in
+the use in filenames. If the DOMAIN_NAME argument is `NULL', the
+function return the current value. If no value has been set before,
+the name of the default domain is returned: *messages*. Please note
+that although the return value of `textdomain' is of type `char *' no
+changing is allowed. It is also important to know that no checks of
+the availability are made. If the name is not available you will see
+this by the fact that no translations are provided.
+
+To use a domain set by `textdomain' the function
+
+ char *gettext (const char *msgid);
+
+ is to be used. This is the simplest reasonable form one can imagine.
+The translation of the string MSGID is returned if it is available in
+the current domain. If not available the argument itself is returned.
+If the argument is `NULL' the result is undefined.
+
+ One things which should come into mind is that no explicit
+dependency to the used domain is given. The current value of the
+domain for the `LC_MESSAGES' locale is used. If this changes between
+two executions of the same `gettext' call in the program, both calls
+reference a different message catalog.
+
+ For the easiest case, which is normally used in internationalized
+packages, once at the beginning of execution a call to `textdomain' is
+issued, setting the domain to a unique name, normally the package name.
+In the following code all strings which have to be translated are
+filtered through the gettext function. That's all, the package speaks
+your language.
+
+
+File: gettext.info, Node: Ambiguities, Next: Locating Catalogs, Prev: Interface to gettext, Up: gettext
+
+Solving Ambiguities
+-------------------
+
+ While this single name domain work good for most applications there
+might be the need to get translations from more than one domain. Of
+course one could switch between different domains with calls to
+`textdomain', but this is really not convenient nor is it fast. A
+possible situation could be one case discussing while this writing: all
+error messages of functions in the set of common used functions should
+go into a separate domain `error'. By this mean we would only need to
+translate them once.
+
+For this reasons there are two more functions to retrieve strings:
+
+ char *dgettext (const char *domain_name, const char *msgid);
+ char *dcgettext (const char *domain_name, const char *msgid,
+ int category);
+
+ Both take an additional argument at the first place, which
+corresponds to the argument of `textdomain'. The third argument of
+`dcgettext' allows to use another locale but `LC_MESSAGES'. But I
+really don't know where this can be useful. If the DOMAIN_NAME is
+`NULL' or CATEGORY has an value beside the known ones, the result is
+undefined. It should also be noted that this function is not part of
+the second known implementation of this function family, the one found
+in Solaris.
+
+ A second ambiguity can arise by the fact, that perhaps more than one
+domain has the same name. This can be solved by specifying where the
+needed message catalog files can be found.
+
+ char *bindtextdomain (const char *domain_name,
+ const char *dir_name);
+
+ Calling this function binds the given domain to a file in the
+specified directory (how this file is determined follows below).
+Especially a file in the systems default place is not favored against
+the specified file anymore (as it would be by solely using
+`textdomain'). A `NULL' pointer for the DIR_NAME parameter returns the
+binding associated with DOMAIN_NAME. If DOMAIN_NAME itself is `NULL'
+nothing happens and a `NULL' pointer is returned. Here again as for
+all the other functions is true that none of the return value must be
+changed!
+
+ It is important to remember that relative path names for the
+DIR_NAME parameter can be trouble. Since the path is always computed
+relative to the current directory different results will be achieved
+when the program executes a `chdir' command. Relative paths should
+always be avoided to avoid dependencies and unreliabilities.
+
+
+File: gettext.info, Node: Locating Catalogs, Next: Optimized gettext, Prev: Ambiguities, Up: gettext
+
+Locating Message Catalog Files
+------------------------------
+
+ Because many different languages for many different packages have to
+be stored we need some way to add these information to file message
+catalog files. The way usually used in Unix environments is have this
+encoding in the file name. This is also done here. The directory name
+given in `bindtextdomain's second argument (or the default directory),
+followed by the value and name of the locale and the domain name are
+concatenated:
+
+ DIR_NAME/LOCALE/LC_CATEGORY/DOMAIN_NAME.mo
+
+ The default value for DIR_NAME is system specific. For the GNU
+library, and for packages adhering to its conventions, it's:
+ /usr/local/share/locale
+
+LOCALE is the value of the locale whose name is this `LC_CATEGORY'.
+For `gettext' and `dgettext' this locale is always `LC_MESSAGES'.
+`dcgettext' specifies the locale by the third argument.(1) (2)
+
+ ---------- Footnotes ----------
+
+ (1) Some system, eg Ultrix, don't have `LC_MESSAGES'. Here we use a
+more or less arbitrary value for it.
+
+ (2) When the system does not support `setlocale' its behavior in
+setting the locale values is simulated by looking at the environment
+variables.
+
diff --git a/doc/gettext.info-4 b/doc/gettext.info-4
new file mode 100644
index 0000000..21f46dd
--- /dev/null
+++ b/doc/gettext.info-4
@@ -0,0 +1,1110 @@
+This is Info file gettext.info, produced by Makeinfo version 1.68 from
+the input file gettext.texi.
+
+INFO-DIR-SECTION GNU Gettext Utilities
+START-INFO-DIR-ENTRY
+* Gettext: (gettext). GNU gettext utilities.
+* gettextize: (gettext)gettextize Invocation. Prepare a package for gettext.
+* msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files.
+* msgmerge: (gettext)msgmerge Invocation. Update two PO files into one.
+* xgettext: (gettext)xgettext Invocation. Extract strings into a PO file.
+END-INFO-DIR-ENTRY
+
+ This file provides documentation for GNU `gettext' utilities. It
+also serves as a reference for the free Translation Project.
+
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be stated in a
+translation approved by the Foundation.
+
+
+File: gettext.info, Node: Optimized gettext, Prev: Locating Catalogs, Up: gettext
+
+Optimization of the *gettext functions
+--------------------------------------
+
+ At this point of the discussion we should talk about an advantage of
+the GNU `gettext' implementation. Some readers might have pointed out
+that an internationalized program might have a poor performance if some
+string has to be translated in an inner loop. While this is unavoidable
+when the string varies from one run of the loop to the other it is
+simply a waste of time when the string is always the same. Take the
+following example:
+
+ {
+ while (...)
+ {
+ puts (gettext ("Hello world"));
+ }
+ }
+
+When the locale selection does not change between two runs the resulting
+string is always the same. One way to use this is:
+
+ {
+ str = gettext ("Hello world");
+ while (...)
+ {
+ puts (str);
+ }
+ }
+
+But this solution is not usable in all situation (e.g. when the locale
+selection changes) nor is it good readable.
+
+ The GNU C compiler, version 2.7 and above, provide another solution
+for this. To describe this we show here some lines of the
+`intl/libgettext.h' file. For an explanation of the expression command
+block see *Note Statements and Declarations in Expressions:
+(gcc)Statement Exprs.
+
+ # if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
+ extern int _nl_msg_cat_cntr;
+ # define dcgettext(domainname, msgid, category) \
+ (__extension__ \
+ ({ \
+ char *result; \
+ if (__builtin_constant_p (msgid)) \
+ { \
+ static char *__translation__; \
+ static int __catalog_counter__; \
+ if (! __translation__ \
+ || __catalog_counter__ != _nl_msg_cat_cntr) \
+ { \
+ __translation__ = \
+ dcgettext__ ((domainname), (msgid), (category)); \
+ __catalog_counter__ = _nl_msg_cat_cntr; \
+ } \
+ result = __translation__; \
+ } \
+ else \
+ result = dcgettext__ ((domainname), (msgid), (category)); \
+ result; \
+ }))
+ # endif
+
+ The interesting thing here is the `__builtin_constant_p' predicate.
+This is evaluated at compile time and so optimization can take place
+immediately. Here two cases are distinguished: the argument to
+`gettext' is not a constant value in which case simply the function
+`dcgettext__' is called, the real implementation of the `dcgettext'
+function.
+
+ If the string argument *is* constant we can reuse the once gained
+translation when the locale selection has not changed. This is exactly
+what is done here. The `_nl_msg_cat_cntr' variable is defined in the
+`loadmsgcat.c' which is available in `libintl.a' and is changed
+whenever a new message catalog is loaded.
+
+
+File: gettext.info, Node: Comparison, Next: Using libintl.a, Prev: gettext, Up: Programmers
+
+Comparing the Two Interfaces
+============================
+
+ The following discussion is perhaps a little bit colored. As said
+above we implemented GNU `gettext' following the Uniforum proposal and
+this surely has its reasons. But it should show how we came to this
+decision.
+
+ First we take a look at the developing process. When we write an
+application using NLS provided by `gettext' we proceed as always. Only
+when we come to a string which might be seen by the users and thus has
+to be translated we use `gettext("...")' instead of `"..."'. At the
+beginning of each source file (or in a central header file) we define
+
+ #define gettext(String) (String)
+
+ Even this definition can be avoided when the system supports the
+`gettext' function in its C library. When we compile this code the
+result is the same as if no NLS code is used. When you take a look at
+the GNU `gettext' code you will see that we use `_("...")' instead of
+`gettext("...")'. This reduces the number of additional characters per
+translatable string to *3* (in words: three).
+
+ When now a production version of the program is needed we simply
+replace the definition
+
+ #define _(String) (String)
+
+by
+
+ #include <libintl.h>
+ #define _(String) gettext (String)
+
+Additionally we run the program `xgettext' on all source code file
+which contain translatable strings and that's it: we have a running
+program which does not depend on translations to be available, but which
+can use any that becomes available.
+
+ The same procedure can be done for the `gettext_noop' invocations
+(*note Special cases::.). First you can define `gettext_noop' to a
+no-op macro and later use the definition from `libintl.h'. Because
+this name is not used in Suns implementation of `libintl.h', you should
+consider the following code for your project:
+
+ #ifdef gettext_noop
+ # define N_(String) gettext_noop (String)
+ #else
+ # define N_(String) (String)
+ #endif
+
+ `N_' is a short form similar to `_'. The `Makefile' in the `po/'
+directory of GNU `gettext' knows by default both of the mentioned short
+forms so you are invited to follow this proposal for your own ease.
+
+ Now to `catgets'. The main problem is the work for the programmer.
+Every time he comes to a translatable string he has to define a number
+(or a symbolic constant) which has also be defined in the message
+catalog file. He also has to take care for duplicate entries,
+duplicate message IDs etc. If he wants to have the same quality in the
+message catalog as the GNU `gettext' program provides he also has to
+put the descriptive comments for the strings and the location in all
+source code files in the message catalog. This is nearly a Mission:
+Impossible.
+
+ But there are also some points people might call advantages speaking
+for `catgets'. If you have a single word in a string and this string
+is used in different contexts it is likely that in one or the other
+language the word has different translations. Example:
+
+ printf ("%s: %d", gettext ("number"), number_of_errors)
+
+ printf ("you should see %d %s", number_count,
+ number_count == 1 ? gettext ("number") : gettext ("numbers"))
+
+ Here we have to translate two times the string `"number"'. Even if
+you do not speak a language beside English it might be possible to
+recognize that the two words have a different meaning. In German the
+first appearance has to be translated to `"Anzahl"' and the second to
+`"Zahl"'.
+
+ Now you can say that this example is really esoteric. And you are
+right! This is exactly how we felt about this problem and decide that
+it does not weight that much. The solution for the above problem could
+be very easy:
+
+ printf ("%s %d", gettext ("number:"), number_of_errors)
+
+ printf (number_count == 1 ? gettext ("you should see %d number")
+ : gettext ("you should see %d numbers"),
+ number_count)
+
+ We believe that we can solve all conflicts with this method. If it
+is difficult one can also consider changing one of the conflicting
+string a little bit. But it is not impossible to overcome.
+
+ Translator note: It is perhaps appropriate here to tell those English
+speaking programmers that the plural form of a noun cannot be formed by
+appending a single `s'. Most other languages use different methods.
+Even the above form is not general enough to cope with all languages.
+Rafal Maszkowski <rzm@mat.uni.torun.pl> reports:
+
+ In Polish we use e.g. plik (file) this way:
+ 1 plik
+ 2,3,4 pliki
+ 5-21 pliko'w
+ 22-24 pliki
+ 25-31 pliko'w
+ and so on (o' means 8859-2 oacute which should be rather okreska,
+ similar to aogonek).
+
+ A workable approach might be to consider methods like the one used
+for `LC_TIME' in the POSIX.2 standard. The value of the `alt_digits'
+field can be up to 100 strings which represent the numbers 1 to 100.
+Using this in a situation of an internationalized program means that an
+array of translatable strings should be indexed by the number which
+should represent. A small example:
+
+ void
+ print_month_info (int month)
+ {
+ const char *month_pos[12] =
+ { N_("first"), N_("second"), N_("third"), N_("fourth"),
+ N_("fifth"), N_("sixth"), N_("seventh"), N_("eighth"),
+ N_("ninth"), N_("tenth"), N_("eleventh"), N_("twelfth") };
+ printf (_("%s is the %s month\n"), nl_langinfo (MON_1 + month),
+ _(month_pos[month]));
+ }
+
+It should be obvious that this method is only reasonable for small
+ranges of numbers.
+
+
+File: gettext.info, Node: Using libintl.a, Next: gettext grok, Prev: Comparison, Up: Programmers
+
+Using libintl.a in own programs
+===============================
+
+ Starting with version 0.9.4 the library `libintl.h' should be
+self-contained. I.e., you can use it in your own programs without
+providing additional functions. The `Makefile' will put the header and
+the library in directories selected using the `$(prefix)'.
+
+ One exception of the above is found on HP-UX systems. Here the C
+library does not contain the `alloca' function (and the HP compiler does
+not generate it inlined). But it is not intended to rewrite the whole
+library just because of this dumb system. Instead include the `alloca'
+function in all package you use the `libintl.a' in.
+
+
+File: gettext.info, Node: gettext grok, Next: Temp Programmers, Prev: Using libintl.a, Up: Programmers
+
+Being a `gettext' grok
+======================
+
+ To fully exploit the functionality of the GNU `gettext' library it
+is surely helpful to read the source code. But for those who don't want
+to spend that much time in reading the (sometimes complicated) code here
+is a list comments:
+
+ * Changing the language at runtime
+
+ For interactive programs it might be useful to offer a selection
+ of the used language at runtime. To understand how to do this one
+ need to know how the used language is determined while executing
+ the `gettext' function. The method which is presented here only
+ works correctly with the GNU implementation of the `gettext'
+ functions. It is not possible with underlying `catgets' functions
+ or `gettext' functions from the systems C library. The exception
+ is of course the GNU C Library which uses the GNU `gettext'
+ Library for message handling.
+
+ In the function `dcgettext' at every call the current setting of
+ the highest priority environment variable is determined and used.
+ Highest priority means here the following list with decreasing
+ priority:
+
+ 1. `LANGUAGE'
+
+ 2. `LC_ALL'
+
+ 3. `LC_xxx', according to selected locale
+
+ 4. `LANG'
+
+ Afterwards the path is constructed using the found value and the
+ translation file is loaded if available.
+
+ What is now when the value for, say, `LANGUAGE' changes. According
+ to the process explained above the new value of this variable is
+ found as soon as the `dcgettext' function is called. But this
+ also means the (perhaps) different message catalog file is loaded.
+ In other words: the used language is changed.
+
+ But there is one little hook. The code for gcc-2.7.0 and up
+ provides some optimization. This optimization normally prevents
+ the calling of the `dcgettext' function as long as no new catalog
+ is loaded. But if `dcgettext' is not called the program also
+ cannot find the `LANGUAGE' variable be changed (*note Optimized
+ gettext::.). A solution for this is very easy. Include the
+ following code in the language switching function.
+
+ /* Change language. */
+ setenv ("LANGUAGE", "fr", 1);
+
+ /* Make change known. */
+ {
+ extern int _nl_msg_cat_cntr;
+ ++_nl_msg_cat_cntr;
+ }
+
+ The variable `_nl_msg_cat_cntr' is defined in `loadmsgcat.c'. The
+ programmer will find himself in need for a construct like this only
+ when developing programs which do run longer and provide the user
+ to select the language at runtime. Non-interactive programs (like
+ all these little Unix tools) should never need this.
+
+
+File: gettext.info, Node: Temp Programmers, Prev: gettext grok, Up: Programmers
+
+Temporary Notes for the Programmers Chapter
+===========================================
+
+* Menu:
+
+* Temp Implementations:: Temporary - Two Possible Implementations
+* Temp catgets:: Temporary - About `catgets'
+* Temp WSI:: Temporary - Why a single implementation
+* Temp Notes:: Temporary - Notes
+
+
+File: gettext.info, Node: Temp Implementations, Next: Temp catgets, Prev: Temp Programmers, Up: Temp Programmers
+
+Temporary - Two Possible Implementations
+----------------------------------------
+
+ There are two competing methods for language independent messages:
+the X/Open `catgets' method, and the Uniforum `gettext' method. The
+`catgets' method indexes messages by integers; the `gettext' method
+indexes them by their English translations. The `catgets' method has
+been around longer and is supported by more vendors. The `gettext'
+method is supported by Sun, and it has been heard that the COSE
+multi-vendor initiative is supporting it. Neither method is a POSIX
+standard; the POSIX.1 committee had a lot of disagreement in this area.
+
+ Neither one is in the POSIX standard. There was much disagreement
+in the POSIX.1 committee about using the `gettext' routines vs.
+`catgets' (XPG). In the end the committee couldn't agree on anything,
+so no messaging system was included as part of the standard. I believe
+the informative annex of the standard includes the XPG3 messaging
+interfaces, "...as an example of a messaging system that has been
+implemented..."
+
+ They were very careful not to say anywhere that you should use one
+set of interfaces over the other. For more on this topic please see
+the Programming for Internationalization FAQ.
+
+
+File: gettext.info, Node: Temp catgets, Next: Temp WSI, Prev: Temp Implementations, Up: Temp Programmers
+
+Temporary - About `catgets'
+---------------------------
+
+ There have been a few discussions of late on the use of `catgets' as
+a base. I think it important to present both sides of the argument and
+hence am opting to play devil's advocate for a little bit.
+
+ I'll not deny the fact that `catgets' could have been designed a lot
+better. It currently has quite a number of limitations and these have
+already been pointed out.
+
+ However there is a great deal to be said for consistency and
+standardization. A common recurring problem when writing Unix software
+is the myriad portability problems across Unix platforms. It seems as
+if every Unix vendor had a look at the operating system and found parts
+they could improve upon. Undoubtedly, these modifications are probably
+innovative and solve real problems. However, software developers have
+a hard time keeping up with all these changes across so many platforms.
+
+ And this has prompted the Unix vendors to begin to standardize their
+systems. Hence the impetus for Spec1170. Every major Unix vendor has
+committed to supporting this standard and every Unix software developer
+waits with glee the day they can write software to this standard and
+simply recompile (without having to use autoconf) across different
+platforms.
+
+ As I understand it, Spec1170 is roughly based upon version 4 of the
+X/Open Portability Guidelines (XPG4). Because `catgets' and friends
+are defined in XPG4, I'm led to believe that `catgets' is a part of
+Spec1170 and hence will become a standardized component of all Unix
+systems.
+
+
+File: gettext.info, Node: Temp WSI, Next: Temp Notes, Prev: Temp catgets, Up: Temp Programmers
+
+Temporary - Why a single implementation
+---------------------------------------
+
+ Now it seems kind of wasteful to me to have two different systems
+installed for accessing message catalogs. If we do want to remedy
+`catgets' deficiencies why don't we try to expand `catgets' (in a
+compatible manner) rather than implement an entirely new system.
+Otherwise, we'll end up with two message catalog access systems
+installed with an operating system - one set of routines for packages
+using GNU `gettext' for their internationalization, and another set of
+routines (catgets) for all other software. Bloated?
+
+ Supposing another catalog access system is implemented. Which do we
+recommend? At least for Linux, we need to attract as many software
+developers as possible. Hence we need to make it as easy for them to
+port their software as possible. Which means supporting `catgets'. We
+will be implementing the `glocale' code within our `libc', but does
+this mean we also have to incorporate another message catalog access
+scheme within our `libc' as well? And what about people who are going
+to be using the `glocale' + non-`catgets' routines. When they port
+their software to other platforms, they're now going to have to include
+the front-end (`glocale') code plus the back-end code (the non-`catgets'
+access routines) with their software instead of just including the
+`glocale' code with their software.
+
+ Message catalog support is however only the tip of the iceberg.
+What about the data for the other locale categories. They also have a
+number of deficiencies. Are we going to abandon them as well and
+develop another duplicate set of routines (should `glocale' expand
+beyond message catalog support)?
+
+ Like many parts of Unix that can be improved upon, we're stuck with
+balancing compatibility with the past with useful improvements and
+innovations for the future.
+
+
+File: gettext.info, Node: Temp Notes, Prev: Temp WSI, Up: Temp Programmers
+
+Temporary - Notes
+-----------------
+
+ X/Open agreed very late on the standard form so that many
+implementations differ from the final form. Both of my system (old
+Linux catgets and Ultrix-4) have a strange variation.
+
+ OK. After incorporating the last changes I have to spend some time
+on making the GNU/Linux `libc' `gettext' functions. So in future
+Solaris is not the only system having `gettext'.
+
+
+File: gettext.info, Node: Translators, Next: Maintainers, Prev: Programmers, Up: Top
+
+The Translator's View
+*********************
+
+* Menu:
+
+* Trans Intro 0:: Introduction 0
+* Trans Intro 1:: Introduction 1
+* Discussions:: Discussions
+* Organization:: Organization
+* Information Flow:: Information Flow
+
+
+File: gettext.info, Node: Trans Intro 0, Next: Trans Intro 1, Prev: Translators, Up: Translators
+
+Introduction 0
+==============
+
+ Free software is going international! The Translation Project is a
+way to get maintainers, translators and users all together, so free
+software will gradually become able to speak many native languages.
+
+ The GNU `gettext' tool set contains *everything* maintainers need
+for internationalizing their packages for messages. It also contains
+quite useful tools for helping translators at localizing messages to
+their native language, once a package has already been
+internationalized.
+
+ To achieve the Translation Project, we need many interested people
+who like their own language and write it well, and who are also able to
+synergize with other translators speaking the same language. If you'd
+like to volunteer to *work* at translating messages, please send mail
+to your translating team.
+
+ Each team has its own mailing list, courtesy of Linux International.
+You may reach your translating team at the address `LL@li.org',
+replacing LL by the two-letter ISO 639 code for your language.
+Language codes are *not* the same as country codes given in ISO 3166.
+The following translating teams exist:
+
+ Chinese `zh', Czech `cs', Danish `da', Dutch `nl', Esperanto `eo',
+ Finnish `fi', French `fr', Irish `ga', German `de', Greek `el',
+ Italian `it', Japanese `ja', Indonesian `in', Norwegian `no',
+ Polish `pl', Portuguese `pt', Russian `ru', Spanish `es', Swedish
+ `sv' and Turkish `tr'.
+
+For example, you may reach the Chinese translating team by writing to
+`zh@li.org'. When you become a member of the translating team for your
+own language, you may subscribe to its list. For example, Swedish
+people can send a message to `sv-request@li.org', having this message
+body:
+
+ subscribe
+
+ Keep in mind that team members should be interested in *working* at
+translations, or at solving translational difficulties, rather than
+merely lurking around. If your team does not exist yet and you want to
+start one, please write to `translation@iro.umontreal.ca'; you will
+then reach the coordinator for all translator teams.
+
+ A handful of GNU packages have already been adapted and provided
+with message translations for several languages. Translation teams
+have begun to organize, using these packages as a starting point. But
+there are many more packages and many languages for which we have no
+volunteer translators. If you would like to volunteer to work at
+translating messages, please send mail to
+`translation@iro.umontreal.ca' indicating what language(s) you can work
+on.
+
+
+File: gettext.info, Node: Trans Intro 1, Next: Discussions, Prev: Trans Intro 0, Up: Translators
+
+Introduction 1
+==============
+
+ This is now official, GNU is going international! Here is the
+announcement submitted for the January 1995 GNU Bulletin:
+
+ A handful of GNU packages have already been adapted and provided
+ with message translations for several languages. Translation
+ teams have begun to organize, using these packages as a starting
+ point. But there are many more packages and many languages for
+ which we have no volunteer translators. If you'd like to
+ volunteer to work at translating messages, please send mail to
+ `translation@iro.umontreal.ca' indicating what language(s) you can
+ work on.
+
+ This document should answer many questions for those who are curious
+about the process or would like to contribute. Please at least skim
+over it, hoping to cut down a little of the high volume of e-mail
+generated by this collective effort towards internationalization of
+free software.
+
+ Most free programming which is widely shared is done in English, and
+currently, English is used as the main communicating language between
+national communities collaborating to free software. This very document
+is written in English. This will not change in the foreseeable future.
+
+ However, there is a strong appetite from national communities for
+having more software able to write using national language and habits,
+and there is an on-going effort to modify free software in such a way
+that it becomes able to do so. The experiments driven so far raised an
+enthusiastic response from pretesters, so we believe that
+internationalization of free software is dedicated to succeed.
+
+ For suggestion clarifications, additions or corrections to this
+document, please e-mail to `translation@iro.umontreal.ca'.
+
+
+File: gettext.info, Node: Discussions, Next: Organization, Prev: Trans Intro 1, Up: Translators
+
+Discussions
+===========
+
+ Facing this internationalization effort, a few users expressed their
+concerns. Some of these doubts are presented and discussed, here.
+
+ * Smaller groups
+
+ Some languages are not spoken by a very large number of people, so
+ people speaking them sometimes consider that there may not be all
+ that much demand such versions of free software packages.
+ Moreover, many people being *into computers*, in some countries,
+ generally seem to prefer English versions of their software.
+
+ On the other end, people might enjoy their own language a lot, and
+ be very motivated at providing to themselves the pleasure of
+ having their beloved free software speaking their mother tongue.
+ They do themselves a personal favor, and do not pay that much
+ attention to the number of people beneficiating of their work.
+
+ * Misinterpretation
+
+ Other users are shy to push forward their own language, seeing in
+ this some kind of misplaced propaganda. Someone thought there
+ must be some users of the language over the networks pestering
+ other people with it.
+
+ But any spoken language is worth localization, because there are
+ people behind the language for whom the language is important and
+ dear to their hearts.
+
+ * Odd translations
+
+ The biggest problem is to find the right translations so that
+ everybody can understand the messages. Translations are usually a
+ little odd. Some people get used to English, to the extent they
+ may find translations into their own language "rather pushy,
+ obnoxious and sometimes even hilarious." As a French speaking
+ man, I have the experience of those instruction manuals for goods,
+ so poorly translated in French in Korea or Taiwan...
+
+ The fact is that we sometimes have to create a kind of national
+ computer culture, and this is not easy without the collaboration of
+ many people liking their mother tongue. This is why translations
+ are better achieved by people knowing and loving their own
+ language, and ready to work together at improving the results they
+ obtain.
+
+ * Dependencies over the GPL
+
+ Some people wonder if using GNU `gettext' necessarily brings their
+ package under the protective wing of the GNU General Public
+ License, when they do not want to make their program free, or want
+ other kinds of freedom. The simplest answer is yes.
+
+ The mere marking of localizable strings in a package, or
+ conditional inclusion of a few lines for initialization, is not
+ really including GPL'ed code. However, the localization routines
+ themselves are under the GPL and would bring the remainder of the
+ package under the GPL if they were distributed with it. So, I
+ presume that, for those for which this is a problem, it could be
+ circumvented by letting to the end installers the burden of
+ assembling a package prepared for localization, but not providing
+ the localization routines themselves.
+
+
+File: gettext.info, Node: Organization, Next: Information Flow, Prev: Discussions, Up: Translators
+
+Organization
+============
+
+ On a larger scale, the true solution would be to organize some kind
+of fairly precise set up in which volunteers could participate. I gave
+some thought to this idea lately, and realize there will be some touchy
+points. I thought of writing to Richard Stallman to launch such a
+project, but feel it might be good to shake out the ideas between
+ourselves first. Most probably that Linux International has some
+experience in the field already, or would like to orchestrate the
+volunteer work, maybe. Food for thought, in any case!
+
+ I guess we have to setup something early, somehow, that will help
+many possible contributors of the same language to interlock and avoid
+work duplication, and further be put in contact for solving together
+problems particular to their tongue (in most languages, there are many
+difficulties peculiar to translating technical English). My Swedish
+contributor acknowledged these difficulties, and I'm well aware of them
+for French.
+
+ This is surely not a technical issue, but we should manage so the
+effort of locale contributors be maximally useful, despite the national
+team layer interface between contributors and maintainers.
+
+ The Translation Project needs some setup for coordinating language
+coordinators. Localizing evolving programs will surely become a
+permanent and continuous activity in the free software community, once
+well started. The setup should be minimally completed and tested
+before GNU `gettext' becomes an official reality. The e-mail address
+`translation@iro.umontreal.ca' has been setup for receiving offers from
+volunteers and general e-mail on these topics. This address reaches
+the Translation Project coordinator.
+
+* Menu:
+
+* Central Coordination:: Central Coordination
+* National Teams:: National Teams
+* Mailing Lists:: Mailing Lists
+
+
+File: gettext.info, Node: Central Coordination, Next: National Teams, Prev: Organization, Up: Organization
+
+Central Coordination
+--------------------
+
+ I also think GNU will need sooner than it thinks, that someone setup
+a way to organize and coordinate these groups. Some kind of group of
+groups. My opinion is that it would be good that GNU delegates this
+task to a small group of collaborating volunteers, shortly. Perhaps in
+`gnu.announce' a list of this national committee's can be published.
+
+ My role as coordinator would simply be to refer to Ulrich any German
+speaking volunteer interested to localization of free software
+packages, and maybe helping national groups to initially organize,
+while maintaining national registries for until national groups are
+ready to take over. In fact, the coordinator should ease volunteers to
+get in contact with one another for creating national teams, which
+should then select one coordinator per language, or country
+(regionalized language). If well done, the coordination should be
+useful without being an overwhelming task, the time to put delegations
+in place.
+
+
+File: gettext.info, Node: National Teams, Next: Mailing Lists, Prev: Central Coordination, Up: Organization
+
+National Teams
+--------------
+
+ I suggest we look for volunteer coordinators/editors for individual
+languages. These people will scan contributions of translation files
+for various programs, for their own languages, and will ensure high and
+uniform standards of diction.
+
+ From my current experience with other people in these days, those who
+provide localizations are very enthusiastic about the process, and are
+more interested in the localization process than in the program they
+localize, and want to do many programs, not just one. This seems to
+confirm that having a coordinator/editor for each language is a good
+idea.
+
+ We need to choose someone who is good at writing clear and concise
+prose in the language in question. That is hard--we can't check it
+ourselves. So we need to ask a few people to judge each others'
+writing and select the one who is best.
+
+ I announce my prerelease to a few dozen people, and you would not
+believe all the discussions it generated already. I shudder to think
+what will happen when this will be launched, for true, officially,
+world wide. Who am I to arbitrate between two Czekolsovak users
+contradicting each other, for example?
+
+ I assume that your German is not much better than my French so that
+I would not be able to judge about these formulations. What I would
+suggest is that for each language there is a group for people who
+maintain the PO files and judge about changes. I suspect there will be
+cultural differences between how such groups of people will behave.
+Some will have relaxed ways, reach consensus easily, and have anyone of
+the group relate to the maintainers, while others will fight to death,
+organize heavy administrations up to national standards, and use strict
+channels.
+
+ The German team is putting out a good example. Right now, they are
+maybe half a dozen people revising translations of each other and
+discussing the linguistic issues. I do not even have all the names.
+Ulrich Drepper is taking care of coordinating the German team. He
+subscribed to all my pretest lists, so I do not even have to warn him
+specifically of incoming releases.
+
+ I'm sure, that is a good idea to get teams for each language working
+on translations. That will make the translations better and more
+consistent.
+
+* Menu:
+
+* Sub-Cultures:: Sub-Cultures
+* Organizational Ideas:: Organizational Ideas
+
+
+File: gettext.info, Node: Sub-Cultures, Next: Organizational Ideas, Prev: National Teams, Up: National Teams
+
+Sub-Cultures
+............
+
+ Taking French for example, there are a few sub-cultures around
+computers which developed diverging vocabularies. Picking volunteers
+here and there without addressing this problem in an organized way,
+soon in the project, might produce a distasteful mix of
+internationalized programs, and possibly trigger endless quarrels among
+those who really care.
+
+ Keeping some kind of unity in the way French localization of
+internationalized programs is achieved is a difficult (and delicate)
+job. Knowing the latin character of French people (:-), if we take this
+the wrong way, we could end up nowhere, or spoil a lot of energies.
+Maybe we should begin to address this problem seriously *before* GNU
+`gettext' become officially published. And I suspect that this means
+soon!
+
+
+File: gettext.info, Node: Organizational Ideas, Prev: Sub-Cultures, Up: National Teams
+
+Organizational Ideas
+....................
+
+ I expect the next big changes after the official release. Please
+note that I use the German translation of the short GPL message. We
+need to set a few good examples before the localization goes out for
+true in the free software community. Here are a few points to discuss:
+
+ * Each group should have one FTP server (at least one master).
+
+ * The files on the server should reflect the latest version (of
+ course!) and it should also contain a RCS directory with the
+ corresponding archives (I don't have this now).
+
+ * There should also be a ChangeLog file (this is more useful than the
+ RCS archive but can be generated automatically from the later by
+ Emacs).
+
+ * A "core group" should judge about questionable changes (for now
+ this group consists solely by me but I ask some others
+ occasionally; this also seems to work).
+
+
+File: gettext.info, Node: Mailing Lists, Prev: National Teams, Up: Organization
+
+Mailing Lists
+-------------
+
+ If we get any inquiries about GNU `gettext', send them on to:
+
+ `translation@iro.umontreal.ca'
+
+ The `*-pretest' lists are quite useful to me, maybe the idea could
+be generalized to many GNU, and non-GNU packages. But each maintainer
+his/her way!
+
+ Franc,ois, we have a mechanism in place here at `gnu.ai.mit.edu' to
+track teams, support mailing lists for them and log members. We have a
+slight preference that you use it. If this is OK with you, I can get
+you clued in.
+
+ Things are changing! A few years ago, when Daniel Fekete and I
+asked for a mailing list for GNU localization, nested at the FSF, we
+were politely invited to organize it anywhere else, and so did we. For
+communicating with my pretesters, I later made a handful of mailing
+lists located at iro.umontreal.ca and administrated by `majordomo'.
+These lists have been *very* dependable so far...
+
+ I suspect that the German team will organize itself a mailing list
+located in Germany, and so forth for other countries. But before they
+organize for true, it could surely be useful to offer mailing lists
+located at the FSF to each national team. So yes, please explain me
+how I should proceed to create and handle them.
+
+ We should create temporary mailing lists, one per country, to help
+people organize. Temporary, because once regrouped and structured, it
+would be fair the volunteers from country bring back *their* list in
+there and manage it as they want. My feeling is that, in the long run,
+each team should run its own list, from within their country. There
+also should be some central list to which all teams could subscribe as
+they see fit, as long as each team is represented in it.
+
+
+File: gettext.info, Node: Information Flow, Prev: Organization, Up: Translators
+
+Information Flow
+================
+
+ There will surely be some discussion about this messages after the
+packages are finally released. If people now send you some proposals
+for better messages, how do you proceed? Jim, please note that right
+now, as I put forward nearly a dozen of localizable programs, I receive
+both the translations and the coordination concerns about them.
+
+ If I put one of my things to pretest, Ulrich receives the
+announcement and passes it on to the German team, who make last minute
+revisions. Then he submits the translation files to me *as the
+maintainer*. For free packages I do not maintain, I would not even
+hear about it. This scheme could be made to work for the whole
+Translation Project, I think. For security reasons, maybe Ulrich
+(national coordinators, in fact) should update central registry kept at
+the Translation Project (Jim, me, or Len's recruits) once in a while.
+
+ In December/January, I was aggressively ready to internationalize
+all of GNU, giving myself the duty of one small GNU package per week or
+so, taking many weeks or months for bigger packages. But it does not
+work this way. I first did all the things I'm responsible for. I've
+nothing against some missionary work on other maintainers, but I'm also
+loosing a lot of energy over it--same debates over again.
+
+ And when the first localized packages are released we'll get a lot of
+responses about ugly translations :-). Surely, and we need to have
+beforehand a fairly good idea about how to handle the information flow
+between the national teams and the package maintainers.
+
+ Please start saving somewhere a quick history of each PO file. I
+know for sure that the file format will change, allowing for comments.
+It would be nice that each file has a kind of log, and references for
+those who want to submit comments or gripes, or otherwise contribute.
+I sent a proposal for a fast and flexible format, but it is not
+receiving acceptance yet by the GNU deciders. I'll tell you when I
+have more information about this.
+
+
+File: gettext.info, Node: Maintainers, Next: Conclusion, Prev: Translators, Up: Top
+
+The Maintainer's View
+*********************
+
+ The maintainer of a package has many responsibilities. One of them
+is ensuring that the package will install easily on many platforms, and
+that the magic we described earlier (*note Users::.) will work for
+installers and end users.
+
+ Of course, there are many possible ways by which GNU `gettext' might
+be integrated in a distribution, and this chapter does not cover them
+in all generality. Instead, it details one possible approach which is
+especially adequate for many free software distributions following GNU
+standards, or even better, Gnits standards, because GNU `gettext' is
+purposely for helping the internationalization of the whole GNU
+project, and as many other good free packages as possible. So, the
+maintainer's view presented here presumes that the package already has
+a `configure.in' file and uses GNU Autoconf.
+
+ Nevertheless, GNU `gettext' may surely be useful for free packages
+not following GNU standards and conventions, but the maintainers of such
+packages might have to show imagination and initiative in organizing
+their distributions so `gettext' work for them in all situations.
+There are surely many, out there.
+
+ Even if `gettext' methods are now stabilizing, slight adjustments
+might be needed between successive `gettext' versions, so you should
+ideally revise this chapter in subsequent releases, looking for changes.
+
+* Menu:
+
+* Flat and Non-Flat:: Flat or Non-Flat Directory Structures
+* Prerequisites:: Prerequisite Works
+* gettextize Invocation:: Invoking the `gettextize' Program
+* Adjusting Files:: Files You Must Create or Alter
+
+
+File: gettext.info, Node: Flat and Non-Flat, Next: Prerequisites, Prev: Maintainers, Up: Maintainers
+
+Flat or Non-Flat Directory Structures
+=====================================
+
+ Some free software packages are distributed as `tar' files which
+unpack in a single directory, these are said to be "flat" distributions.
+Other free software packages have a one level hierarchy of
+subdirectories, using for example a subdirectory named `doc/' for the
+Texinfo manual and man pages, another called `lib/' for holding
+functions meant to replace or complement C libraries, and a
+subdirectory `src/' for holding the proper sources for the package.
+These other distributions are said to be "non-flat".
+
+ For now, we cannot say much about flat distributions. A flat
+directory structure has the disadvantage of increasing the difficulty
+of updating to a new version of GNU `gettext'. Also, if you have many
+PO files, this could somewhat pollute your single directory. In the
+GNU `gettext' distribution, the `misc/' directory contains a shell
+script named `combine-sh'. That script may be used for combining all
+the C files of the `intl/' directory into a pair of C files (one `.c'
+and one `.h'). Those two generated files would fit more easily in a
+flat directory structure, and you will then have to add these two files
+to your project.
+
+ Maybe because GNU `gettext' itself has a non-flat structure, we have
+more experience with this approach, and this is what will be described
+in the remaining of this chapter. Some maintainers might use this as
+an opportunity to unflatten their package structure. Only later, once
+gained more experience adapting GNU `gettext' to flat distributions, we
+might add some notes about how to proceed in flat situations.
+
+
+File: gettext.info, Node: Prerequisites, Next: gettextize Invocation, Prev: Flat and Non-Flat, Up: Maintainers
+
+Prerequisite Works
+==================
+
+ There are some works which are required for using GNU `gettext' in
+one of your package. These works have some kind of generality that
+escape the point by point descriptions used in the remainder of this
+chapter. So, we describe them here.
+
+ * Before attempting to use you should install some other packages
+ first. Ensure that recent versions of GNU `m4', GNU Autoconf and
+ GNU `gettext' are already installed at your site, and if not,
+ proceed to do this first. If you got to install these things,
+ beware that GNU `m4' must be fully installed before GNU Autoconf
+ is even *configured*.
+
+ To further ease the task of a package maintainer the `automake'
+ package was designed and implemented. GNU `gettext' now uses this
+ tool and the `Makefile's in the `intl/' and `po/' therefore know
+ about all the goals necessary for using `automake' and `libintl'
+ in one project.
+
+ Those four packages are only needed to you, as a maintainer; the
+ installers of your own package and end users do not really need
+ any of GNU `m4', GNU Autoconf, GNU `gettext', or GNU `automake'
+ for successfully installing and running your package, with messages
+ properly translated. But this is not completely true if you
+ provide internationalized shell scripts within your own package:
+ GNU `gettext' shall then be installed at the user site if the end
+ users want to see the translation of shell script messages.
+
+ * Your package should use Autoconf and have a `configure.in' file.
+ If it does not, you have to learn how. The Autoconf documentation
+ is quite well written, it is a good idea that you print it and get
+ familiar with it.
+
+ * Your C sources should have already been modified according to
+ instructions given earlier in this manual. *Note Sources::.
+
+ * Your `po/' directory should receive all PO files submitted to you
+ by the translator teams, each having `LL.po' as a name. This is
+ not usually easy to get translation work done before your package
+ gets internationalized and available! Since the cycle has to
+ start somewhere, the easiest for the maintainer is to start with
+ absolutely no PO files, and wait until various translator teams
+ get interested in your package, and submit PO files.
+
+ It is worth adding here a few words about how the maintainer should
+ideally behave with PO files submissions. As a maintainer, your role is
+to authentify the origin of the submission as being the representative
+of the appropriate translating teams of the Translation Project (forward
+the submission to `translation@iro.umontreal.ca' in case of doubt), to
+ensure that the PO file format is not severely broken and does not
+prevent successful installation, and for the rest, to merely to put
+these PO files in `po/' for distribution.
+
+ As a maintainer, you do not have to take on your shoulders the
+responsibility of checking if the translations are adequate or
+complete, and should avoid diving into linguistic matters. Translation
+teams drive themselves and are fully responsible of their linguistic
+choices for the Translation Project. Keep in mind that translator
+teams are *not* driven by maintainers. You can help by carefully
+redirecting all communications and reports from users about linguistic
+matters to the appropriate translation team, or explain users how to
+reach or join their team. The simplest might be to send them the
+`ABOUT-NLS' file.
+
+ Maintainers should *never ever* apply PO file bug reports
+themselves, short-cutting translation teams. If some translator has
+difficulty to get some of her points through her team, it should not be
+an issue for her to directly negotiate translations with maintainers.
+Teams ought to settle their problems themselves, if any. If you, as a
+maintainer, ever think there is a real problem with a team, please
+never try to *solve* a team's problem on your own.
+
+
+File: gettext.info, Node: gettextize Invocation, Next: Adjusting Files, Prev: Prerequisites, Up: Maintainers
+
+Invoking the `gettextize' Program
+=================================
+
+ Some files are consistently and identically needed in every package
+internationalized through GNU `gettext'. As a matter of convenience,
+the `gettextize' program puts all these files right in your package.
+This program has the following synopsis:
+
+ gettextize [ OPTION... ] [ DIRECTORY ]
+
+and accepts the following options:
+
+`-c'
+`--copy'
+ Copy the needed files instead of making symbolic links. Using
+ links would allow the package to always use the latest `gettext'
+ code available on the system, but it might disturb some mechanism
+ the maintainer is used to apply to the sources. Because running
+ `gettextize' is easy there shouldn't be problems with using copies.
+
+`-f'
+`--force'
+ Force replacement of files which already exist.
+
+`-h'
+`--help'
+ Display this help and exit.
+
+`--version'
+ Output version information and exit.
+
+ If DIRECTORY is given, this is the top level directory of a package
+to prepare for using GNU `gettext'. If not given, it is assumed that
+the current directory is the top level directory of such a package.
+
+ The program `gettextize' provides the following files. However, no
+existing file will be replaced unless the option `--force' (`-f') is
+specified.
+
+ 1. The `ABOUT-NLS' file is copied in the main directory of your
+ package, the one being at the top level. This file gives the main
+ indications about how to install and use the Native Language
+ Support features of your program. You might elect to use a more
+ recent copy of this `ABOUT-NLS' file than the one provided through
+ `gettextize', if you have one handy. You may also fetch a more
+ recent copy of file `ABOUT-NLS' from Translation Project sites,
+ and from most GNU archive sites.
+
+ 2. A `po/' directory is created for eventually holding all
+ translation files, but initially only containing the file
+ `po/Makefile.in.in' from the GNU `gettext' distribution. (beware
+ the double `.in' in the file name). If the `po/' directory already
+ exists, it will be preserved along with the files it contains, and
+ only `Makefile.in.in' will be overwritten.
+
+ 3. A `intl/' directory is created and filled with most of the files
+ originally in the `intl/' directory of the GNU `gettext'
+ distribution. Also, if option `--force' (`-f') is given, the
+ `intl/' directory is emptied first.
+
+
+ If your site support symbolic links, `gettextize' will not actually
+copy the files into your package, but establish symbolic links instead.
+This avoids duplicating the disk space needed in all packages. Merely
+using the `-h' option while creating the `tar' archive of your
+distribution will resolve each link by an actual copy in the
+distribution archive. So, to insist, you really should use `-h' option
+with `tar' within your `dist' goal of your main `Makefile.in'.
+
+ It is interesting to understand that most new files for supporting
+GNU `gettext' facilities in one package go in `intl/' and `po/'
+subdirectories. One distinction between these two directories is that
+`intl/' is meant to be completely identical in all packages using GNU
+`gettext', while all newly created files, which have to be different,
+go into `po/'. There is a common `Makefile.in.in' in `po/', because
+the `po/' directory needs its own `Makefile', and it has been designed
+so it can be identical in all packages.
+
diff --git a/doc/gettext.info-5 b/doc/gettext.info-5
new file mode 100644
index 0000000..0279fa5
--- /dev/null
+++ b/doc/gettext.info-5
@@ -0,0 +1,852 @@
+This is Info file gettext.info, produced by Makeinfo version 1.68 from
+the input file gettext.texi.
+
+INFO-DIR-SECTION GNU Gettext Utilities
+START-INFO-DIR-ENTRY
+* Gettext: (gettext). GNU gettext utilities.
+* gettextize: (gettext)gettextize Invocation. Prepare a package for gettext.
+* msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files.
+* msgmerge: (gettext)msgmerge Invocation. Update two PO files into one.
+* xgettext: (gettext)xgettext Invocation. Extract strings into a PO file.
+END-INFO-DIR-ENTRY
+
+ This file provides documentation for GNU `gettext' utilities. It
+also serves as a reference for the free Translation Project.
+
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be stated in a
+translation approved by the Foundation.
+
+
+File: gettext.info, Node: Adjusting Files, Prev: gettextize Invocation, Up: Maintainers
+
+Files You Must Create or Alter
+==============================
+
+ Besides files which are automatically added through `gettextize',
+there are many files needing revision for properly interacting with GNU
+`gettext'. If you are closely following GNU standards for Makefile
+engineering and auto-configuration, the adaptations should be easier to
+achieve. Here is a point by point description of the changes needed in
+each.
+
+ So, here comes a list of files, each one followed by a description of
+all alterations it needs. Many examples are taken out from the GNU
+`gettext' 0.10.36 distribution itself. You may indeed refer to the
+source code of the GNU `gettext' package, as it is intended to be a
+good example and master implementation for using its own functionality.
+
+* Menu:
+
+* po/POTFILES.in:: `POTFILES.in' in `po/'
+* configure.in:: `configure.in' at top level
+* aclocal:: `aclocal.m4' at top level
+* acconfig:: `acconfig.h' at top level
+* Makefile:: `Makefile.in' at top level
+* src/Makefile:: `Makefile.in' in `src/'
+
+
+File: gettext.info, Node: po/POTFILES.in, Next: configure.in, Prev: Adjusting Files, Up: Adjusting Files
+
+`POTFILES.in' in `po/'
+----------------------
+
+ The `po/' directory should receive a file named `POTFILES.in'. This
+file tells which files, among all program sources, have marked strings
+needing translation. Here is an example of such a file:
+
+ # List of source files containing translatable strings.
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # Common library files
+ lib/error.c
+ lib/getopt.c
+ lib/xmalloc.c
+
+ # Package source files
+ src/gettextp.c
+ src/msgfmt.c
+ src/xgettext.c
+
+Dashed comments and white lines are ignored. All other lines list
+those source files containing strings marked for translation (*note
+Mark Keywords::.), in a notation relative to the top level of your
+whole distribution, rather than the location of the `POTFILES.in' file
+itself.
+
+
+File: gettext.info, Node: configure.in, Next: aclocal, Prev: po/POTFILES.in, Up: Adjusting Files
+
+`configure.in' at top level
+---------------------------
+
+ 1. Declare the package and version.
+
+ This is done by a set of lines like these:
+
+ PACKAGE=gettext
+ VERSION=0.10.36
+ AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
+ Of course, you replace `gettext' with the name of your package,
+ and `0.10.36' by its version numbers, exactly as they should
+ appear in the packaged `tar' file name of your distribution
+ (`gettext-0.10.36.tar.gz', here).
+
+ 2. Declare the available translations.
+
+ This is done by defining `ALL_LINGUAS' to the white separated,
+ quoted list of available languages, in a single line, like this:
+
+ ALL_LINGUAS="de fr"
+
+ This example means that German and French PO files are available,
+ so that these languages are currently supported by your package.
+ If you want to further restrict, at installation time, the set of
+ installed languages, this should not be done by modifying
+ `ALL_LINGUAS' in `configure.in', but rather by using the `LINGUAS'
+ environment variable (*note Installers::.).
+
+ 3. Check for internationalization support.
+
+ Here is the main `m4' macro for triggering internationalization
+ support. Just add this line to `configure.in':
+
+ AM_GNU_GETTEXT
+
+ This call is purposely simple, even if it generates a lot of
+ configure time checking and actions.
+
+ 4. Have output files created.
+
+ The `AC_OUTPUT' directive, at the end of your `configure.in' file,
+ needs to be modified in two ways:
+
+ AC_OUTPUT([EXISTING CONFIGURATION FILES intl/Makefile po/Makefile.in],
+ EXISTING ADDITIONAL ACTIONS])
+
+ The modification to the first argument to `AC_OUTPUT' asks for
+ substitution in the `intl/' and `po/' directories. Note the `.in'
+ suffix used for `po/' only. This is because the distributed file
+ is really `po/Makefile.in.in'.
+
+
+
+File: gettext.info, Node: aclocal, Next: acconfig, Prev: configure.in, Up: Adjusting Files
+
+`aclocal.m4' at top level
+-------------------------
+
+ If you do not have an `aclocal.m4' file in your distribution, the
+simplest is taking a copy of `aclocal.m4' from GNU `gettext'. But to
+be precise, you only need macros `AM_LC_MESSAGES', `AM_WITH_NLS' and
+`AM_GNU_GETTEXT', and `AM_PATH_PROG_WITH_TEST', which is called by
+`AM_WITH_NLS', so you may use an editor and remove macros you do not
+need.
+
+ If you already have an `aclocal.m4' file, then you will have to
+merge the said macros into your `aclocal.m4'. Note that if you are
+upgrading from a previous release of GNU `gettext', you should most
+probably *replace* the said macros, as they usually change a little
+from one release of GNU `gettext' to the next. Their contents may vary
+as we get more experience with strange systems out there.
+
+ These macros check for the internationalization support functions
+and related informations. Hopefully, once stabilized, these macros
+might be integrated in the standard Autoconf set, because this piece of
+`m4' code will be the same for all projects using GNU `gettext'.
+
+
+File: gettext.info, Node: acconfig, Next: Makefile, Prev: aclocal, Up: Adjusting Files
+
+`acconfig.h' at top level
+-------------------------
+
+ If you do not have an `acconfig.h' file in your distribution, the
+simplest is use take a copy of `acconfig.h' from GNU `gettext'. But to
+be precise, you only need the lines and comments for `ENABLE_NLS',
+`HAVE_CATGETS', `HAVE_GETTEXT' and `HAVE_LC_MESSAGES', `HAVE_STPCPY',
+`PACKAGE' and `VERSION', so you may use an editor and remove everything
+else. If you already have an `acconfig.h' file, then you should merge
+the said definitions into your `acconfig.h'.
+
+
+File: gettext.info, Node: Makefile, Next: src/Makefile, Prev: acconfig, Up: Adjusting Files
+
+`Makefile.in' at top level
+--------------------------
+
+ Here are a few modifications you need to make to your main, top-level
+`Makefile.in' file.
+
+ 1. Add the following lines near the beginning of your `Makefile.in',
+ so the `dist:' goal will work properly (as explained further down):
+
+ PACKAGE = @PACKAGE@
+ VERSION = @VERSION@
+
+ 2. Add file `ABOUT-NLS' to the `DISTFILES' definition, so the file
+ gets distributed.
+
+ 3. Wherever you process subdirectories in your `Makefile.in', be sure
+ you also process dir subdirectories `intl' and `po'. Special
+ rules in the `Makefiles' take care for the case where no
+ internationalization is wanted.
+
+ If you are using Makefiles, either generated by automake, or
+ hand-written so they carefully follow the GNU coding standards,
+ the effected goals for which the new subdirectories must be
+ handled include `installdirs', `install', `uninstall', `clean',
+ `distclean'.
+
+ Here is an example of a canonical order of processing. In this
+ example, we also define `SUBDIRS' in `Makefile.in' for it to be
+ further used in the `dist:' goal.
+
+ SUBDIRS = doc lib @INTLSUB@ src @POSUB@
+
+ that you will have to adapt to your own package.
+
+ 4. A delicate point is the `dist:' goal, as both `intl/Makefile' and
+ `po/Makefile' will later assume that the proper directory has been
+ set up from the main `Makefile'. Here is an example at what the
+ `dist:' goal might look like:
+
+ distdir = $(PACKAGE)-$(VERSION)
+ dist: Makefile
+ rm -fr $(distdir)
+ mkdir $(distdir)
+ chmod 777 $(distdir)
+ for file in $(DISTFILES); do \
+ ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
+ done
+ for subdir in $(SUBDIRS); do \
+ mkdir $(distdir)/$$subdir || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $@) || exit 1; \
+ done
+ tar chozf $(distdir).tar.gz $(distdir)
+ rm -fr $(distdir)
+
+
+
+File: gettext.info, Node: src/Makefile, Prev: Makefile, Up: Adjusting Files
+
+`Makefile.in' in `src/'
+-----------------------
+
+ Some of the modifications made in the main `Makefile.in' will also
+be needed in the `Makefile.in' from your package sources, which we
+assume here to be in the `src/' subdirectory. Here are all the
+modifications needed in `src/Makefile.in':
+
+ 1. In view of the `dist:' goal, you should have these lines near the
+ beginning of `src/Makefile.in':
+
+ PACKAGE = @PACKAGE@
+ VERSION = @VERSION@
+
+ 2. If not done already, you should guarantee that `top_srcdir' gets
+ defined. This will serve for `cpp' include files. Just add the
+ line:
+
+ top_srcdir = @top_srcdir@
+
+ 3. You might also want to define `subdir' as `src', later allowing
+ for almost uniform `dist:' goals in all your `Makefile.in'. At
+ list, the `dist:' goal below assume that you used:
+
+ subdir = src
+
+ 4. You should ensure that the final linking will use `@INTLLIBS@' as
+ a library. An easy way to achieve this is to manage that it gets
+ into `LIBS', like this:
+
+ LIBS = @INTLLIBS@ @LIBS@
+
+ In most packages internationalized with GNU `gettext', one will
+ find a directory `lib/' in which a library containing some helper
+ functions will be build. (You need at least the few functions
+ which the GNU `gettext' Library itself needs.) However some of
+ the functions in the `lib/' also give messages to the user which
+ of course should be translated, too. Taking care of this it is
+ not enough to place the support library (say `libsupport.a') just
+ between the `@INTLLIBS@' and `@LIBS@' in the above example.
+ Instead one has to write this:
+
+ LIBS = ../lib/libsupport.a @INTLLIBS@ ../lib/libsupport.a @LIBS@
+
+ 5. You should also ensure that directory `intl/' will be searched for
+ C preprocessor include files in all circumstances. So, you have to
+ manage so both `-I../intl' and `-I$(top_srcdir)/intl' will be
+ given to the C compiler.
+
+ 6. Your `dist:' goal has to conform with others. Here is a
+ reasonable definition for it:
+
+ distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+ dist: Makefile $(DISTFILES)
+ for file in $(DISTFILES); do \
+ ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
+ done
+
+
+
+File: gettext.info, Node: Conclusion, Next: Country Codes, Prev: Maintainers, Up: Top
+
+Concluding Remarks
+******************
+
+ We would like to conclude this GNU `gettext' manual by presenting an
+history of the Translation Project so far. We finally give a few
+pointers for those who want to do further research or readings about
+Native Language Support matters.
+
+* Menu:
+
+* History:: History of GNU `gettext'
+* References:: Related Readings
+
+
+File: gettext.info, Node: History, Next: References, Prev: Conclusion, Up: Conclusion
+
+History of GNU `gettext'
+========================
+
+ Internationalization concerns and algorithms have been informally
+and casually discussed for years in GNU, sometimes around GNU `libc',
+maybe around the incoming `Hurd', or otherwise (nobody clearly
+remembers). And even then, when the work started for real, this was
+somewhat independently of these previous discussions.
+
+ This all began in July 1994, when Patrick D'Cruze had the idea and
+initiative of internationalizing version 3.9.2 of GNU `fileutils'. He
+then asked Jim Meyering, the maintainer, how to get those changes
+folded into an official release. That first draft was full of
+`#ifdef's and somewhat disconcerting, and Jim wanted to find nicer
+ways. Patrick and Jim shared some tries and experimentations in this
+area. Then, feeling that this might eventually have a deeper impact on
+GNU, Jim wanted to know what standards were, and contacted Richard
+Stallman, who very quickly and verbally described an overall design for
+what was meant to become `glocale', at that time.
+
+ Jim implemented `glocale' and got a lot of exhausting feedback from
+Patrick and Richard, of course, but also from Mitchum DSouza (who wrote
+a `catgets'-like package), Roland McGrath, maybe David MacKenzie,
+Franc,ois Pinard, and Paul Eggert, all pushing and pulling in various
+directions, not always compatible, to the extent that after a couple of
+test releases, `glocale' was torn apart.
+
+ While Jim took some distance and time and became dad for a second
+time, Roland wanted to get GNU `libc' internationalized, and got Ulrich
+Drepper involved in that project. Instead of starting from `glocale',
+Ulrich rewrote something from scratch, but more conformant to the set
+of guidelines who emerged out of the `glocale' effort. Then, Ulrich
+got people from the previous forum to involve themselves into this new
+project, and the switch from `glocale' to what was first named
+`msgutils', renamed `nlsutils', and later `gettext', became officially
+accepted by Richard in May 1995 or so.
+
+ Let's summarize by saying that Ulrich Drepper wrote GNU `gettext' in
+April 1995. The first official release of the package, including PO
+mode, occurred in July 1995, and was numbered 0.7. Other people
+contributed to the effort by providing a discussion forum around
+Ulrich, writing little pieces of code, or testing. These are quoted in
+the `THANKS' file which comes with the GNU `gettext' distribution.
+
+ While this was being done, Franc,ois adapted half a dozen of GNU
+packages to `glocale' first, then later to `gettext', putting them in
+pretest, so providing along the way an effective user environment for
+fine tuning the evolving tools. He also took the responsibility of
+organizing and coordinating the Translation Project. After nearly a
+year of informal exchanges between people from many countries,
+translator teams started to exist in May 1995, through the creation and
+support by Patrick D'Cruze of twenty unmoderated mailing lists for that
+many native languages, and two moderated lists: one for reaching all
+teams at once, the other for reaching all willing maintainers of
+internationalized free software packages.
+
+ Franc,ois also wrote PO mode in June 1995 with the collaboration of
+Greg McGary, as a kind of contribution to Ulrich's package. He also
+gave a hand with the GNU `gettext' Texinfo manual.
+
+
+File: gettext.info, Node: References, Prev: History, Up: Conclusion
+
+Related Readings
+================
+
+ Eugene H. Dorr (`dorre@well.com') maintains an interesting
+bibliography on internationalization matters, called
+`Internationalization Reference List', which is available as:
+ ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/i18n-books.txt
+
+ Michael Gschwind (`mike@vlsivie.tuwien.ac.at') maintains a
+Frequently Asked Questions (FAQ) list, entitled `Programming for
+Internationalisation'. This FAQ discusses writing programs which can
+handle different language conventions, character sets, etc.; and is
+applicable to all character set encodings, with particular emphasis on
+ISO 8859-1. It is regularly published in Usenet groups
+`comp.unix.questions', `comp.std.internat',
+`comp.software.international', `comp.lang.c', `comp.windows.x',
+`comp.std.c', `comp.answers' and `news.answers'. The home location of
+this document is:
+ ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/ISO-programming
+
+ Patrick D'Cruze (`pdcruze@li.org') wrote a tutorial about NLS
+matters, and Jochen Hein (`Hein@student.tu-clausthal.de') took over the
+responsibility of maintaining it. It may be found as:
+ ftp://sunsite.unc.edu/pub/Linux/utils/nls/catalogs/Incoming/...
+ ...locale-tutorial-0.8.txt.gz
+
+This site is mirrored in:
+ ftp://ftp.ibp.fr/pub/linux/sunsite/
+
+ A French version of the same tutorial should be findable at:
+ ftp://ftp.ibp.fr/pub/linux/french/docs/
+
+together with French translations of many Linux-related documents.
+
+
+File: gettext.info, Node: Country Codes, Prev: Conclusion, Up: Top
+
+Country Codes
+*************
+
+ The ISO 639 standard defines two character codes for many countries.
+All abreviations for countries or languages used in the Translation
+Project should come from this standard.
+
+`aa'
+ Afar.
+
+`ab'
+ Abkhazian.
+
+`af'
+ Afrikaans.
+
+`am'
+ Amharic.
+
+`ar'
+ Arabic.
+
+`as'
+ Assamese.
+
+`ay'
+ Aymara.
+
+`az'
+ Azerbaijani.
+
+`ba'
+ Bashkir.
+
+`be'
+ Byelorussian.
+
+`bg'
+ Bulgarian.
+
+`bh'
+ Bihari.
+
+`bi'
+ Bislama.
+
+`bn'
+ Bengali; Bangla.
+
+`bo'
+ Tibetan.
+
+`br'
+ Breton.
+
+`ca'
+ Catalan.
+
+`co'
+ Corsican.
+
+`cs'
+ Czech.
+
+`cy'
+ Welsh.
+
+`da'
+ Danish.
+
+`de'
+ German.
+
+`dz'
+ Bhutani.
+
+`el'
+ Greek.
+
+`en'
+ English.
+
+`eo'
+ Esperanto.
+
+`es'
+ Spanish.
+
+`et'
+ Estonian.
+
+`eu'
+ Basque.
+
+`fa'
+ Persian.
+
+`fi'
+ Finnish.
+
+`fj'
+ Fiji.
+
+`fo'
+ Faroese.
+
+`fr'
+ French.
+
+`fy'
+ Frisian.
+
+`ga'
+ Irish.
+
+`gd'
+ Scots Gaelic.
+
+`gl'
+ Galician.
+
+`gn'
+ Guarani.
+
+`gu'
+ Gujarati.
+
+`ha'
+ Hausa.
+
+`he'
+ Hebrew (formerly iw).
+
+`hi'
+ Hindi.
+
+`hr'
+ Croatian.
+
+`hu'
+ Hungarian.
+
+`hy'
+ Armenian.
+
+`ia'
+ Interlingua.
+
+`id'
+ Indonesian (formerly in).
+
+`ie'
+ Interlingue.
+
+`ik'
+ Inupiak.
+
+`is'
+ Icelandic.
+
+`it'
+ Italian.
+
+`iu'
+ Inuktitut.
+
+`ja'
+ Japanese.
+
+`jw'
+ Javanese.
+
+`ka'
+ Georgian.
+
+`kk'
+ Kazakh.
+
+`kl'
+ Greenlandic.
+
+`km'
+ Cambodian.
+
+`kn'
+ Kannada.
+
+`ko'
+ Korean.
+
+`ks'
+ Kashmiri.
+
+`ku'
+ Kurdish.
+
+`ky'
+ Kirghiz.
+
+`la'
+ Latin.
+
+`ln'
+ Lingala.
+
+`lo'
+ Laothian.
+
+`lt'
+ Lithuanian.
+
+`lv'
+ Latvian, Lettish.
+
+`mg'
+ Malagasy.
+
+`mi'
+ Maori.
+
+`mk'
+ Macedonian.
+
+`ml'
+ Malayalam.
+
+`mn'
+ Mongolian.
+
+`mo'
+ Moldavian.
+
+`mr'
+ Marathi.
+
+`ms'
+ Malay.
+
+`mt'
+ Maltese.
+
+`my'
+ Burmese.
+
+`na'
+ Nauru.
+
+`ne'
+ Nepali.
+
+`nl'
+ Dutch.
+
+`no'
+ Norwegian.
+
+`oc'
+ Occitan.
+
+`om'
+ (Afan) Oromo.
+
+`or'
+ Oriya.
+
+`pa'
+ Punjabi.
+
+`pl'
+ Polish.
+
+`ps'
+ Pashto, Pushto.
+
+`pt'
+ Portuguese.
+
+`qu'
+ Quechua.
+
+`rm'
+ Rhaeto-Romance.
+
+`rn'
+ Kirundi.
+
+`ro'
+ Romanian.
+
+`ru'
+ Russian.
+
+`rw'
+ Kinyarwanda.
+
+`sa'
+ Sanskrit.
+
+`sd'
+ Sindhi.
+
+`sg'
+ Sangro.
+
+`sh'
+ Serbo-Croatian.
+
+`si'
+ Sinhalese.
+
+`sk'
+ Slovak.
+
+`sl'
+ Slovenian.
+
+`sm'
+ Samoan.
+
+`sn'
+ Shona.
+
+`so'
+ Somali.
+
+`sq'
+ Albanian.
+
+`sr'
+ Serbian.
+
+`ss'
+ Siswati.
+
+`st'
+ Sesotho.
+
+`su'
+ Sundanese.
+
+`sv'
+ Swedish.
+
+`sw'
+ Swahili.
+
+`ta'
+ Tamil.
+
+`te'
+ Telugu.
+
+`tg'
+ Tajik.
+
+`th'
+ Thai.
+
+`ti'
+ Tigrinya.
+
+`tk'
+ Turkmen.
+
+`tl'
+ Tagalog.
+
+`tn'
+ Setswana.
+
+`to'
+ Tonga.
+
+`tr'
+ Turkish.
+
+`ts'
+ Tsonga.
+
+`tt'
+ Tatar.
+
+`tw'
+ Twi.
+
+`ug'
+ Uighur.
+
+`uk'
+ Ukrainian.
+
+`ur'
+ Urdu.
+
+`uz'
+ Uzbek.
+
+`vi'
+ Vietnamese.
+
+`vo'
+ Volapuk.
+
+`wo'
+ Wolof.
+
+`xh'
+ Xhosa.
+
+`yi'
+ Yiddish (formerly ji).
+
+`yo'
+ Yoruba.
+
+`za'
+ Zhuang.
+
+`zh'
+ Chinese.
+
+`zu'
+ Zulu.
+
+
diff --git a/doc/gettext.texi b/doc/gettext.texi
new file mode 100644
index 0000000..343ffb4
--- /dev/null
+++ b/doc/gettext.texi
@@ -0,0 +1,4820 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename gettext.info
+@settitle GNU @code{gettext} utilities
+@finalout
+@c %**end of header
+
+@include version.texi
+
+@dircategory GNU Gettext Utilities
+@direntry
+* Gettext: (gettext). GNU gettext utilities.
+* gettextize: (gettext)gettextize Invocation. Prepare a package for gettext.
+* msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files.
+* msgmerge: (gettext)msgmerge Invocation. Update two PO files into one.
+* xgettext: (gettext)xgettext Invocation. Extract strings into a PO file.
+@end direntry
+
+@ifinfo
+This file provides documentation for GNU @code{gettext} utilities.
+It also serves as a reference for the free Translation Project.
+
+Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+
+@ignore
+Permission is granted to process this file through TeX and print the
+results, provided the printed document carries copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual).
+
+@end ignore
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the entire
+resulting derived work is distributed under the terms of a permission
+notice identical to this one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that this permission notice may be stated in a translation approved
+by the Foundation.
+@end ifinfo
+
+@titlepage
+@title GNU gettext tools, version @value{VERSION}
+@subtitle Native Language Support Library and Tools
+@subtitle Edition @value{EDITION}, @value{UPDATED}
+@author Ulrich Drepper
+@author Jim Meyering
+@author Fran@,{c}ois Pinard
+
+@page
+@vskip 0pt plus 1filll
+Copyright @copyright{} 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the entire
+resulting derived work is distributed under the terms of a permission
+notice identical to this one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that this permission notice may be stated in a translation approved
+by the Foundation.
+@end titlepage
+
+@ifinfo
+@node Top, Introduction, (dir), (dir)
+@top GNU @code{gettext} utilities
+
+@menu
+* Introduction:: Introduction
+* Basics:: PO Files and PO Mode Basics
+* Sources:: Preparing Program Sources
+* Initial:: Making the Initial PO File
+* Updating:: Updating Existing PO Files
+* Binaries:: Producing Binary MO Files
+* Users:: The User's View
+* Programmers:: The Programmer's View
+* Translators:: The Translator's View
+* Maintainers:: The Maintainer's View
+* Conclusion:: Concluding Remarks
+
+* Country Codes:: ISO 639 country codes
+
+@detailmenu
+ --- The Detailed Node Listing ---
+
+Introduction
+
+* Why:: The Purpose of GNU @code{gettext}
+* Concepts:: I18n, L10n, and Such
+* Aspects:: Aspects in Native Language Support
+* Files:: Files Conveying Translations
+* Overview:: Overview of GNU @code{gettext}
+
+PO Files and PO Mode Basics
+
+* Installation:: Completing GNU @code{gettext} Installation
+* PO Files:: The Format of PO Files
+* Main PO Commands:: Main Commands
+* Entry Positioning:: Entry Positioning
+* Normalizing:: Normalizing Strings in Entries
+
+Preparing Program Sources
+
+* Triggering:: Triggering @code{gettext} Operations
+* Mark Keywords:: How Marks Appears in Sources
+* Marking:: Marking Translatable Strings
+* c-format:: Telling something about the following string
+* Special cases:: Special Cases of Translatable Strings
+
+Making the Initial PO File
+
+* xgettext Invocation:: Invoking the @code{xgettext} Program
+* C Sources Context:: C Sources Context
+* Compendium:: Using Translation Compendiums
+
+Updating Existing PO Files
+
+* msgmerge Invocation:: Invoking the @code{msgmerge} Program
+* Translated Entries:: Translated Entries
+* Fuzzy Entries:: Fuzzy Entries
+* Untranslated Entries:: Untranslated Entries
+* Obsolete Entries:: Obsolete Entries
+* Modifying Translations:: Modifying Translations
+* Modifying Comments:: Modifying Comments
+* Auxiliary:: Consulting Auxiliary PO Files
+
+Producing Binary MO Files
+
+* msgfmt Invocation:: Invoking the @code{msgfmt} Program
+* MO Files:: The Format of GNU MO Files
+
+The User's View
+
+* Matrix:: The Current @file{ABOUT-NLS} Matrix
+* Installers:: Magic for Installers
+* End Users:: Magic for End Users
+
+The Programmer's View
+
+* catgets:: About @code{catgets}
+* gettext:: About @code{gettext}
+* Comparison:: Comparing the two interfaces
+* Using libintl.a:: Using libintl.a in own programs
+* gettext grok:: Being a @code{gettext} grok
+* Temp Programmers:: Temporary Notes for the Programmers Chapter
+
+About @code{catgets}
+
+* Interface to catgets:: The interface
+* Problems with catgets:: Problems with the @code{catgets} interface?!
+
+About @code{gettext}
+
+* Interface to gettext:: The interface
+* Ambiguities:: Solving ambiguities
+* Locating Catalogs:: Locating message catalog files
+* Optimized gettext:: Optimization of the *gettext functions
+
+Temporary Notes for the Programmers Chapter
+
+* Temp Implementations:: Temporary - Two Possible Implementations
+* Temp catgets:: Temporary - About @code{catgets}
+* Temp WSI:: Temporary - Why a single implementation
+* Temp Notes:: Temporary - Notes
+
+The Translator's View
+
+* Trans Intro 0:: Introduction 0
+* Trans Intro 1:: Introduction 1
+* Discussions:: Discussions
+* Organization:: Organization
+* Information Flow:: Information Flow
+
+Organization
+
+* Central Coordination:: Central Coordination
+* National Teams:: National Teams
+* Mailing Lists:: Mailing Lists
+
+National Teams
+
+* Sub-Cultures:: Sub-Cultures
+* Organizational Ideas:: Organizational Ideas
+
+The Maintainer's View
+
+* Flat and Non-Flat:: Flat or Non-Flat Directory Structures
+* Prerequisites:: Prerequisite Works
+* gettextize Invocation:: Invoking the @code{gettextize} Program
+* Adjusting Files:: Files You Must Create or Alter
+
+Files You Must Create or Alter
+
+* po/POTFILES.in:: @file{POTFILES.in} in @file{po/}
+* configure.in:: @file{configure.in} at top level
+* aclocal:: @file{aclocal.m4} at top level
+* acconfig:: @file{acconfig.h} at top level
+* Makefile:: @file{Makefile.in} at top level
+* src/Makefile:: @file{Makefile.in} in @file{src/}
+
+Concluding Remarks
+
+* History:: History of GNU @code{gettext}
+* References:: Related Readings
+
+@end detailmenu
+@end menu
+
+@end ifinfo
+
+@node Introduction, Basics, Top, Top
+@chapter Introduction
+
+@quotation
+This manual is still in @emph{DRAFT} state. Some sections are still
+empty, or almost. We keep merging material from other sources
+(essentially e-mail folders) while the proper integration of this
+material is delayed.
+@end quotation
+
+In this manual, we use @emph{he} when speaking of the programmer or
+maintainer, @emph{she} when speaking of the translator, and @emph{they}
+when speaking of the installers or end users of the translated program.
+This is only a convenience for clarifying the documentation. It is
+@emph{absolutely} not meant to imply that some roles are more appropriate
+to males or females. Besides, as you might guess, GNU @code{gettext}
+is meant to be useful for people using computers, whatever their sex,
+race, religion or nationality!
+
+This chapter explains the goals sought in the creation
+of GNU @code{gettext} and the free Translation Project.
+Then, it explains a few broad concepts around
+Native Language Support, and positions message translation with regard
+to other aspects of national and cultural variance, as they apply to
+to programs. It also surveys those files used to convey the
+translations. It explains how the various tools interact in the
+initial generation of these files, and later, how the maintenance
+cycle should usually operate.
+
+Please send suggestions and corrections to:
+
+@example
+@group
+@r{Internet address:}
+ bug-gnu-utils@@gnu.org
+@end group
+@end example
+
+@noindent
+Please include the manual's edition number and update date in your messages.
+
+@menu
+* Why:: The Purpose of GNU @code{gettext}
+* Concepts:: I18n, L10n, and Such
+* Aspects:: Aspects in Native Language Support
+* Files:: Files Conveying Translations
+* Overview:: Overview of GNU @code{gettext}
+@end menu
+
+@node Why, Concepts, Introduction, Introduction
+@section The Purpose of GNU @code{gettext}
+
+Usually, programs are written and documented in English, and use
+English at execution time to interact with users. This is true
+not only of GNU software, but also of a great deal of commercial
+and free software. Using a common language is quite handy for
+communication between developers, maintainers and users from all
+countries. On the other hand, most people are less comfortable with
+English than with their own native language, and would prefer to
+use their mother tongue for day to day's work, as far as possible.
+Many would simply @emph{love} to see their computer screen showing
+a lot less of English, and far more of their own language.
+
+However, to many people, this dream might appear so far fetched that
+they may believe it is not even worth spending time thinking about
+it. They have no confidence at all that the dream might ever
+become true. Yet some have not lost hope, and have organized themselves.
+The Translation Project is a formalization of this hope into a
+workable structure, which has a good chance to get all of us nearer
+the achievement of a truly multi-lingual set of programs.
+
+GNU @code{gettext} is an important step for the Translation Project,
+as it is an asset on which we may build many other steps. This package
+offers to programmers, translators and even users, a well integrated
+set of tools and documentation. Specifically, the GNU @code{gettext}
+utilities are a set of tools that provides a framework within which
+other free packages may produce multi-lingual messages. These tools
+include a set of conventions about how programs should be written to
+support message catalogs, a directory and file naming organization for the
+message catalogs themselves, a runtime library supporting the retrieval of
+translated messages, and a few stand-alone programs to massage in various
+ways the sets of translatable strings, or already translated strings.
+A special mode for Emacs@footnote{In this manual, all mentions of Emacs
+refers to either GNU Emacs or to XEmacs, which people sometimes call FSF
+Emacs and Lucid Emacs, respectively.} also helps ease interested parties
+into preparing these sets, or bringing them up to date.
+
+GNU @code{gettext} is designed to minimize the impact of
+internationalization on program sources, keeping this impact as small
+and hardly noticeable as possible. Internationalization has better
+chances of succeeding if it is very light weighted, or at least,
+appear to be so, when looking at program sources.
+
+The Translation Project also uses the GNU @code{gettext}
+distribution as a vehicle for documenting its structure and methods.
+This goes beyond the strict technicalities of documenting the GNU @code{gettext}
+proper. By so doing, translators will find in a single place, as
+far as possible, all they need to know for properly doing their
+translating work. Also, this supplemental documentation might also
+help programmers, and even curious users, in understanding how GNU
+@code{gettext} is related to the remainder of the Translation
+Project, and consequently, have a glimpse at the @emph{big picture}.
+
+@node Concepts, Aspects, Why, Introduction
+@section I18n, L10n, and Such
+
+Two long words appear all the time when we discuss support of native
+language in programs, and these words have a precise meaning, worth
+being explained here, once and for all in this document. The words are
+@emph{internationalization} and @emph{localization}. Many people,
+tired of writing these long words over and over again, took the
+habit of writing @dfn{i18n} and @dfn{l10n} instead, quoting the first
+and last letter of each word, and replacing the run of intermediate
+letters by a number merely telling how many such letters there are.
+But in this manual, in the sake of clarity, we will patiently write
+the names in full, each time@dots{}
+
+By @dfn{internationalization}, one refers to the operation by which a
+program, or a set of programs turned into a package, is made aware of and
+able to support multiple languages. This is a generalization process,
+by which the programs are untied from calling only English strings or
+other English specific habits, and connected to generic ways of doing
+the same, instead. Program developers may use various techniques to
+internationalize their programs. Some of these have been standardized.
+GNU @code{gettext} offers one of these standards. @xref{Programmers}.
+
+By @dfn{localization}, one means the operation by which, in a set
+of programs already internationalized, one gives the program all
+needed information so that it can adapt itself to handle its input
+and output in a fashion which is correct for some native language and
+cultural habits. This is a particularisation process, by which generic
+methods already implemented in an internationalized program are used
+in specific ways. The programming environment puts several functions
+to the programmers disposal which allow this runtime configuration.
+The formal description of specific set of cultural habits for some
+country, together with all associated translations targeted to the
+same native language, is called the @dfn{locale} for this language
+or country. Users achieve localization of programs by setting proper
+values to special environment variables, prior to executing those
+programs, identifying which locale should be used.
+
+In fact, locale message support is only one component of the cultural
+data that makes up a particular locale. There are a whole host of
+routines and functions provided to aid programmers in developing
+internationalized software and which allow them to access the data
+stored in a particular locale. When someone presently refers to a
+particular locale, they are obviously referring to the data stored
+within that particular locale. Similarly, if a programmer is referring
+to ``accessing the locale routines'', they are referring to the
+complete suite of routines that access all of the locale's information.
+
+One uses the expression @dfn{Native Language Support}, or merely NLS,
+for speaking of the overall activity or feature encompassing both
+internationalization and localization, allowing for multi-lingual
+interactions in a program. In a nutshell, one could say that
+internationalization is the operation by which further localizations
+are made possible.
+
+Also, very roughly said, when it comes to multi-lingual messages,
+internationalization is usually taken care of by programmers, and
+localization is usually taken care of by translators.
+
+@node Aspects, Files, Concepts, Introduction
+@section Aspects in Native Language Support
+
+For a totally multi-lingual distribution, there are many things to
+translate beyond output messages.
+
+@itemize @bullet
+@item
+As of today, GNU @code{gettext} offers a complete toolset for
+translating messages output by C programs. Perl scripts and shell
+scripts will also need to be translated. Even if there are today some hooks
+by which this can be done, these hooks are not integrated as well as they
+should be.
+
+@item
+Some programs, like @code{autoconf} or @code{bison}, are able
+to produce other programs (or scripts). Even if the generating
+programs themselves are internationalized, the generated programs they
+produce may need internationalization on their own, and this indirect
+internationalization could be automated right from the generating
+program. In fact, quite usually, generating and generated programs
+could be internationalized independently, as the effort needed is
+fairly orthogonal.
+
+@item
+A few programs include textual tables which might need translation
+themselves, independently of the strings contained in the program
+itself. For example, @w{RFC 1345} gives an English description for each
+character which the @code{recode} program is able to reconstruct at execution.
+Since these descriptions are extracted from the RFC by mechanical means,
+translating them properly would require a prior translation of the RFC
+itself.
+
+@item
+Almost all programs accept options, which are often worded out so to
+be descriptive for the English readers; one might want to consider
+offering translated versions for program options as well.
+
+@item
+Many programs read, interpret, compile, or are somewhat driven by
+input files which are texts containing keywords, identifiers, or
+replies which are inherently translatable. For example, one may want
+@code{gcc} to allow diacriticized characters in identifiers or use
+translated keywords; @samp{rm -i} might accept something else than
+@samp{y} or @samp{n} for replies, etc. Even if the program will
+eventually make most of its output in the foreign languages, one has
+to decide whether the input syntax, option values, etc., are to be
+localized or not.
+
+@item
+The manual accompanying a package, as well as all documentation files
+in the distribution, could surely be translated, too. Translating a
+manual, with the intent of later keeping up with updates, is a major
+undertaking in itself, generally.
+
+@end itemize
+
+As we already stressed, translation is only one aspect of locales.
+Other internationalization aspects are not currently handled by GNU
+@code{gettext}, but perhaps may be handled in future versions. There
+are many attributes that are needed to define a country's cultural
+conventions. These attributes include beside the country's native
+language, the formatting of the date and time, the representation of
+numbers, the symbols for currency, etc. These local @dfn{rules} are
+termed the country's locale. The locale represents the knowledge
+needed to support the country's native attributes.
+
+There are a few major areas which may vary between countries and
+hence, define what a locale must describe. The following list helps
+putting multi-lingual messages into the proper context of other tasks
+related to locales, and also presents some other areas which GNU
+@code{gettext} might eventually tackle, maybe, one of these days.
+
+@table @emph
+
+@item Characters and Codesets
+
+The codeset most commonly used through out the USA and most English
+speaking parts of the world is the ASCII codeset. However, there are
+many characters needed by various locales that are not found within
+this codeset. The 8-bit @w{ISO 8859-1} code set has most of the special
+characters needed to handle the major European languages. However, in
+many cases, the @w{ISO 8859-1} font is not adequate. Hence each locale
+will need to specify which codeset they need to use and will need
+to have the appropriate character handling routines to cope with
+the codeset.
+
+@item Currency
+
+The symbols used vary from country to country as does the position
+used by the symbol. Software needs to be able to transparently
+display currency figures in the native mode for each locale.
+
+@item Dates
+
+The format of date varies between locales. For example, Christmas day
+in 1994 is written as 12/25/94 in the USA and as 25/12/94 in Australia.
+Other countries might use @w{ISO 8061} dates, etc.
+
+Time of the day may be noted as @var{hh}:@var{mm}, @var{hh}.@var{mm},
+or otherwise. Some locales require time to be specified in 24-hour
+mode rather than as AM or PM. Further, the nature and yearly extent
+of the Daylight Saving correction vary widely between countries.
+
+@item Numbers
+
+Numbers can be represented differently in different locales.
+For example, the following numbers are all written correctly for
+their respective locales:
+
+@example
+12,345.67 English
+12.345,67 French
+1,2345.67 Asia
+@end example
+
+Some programs could go further and use different unit systems, like
+English units or Metric units, or even take into account variants
+about how numbers are spelled in full.
+
+@item Messages
+
+The most obvious area is the language support within a locale. This is
+where GNU @code{gettext} provides the means for developers and users to
+easily change the language that the software uses to communicate to
+the user.
+
+@end table
+
+In the near future we see no chance that components of locale outside of
+message handling will be made available for use in other
+packages. The reason for this is that most modern systems provide
+a more or less reasonable support for at least some of the missing
+components. Another point is that the GNU @code{libc} and Linux will get
+a new and complete implementation of the whole locale functionality
+which could be adopted by system lacking a reasonable locale support.
+
+@node Files, Overview, Aspects, Introduction
+@section Files Conveying Translations
+
+The letters PO in @file{.po} files means Portable Object, to
+distinguish it from @file{.mo} files, where MO stands for Machine
+Object. This paradigm, as well as the PO file format, is inspired
+by the NLS standard developed by Uniforum, and implemented by Sun
+in their Solaris system.
+
+PO files are meant to be read and edited by humans, and associate each
+original, translatable string of a given package with its translation
+in a particular target language. A single PO file is dedicated to
+a single target language. If a package supports many languages,
+there is one such PO file per language supported, and each package
+has its own set of PO files. These PO files are best created by
+the @code{xgettext} program, and later updated or refreshed through
+the @code{msgmerge} program. Program @code{xgettext} extracts all
+marked messages from a set of C files and initializes a PO file with
+empty translations. Program @code{msgmerge} takes care of adjusting
+PO files between releases of the corresponding sources, commenting
+obsolete entries, initializing new ones, and updating all source
+line references. Files ending with @file{.pot} are kind of base
+translation files found in distributions, in PO file format, and
+@file{.pox} files are often temporary PO files.
+
+MO files are meant to be read by programs, and are binary in nature.
+A few systems already offer tools for creating and handling MO files
+as part of the Native Language Support coming with the system, but the
+format of these MO files is often different from system to system,
+and non-portable. They do not necessary use @file{.mo} for file
+extensions, but since system libraries are also used for accessing
+these files, it works as long as the system is self-consistent about
+it. If GNU @code{gettext} is able to interface with the tools already
+provided with systems, it will consequently let these provided tools
+take care of generating the MO files. Or else, if such tools are not
+found or do not seem usable, GNU @code{gettext} will use its own ways
+and its own format for MO files. Files ending with @file{.gmo} are
+really MO files, when it is known that these files use the GNU format.
+
+@node Overview, , Files, Introduction
+@section Overview of GNU @code{gettext}
+
+The following diagram summarizes the relation between the files
+handled by GNU @code{gettext} and the tools acting on these files.
+It is followed by a somewhat detailed explanations, which you should
+read while keeping an eye on the diagram. Having a clear understanding
+of these interrelations would surely help programmers, translators
+and maintainers.
+
+@example
+@group
+Original C Sources ---> PO mode ---> Marked C Sources ---.
+ |
+ .---------<--- GNU gettext Library |
+.--- make <---+ |
+| `---------<--------------------+-----------'
+| |
+| .-----<--- PACKAGE.pot <--- xgettext <---' .---<--- PO Compendium
+| | | ^
+| | `---. |
+| `---. +---> PO mode ---.
+| +----> msgmerge ------> LANG.pox --->--------' |
+| .---' |
+| | |
+| `-------------<---------------. |
+| +--- LANG.po <--- New LANG.pox <----'
+| .--- LANG.gmo <--- msgfmt <---'
+| |
+| `---> install ---> /.../LANG/PACKAGE.mo ---.
+| +---> "Hello world!"
+`-------> install ---> /.../bin/PROGRAM -------'
+@end group
+@end example
+
+The indication @samp{PO mode} appears in two places in this picture,
+and you may safely read it as merely meaning ``hand editing'', using
+any editor of your choice, really. However, for those of you being
+the lucky users of Emacs, PO mode has been specifically created
+for providing a cozy environment for editing or modifying PO files.
+While editing a PO file, PO mode allows for the easy browsing of
+auxiliary and compendium PO files, as well as for following references into
+the set of C program sources from which PO files have been derived.
+It has a few special features, among which are the interactive marking
+of program strings as translatable, and the validatation of PO files
+with easy repositioning to PO file lines showing errors.
+
+As a programmer, the first step to bringing GNU @code{gettext}
+into your package is identifying, right in the C sources, those strings
+which are meant to be translatable, and those which are untranslatable.
+This tedious job can be done a little more comfortably using emacs PO
+mode, but you can use any means familiar to you for modifying your
+C sources. Beside this some other simple, standard changes are needed to
+properly initialize the translation library. @xref{Sources}, for
+more information about all this.
+
+For newly written software the strings of course can and should be
+marked while writing the it. The @code{gettext} approach makes this
+very easy. Simply put the following lines at the beginning of each file
+or in a central header file:
+
+@example
+@group
+#define _(String) (String)
+#define N_(String) (String)
+#define textdomain(Domain)
+#define bindtextdomain(Package, Directory)
+@end group
+@end example
+
+@noindent
+Doing this allows you to prepare the sources for internationalization.
+Later when you feel ready for the step to use the @code{gettext} library
+simply remove these definitions, include @file{libintl.h} and link
+against @file{libintl.a}. That is all you have to change.
+
+Once the C sources have been modified, the @code{xgettext} program
+is used to find and extract all translatable strings, and create an
+initial PO file out of all these. This @file{@var{package}.pot} file
+contains all original program strings. It has sets of pointers to
+exactly where in C sources each string is used. All translations
+are set to empty. The letter @kbd{t} in @file{.pot} marks this as
+a Template PO file, not yet oriented towards any particular language.
+@xref{xgettext Invocation}, for more details about how one calls the
+@code{xgettext} program. If you are @emph{really} lazy, you might
+be interested at working a lot more right away, and preparing the
+whole distribution setup (@pxref{Maintainers}). By doing so, you
+spare yourself typing the @code{xgettext} command, as @code{make}
+should now generate the proper things automatically for you!
+
+The first time through, there is no @file{@var{lang}.po} yet, so the
+@code{msgmerge} step may be skipped and replaced by a mere copy of
+@file{@var{package}.pot} to @file{@var{lang}.pox}, where @var{lang}
+represents the target language.
+
+Then comes the initial translation of messages. Translation in
+itself is a whole matter, still exclusively meant for humans,
+and whose complexity far overwhelms the level of this manual.
+Nevertheless, a few hints are given in some other chapter of this
+manual (@pxref{Translators}). You will also find there indications
+about how to contact translating teams, or becoming part of them,
+for sharing your translating concerns with others who target the same
+native language.
+
+While adding the translated messages into the @file{@var{lang}.pox}
+PO file, if you do not have Emacs handy, you are on your own
+for ensuring that your efforts fully respect the PO file format, and quoting
+conventions (@pxref{PO Files}). This is surely not an impossible task,
+as this is the way many people have handled PO files already for Uniforum or
+Solaris. On the other hand, by using PO mode in Emacs, most details
+of PO file format are taken care of for you, but you have to acquire
+some familiarity with PO mode itself. Besides main PO mode commands
+(@pxref{Main PO Commands}), you should know how to move between entries
+(@pxref{Entry Positioning}), and how to handle untranslated entries
+(@pxref{Untranslated Entries}).
+
+If some common translations have already been saved into a compendium
+PO file, translators may use PO mode for initializing untranslated
+entries from the compendium, and also save selected translations into
+the compendium, updating it (@pxref{Compendium}). Compendium files
+are meant to be exchanged between members of a given translation team.
+
+Programs, or packages of programs, are dynamic in nature: users write
+bug reports and suggestion for improvements, maintainers react by
+modifying programs in various ways. The fact that a package has
+already been internationalized should not make maintainers shy
+of adding new strings, or modifying strings already translated.
+They just do their job the best they can. For the Translation
+Project to work smoothly, it is important that maintainers do not
+carry translation concerns on their already loaded shoulders, and that
+translators be kept as free as possible of programmatic concerns.
+
+The only concern maintainers should have is carefully marking new
+strings as translatable, when they should be, and do not otherwise
+worry about them being translated, as this will come in proper time.
+Consequently, when programs and their strings are adjusted in various
+ways by maintainers, and for matters usually unrelated to translation,
+@code{xgettext} would construct @file{@var{package}.pot} files which are
+evolving over time, so the translations carried by @file{@var{lang}.po}
+are slowly fading out of date.
+
+It is important for translators (and even maintainers) to understand
+that package translation is a continuous process in the lifetime of a
+package, and not something which is done once and for all at the start.
+After an initial burst of translation activity for a given package,
+interventions are needed once in a while, because here and there,
+translated entries become obsolete, and new untranslated entries
+appear, needing translation.
+
+The @code{msgmerge} program has the purpose of refreshing an already
+existing @file{@var{lang}.po} file, by comparing it with a newer
+@file{@var{package}.pot} template file, extracted by @code{xgettext}
+out of recent C sources. The refreshing operation adjusts all
+references to C source locations for strings, since these strings
+move as programs are modified. Also, @code{msgmerge} comments out as
+obsolete, in @file{@var{lang}.pox}, those already translated entries
+which are no longer used in the program sources (@pxref{Obsolete
+Entries}). It finally discovers new strings and inserts them in
+the resulting PO file as untranslated entries (@pxref{Untranslated
+Entries}). @xref{msgmerge Invocation}, for more information about what
+@code{msgmerge} really does.
+
+Whatever route or means taken, the goal is to obtain an updated
+@file{@var{lang}.pox} file offering translations for all strings.
+When this is properly achieved, this file @file{@var{lang}.pox} may
+take the place of the previous official @file{@var{lang}.po} file.
+
+The temporal mobility, or fluidity of PO files, is an integral part of
+the translation game, and should be well understood, and accepted.
+People resisting it will have a hard time participating in the
+Translation Project, or will give a hard time to other participants! In
+particular, maintainers should relax and include all available official
+PO files in their distributions, even if these have not recently been
+updated, without banging or otherwise trying to exert pressure on the
+translator teams to get the job done. The pressure should rather come
+from the community of users speaking a particular language, and
+maintainers should consider themselves fairly relieved of any concern
+about the adequacy of translation files. On the other hand, translators
+should reasonably try updating the PO files they are responsible for,
+while the package is undergoing pretest, prior to an official
+distribution.
+
+Once the PO file is complete and dependable, the @code{msgfmt} program
+is used for turning the PO file into a machine-oriented format, which
+may yield efficient retrieval of translations by the programs of the
+package, whenever needed at runtime (@pxref{MO Files}). @xref{msgfmt
+Invocation}, for more information about all modalities of execution
+for the @code{msgfmt} program.
+
+Finally, the modified and marked C sources are compiled and linked
+with the GNU @code{gettext} library, usually through the operation of
+@code{make}, given a suitable @file{Makefile} exists for the project,
+and the resulting executable is installed somewhere users will find it.
+The MO files themselves should also be properly installed. Given the
+appropriate environment variables are set (@pxref{End Users}), the
+program should localize itself automatically, whenever it executes.
+
+The remainder of this manual has the purpose of explaining in depth the various
+steps outlined above.
+
+@node Basics, Sources, Introduction, Top
+@chapter PO Files and PO Mode Basics
+
+The GNU @code{gettext} toolset helps programmers and translators
+at producing, updating and using translation files, mainly those
+PO files which are textual, editable files. This chapter stresses
+the format of PO files, and contains a PO mode starter. PO mode
+description is spread throughout this manual instead of being concentrated
+in one place. Here we present only the basics of PO mode.
+
+@menu
+* Installation:: Completing GNU @code{gettext} Installation
+* PO Files:: The Format of PO Files
+* Main PO Commands:: Main Commands
+* Entry Positioning:: Entry Positioning
+* Normalizing:: Normalizing Strings in Entries
+@end menu
+
+@node Installation, PO Files, Basics, Basics
+@section Completing GNU @code{gettext} Installation
+
+Once you have received, unpacked, configured and compiled the GNU
+@code{gettext} distribution, the @samp{make install} command puts in
+place the programs @code{xgettext}, @code{msgfmt}, @code{gettext}, and
+@code{msgmerge}, as well as their available message catalogs. To
+top off a comfortable installation, you might also want to make the
+PO mode available to your Emacs users.
+
+During the installation of the PO mode, you might want modify your
+file @file{.emacs}, once and for all, so it contains a few lines looking
+like:
+
+@example
+(setq auto-mode-alist
+ (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode) auto-mode-alist))
+(autoload 'po-mode "po-mode")
+@end example
+
+Later, whenever you edit some @file{.po}, @file{.pot} or @file{.pox}
+file, or any file having the string @samp{.po.} within its name,
+Emacs loads @file{po-mode.elc} (or @file{po-mode.el}) as needed, and
+automatically activates PO mode commands for the associated buffer.
+The string @emph{PO} appears in the mode line for any buffer for
+which PO mode is active. Many PO files may be active at once in a
+single Emacs session.
+
+If you are using Emacs version 20 or better, and have already installed
+the appropriate international fonts on your system, you may also manage
+for the these fonts to be automatically loaded and used for displaying
+the translations on your Emacs screen, whenever necessary. For this to
+happen, you might want to add the lines:
+
+@example
+(autoload 'po-find-file-coding-system "po-mode")
+(modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
+ 'po-find-file-coding-system)
+@end example
+
+@noindent
+to your @file{.emacs} file.
+
+@node PO Files, Main PO Commands, Installation, Basics
+@section The Format of PO Files
+
+A PO file is made up of many entries, each entry holding the relation
+between an original untranslated string and its corresponding
+translation. All entries in a given PO file usually pertain
+to a single project, and all translations are expressed in a single
+target language. One PO file @dfn{entry} has the following schematic
+structure:
+
+@example
+@var{white-space}
+# @var{translator-comments}
+#. @var{automatic-comments}
+#: @var{reference}@dots{}
+#, @var{flag}@dots{}
+msgid @var{untranslated-string}
+msgstr @var{translated-string}
+@end example
+
+The general structure of a PO file should be well understood by
+the translator. When using PO mode, very little has to be known
+about the format details, as PO mode takes care of them for her.
+
+Entries begin with some optional white space. Usually, when generated
+through GNU @code{gettext} tools, there is exactly one blank line
+between entries. Then comments follow, on lines all starting with the
+character @kbd{#}. There are two kinds of comments: those which have
+some white space immediately following the @kbd{#}, which comments are
+created and maintained exclusively by the translator, and those which
+have some non-white character just after the @kbd{#}, which comments
+are created and maintained automatically by GNU @code{gettext} tools.
+All comments, of either kind, are optional.
+
+After white space and comments, entries show two strings, giving
+first the untranslated string as it appears in the original program
+sources, and then, the translation of this string. The original
+string is introduced by the keyword @code{msgid}, and the translation,
+by @code{msgstr}. The two strings, untranslated and translated,
+are quoted in various ways in the PO file, using @kbd{"}
+delimiters and @kbd{\} escapes, but the translator does not really
+have to pay attention to the precise quoting format, as PO mode fully
+intend to take care of quoting for her.
+
+The @code{msgid} strings, as well as automatic comments, are produced
+and managed by other GNU @code{gettext} tools, and PO mode does not
+provide means for the translator to alter these. The most she can
+do is merely deleting them, and only by deleting the whole entry.
+On the other hand, the @code{msgstr} string, as well as translator
+comments, are really meant for the translator, and PO mode gives her
+the full control she needs.
+
+The comment lines beginning with @kbd{#,} are special because they are
+not completely ignored by the programs as comments generally are. The
+comma separated list of @var{flag}s is used by the @code{msgfmt}
+program to give the user some better disgnostic messages. Currently
+there are two forms of flags defined:
+
+@table @kbd
+@item fuzzy
+This flag can be generated by the @code{msgmerge} program or it can be
+inserted by the translator herself. It shows that the @code{msgstr}
+string might not be a correct translation (anymore). Only the translator
+can judge if the translation requires further modification, or is
+acceptable as is. Once satisfied with the translation, she then removes
+this @kbd{fuzzy} attribute. The @code{msgmerge} programs inserts this
+when it combined the @code{msgid} and @code{msgstr} entries after fuzzy
+search only. @xref{Fuzzy Entries}.
+
+@item c-format
+@itemx no-c-format
+These flags should not be added by a human. Instead only the
+@code{xgettext} program adds them. In an automatized PO file processing
+system as proposed here the user changes would be thrown away again as
+soon as the @code{xgettext} program generates a new template file.
+
+In case the @kbd{c-format} flag is given for a string the @code{msgfmt}
+does some more tests to check to validity of the translation.
+@xref{msgfmt Invocation}.
+
+@end table
+
+It happens that some lines, usually whitespace or comments, follow the
+very last entry of a PO file. Such lines are not part of any entry,
+and PO mode is unable to take action on those lines. By using the
+PO mode function @w{@kbd{M-x po-normalize}}, the translator may get
+rid of those spurious lines. @xref{Normalizing}.
+
+The remainder of this section may be safely skipped by those using
+PO mode, yet it may be interesting for everybody to have a better
+idea of the precise format of a PO file. On the other hand, those
+not having Emacs handy should carefully continue reading on.
+
+Each of @var{untranslated-string} and @var{translated-string} respects
+the C syntax for a character string, including the surrounding quotes
+and imbedded backslashed escape sequences. When the time comes
+to write multi-line strings, one should not use escaped newlines.
+Instead, a closing quote should follow the last character on the
+line to be continued, and an opening quote should resume the string
+at the beginning of the following PO file line. For example:
+
+@example
+msgid ""
+"Here is an example of how one might continue a very long string\n"
+"for the common case the string represents multi-line output.\n"
+@end example
+
+@noindent
+In this example, the empty string is used on the first line, to
+allow better alignment of the @kbd{H} from the word @samp{Here}
+over the @kbd{f} from the word @samp{for}. In this example, the
+@code{msgid} keyword is followed by three strings, which are meant
+to be concatenated. Concatenating the empty string does not change
+the resulting overall string, but it is a way for us to comply with
+the necessity of @code{msgid} to be followed by a string on the same
+line, while keeping the multi-line presentation left-justified, as
+we find this to be a cleaner disposition. The empty string could have
+been omitted, but only if the string starting with @samp{Here} was
+promoted on the first line, right after @code{msgid}.@footnote{This
+limitation is not imposed by GNU @code{gettext}, but comes from the
+@code{msgfmt} implementation on Solaris.} It was not really necessary
+either to switch between the two last quoted strings immediately after
+the newline @samp{\n}, the switch could have occurred after @emph{any}
+other character, we just did it this way because it is neater.
+
+One should carefully distinguish between end of lines marked as
+@samp{\n} @emph{inside} quotes, which are part of the represented
+string, and end of lines in the PO file itself, outside string quotes,
+which have no incidence on the represented string.
+
+Outside strings, white lines and comments may be used freely.
+Comments start at the beginning of a line with @samp{#} and extend
+until the end of the PO file line. Comments written by translators
+should have the initial @samp{#} immediately followed by some white
+space. If the @samp{#} is not immediately followed by white space,
+this comment is most likely generated and managed by specialized GNU
+tools, and might disappear or be replaced unexpectedly when the PO
+file is given to @code{msgmerge}.
+
+@node Main PO Commands, Entry Positioning, PO Files, Basics
+@section Main PO mode Commands
+
+After setting up Emacs with something similar to the lines in
+@ref{Installation}, PO mode is activated for a window when Emacs finds a
+PO file in that window. This puts the window read-only and establishes a
+po-mode-map, which is a genuine Emacs mode, in a way that is not derived
+from text mode in any way. Functions found on @code{po-mode-hook},
+if any, will be executed.
+
+When PO mode is active in a window, the letters @samp{PO} appear
+in the mode line for that window. The mode line also displays how
+many entries of each kind are held in the PO file. For example,
+the string @samp{132t+3f+10u+2o} would tell the translator that the
+PO mode contains 132 translated entries (@pxref{Translated Entries},
+3 fuzzy entries (@pxref{Fuzzy Entries}), 10 untranslated entries
+(@pxref{Untranslated Entries}) and 2 obsolete entries (@pxref{Obsolete
+Entries}). Zero-coefficients items are not shown. So, in this example, if
+the fuzzy entries were unfuzzied, the untranslated entries were translated
+and the obsolete entries were deleted, the mode line would merely display
+@samp{145t} for the counters.
+
+The main PO commands are those which do not fit into the other categories of
+subsequent sections. These allow for quitting PO mode or for managing windows
+in special ways.
+
+@table @kbd
+@item U
+Undo last modification to the PO file.
+
+@item Q
+Quit processing and save the PO file.
+
+@item q
+Quit processing, possibly after confirmation.
+
+@item O
+Temporary leave the PO file window.
+
+@item ?
+@itemx h
+Show help about PO mode.
+
+@item =
+Give some PO file statistics.
+
+@item V
+Batch validate the format of the whole PO file.
+
+@end table
+
+The command @kbd{U} (@code{po-undo}) interfaces to the Emacs
+@emph{undo} facility. @xref{Undo, , Undoing Changes, emacs, The Emacs
+Editor}. Each time @kbd{U} is typed, modifications which the translator
+did to the PO file are undone a little more. For the purpose of
+undoing, each PO mode command is atomic. This is especially true for
+the @kbd{@key{RET}} command: the whole edition made by using a single
+use of this command is undone at once, even if the edition itself
+implied several actions. However, while in the editing window, one
+can undo the edition work quite parsimoniously.
+
+The commands @kbd{Q} (@code{po-quit}) and @kbd{q}
+(@code{po-confirm-and-quit}) are used when the translator is done with the
+PO file. The former is a bit less verbose than the latter. If the file
+has been modified, it is saved to disk first. In both cases, and prior to
+all this, the commands check if some untranslated message remains in the
+PO file and, if yes, the translator is asked if she really wants to leave
+off working with this PO file. This is the preferred way of getting rid
+of an Emacs PO file buffer. Merely killing it through the usual command
+@w{@kbd{C-x k}} (@code{kill-buffer}) is not the tidiest way to proceed.
+
+The command @kbd{O} (@code{po-other-window}) is another, softer way,
+to leave PO mode, temporarily. It just moves the cursor to some other
+Emacs window, and pops one if necessary. For example, if the translator
+just got PO mode to show some source context in some other, she might
+discover some apparent bug in the program source that needs correction.
+This command allows the translator to change sex, become a programmer,
+and have the cursor right into the window containing the program she
+(or rather @emph{he}) wants to modify. By later getting the cursor back
+in the PO file window, or by asking Emacs to edit this file once again,
+PO mode is then recovered.
+
+The command @kbd{h} (@code{po-help}) displays a summary of all available PO
+mode commands. The translator should then type any character to resume
+normal PO mode operations. The command @kbd{?} has the same effect
+as @kbd{h}.
+
+The command @kbd{=} (@code{po-statistics}) computes the total number of
+entries in the PO file, the ordinal of the current entry (counted from
+1), the number of untranslated entries, the number of obsolete entries,
+and displays all these numbers.
+
+The command @kbd{V} (@code{po-validate}) launches @code{msgfmt} in verbose
+mode over the current PO file. This command first offers to save the
+current PO file on disk. The @code{msgfmt} tool, from GNU @code{gettext},
+has the purpose of creating a MO file out of a PO file, and PO mode uses
+the features of this program for checking the overall format of a PO file,
+as well as all individual entries.
+
+The program @code{msgfmt} runs asynchronously with Emacs, so the
+translator regains control immediately while her PO file is being studied.
+Error output is collected in the Emacs @samp{*compilation*} buffer,
+displayed in another window. The regular Emacs command @kbd{C-x`}
+(@code{next-error}), as well as other usual compile commands, allow the
+translator to reposition quickly to the offending parts of the PO file.
+Once the cursor is on the line in error, the translator may decide on
+any PO mode action which would help correcting the error.
+
+@node Entry Positioning, Normalizing, Main PO Commands, Basics
+@section Entry Positioning
+
+The cursor in a PO file window is almost always part of
+an entry. The only exceptions are the special case when the cursor
+is after the last entry in the file, or when the PO file is
+empty. The entry where the cursor is found to be is said to be the
+current entry. Many PO mode commands operate on the current entry,
+so moving the cursor does more than allowing the translator to browse
+the PO file, this also selects on which entry commands operate.
+
+Some PO mode commands alter the position of the cursor in a specialized
+way. A few of those special purpose positioning are described here,
+the others are described in following sections.
+
+@table @kbd
+
+@item .
+Redisplay the current entry.
+
+@item n
+@itemx n
+Select the entry after the current one.
+
+@item p
+@itemx p
+Select the entry before the current one.
+
+@item <
+Select the first entry in the PO file.
+
+@item >
+Select the last entry in the PO file.
+
+@item m
+Record the location of the current entry for later use.
+
+@item l
+Return to a previously saved entry location.
+
+@item x
+Exchange the current entry location with the previously saved one.
+
+@end table
+
+Any Emacs command able to reposition the cursor may be used
+to select the current entry in PO mode, including commands which
+move by characters, lines, paragraphs, screens or pages, and search
+commands. However, there is a kind of standard way to display the
+current entry in PO mode, which usual Emacs commands moving
+the cursor do not especially try to enforce. The command @kbd{.}
+(@code{po-current-entry}) has the sole purpose of redisplaying the
+current entry properly, after the current entry has been changed by
+means external to PO mode, or the Emacs screen otherwise altered.
+
+It is yet to be decided if PO mode helps the translator, or otherwise
+irritates her, by forcing a rigid window disposition while she
+is doing her work. We originally had quite precise ideas about
+how windows should behave, but on the other hand, anyone used to
+Emacs is often happy to keep full control. Maybe a fixed window
+disposition might be offered as a PO mode option that the translator
+might activate or deactivate at will, so it could be offered on an
+experimental basis. If nobody feels a real need for using it, or
+a compulsion for writing it, we should drop this whole idea.
+The incentive for doing it should come from translators rather than
+programmers, as opinions from an experienced translator are surely
+more worth to me than opinions from programmers @emph{thinking} about
+how @emph{others} should do translation.
+
+The commands @kbd{n} (@code{po-next-entry}) and @kbd{p}
+(@code{po-previous-entry}) move the cursor the entry following,
+or preceding, the current one. If @kbd{n} is given while the
+cursor is on the last entry of the PO file, or if @kbd{p}
+is given while the cursor is on the first entry, no move is done.
+
+The commands @kbd{<} (@code{po-first-entry}) and @kbd{>}
+(@code{po-last-entry}) move the cursor to the first entry, or last
+entry, of the PO file. When the cursor is located past the last
+entry in a PO file, most PO mode commands will return an error saying
+@samp{After last entry}. Moreover, the commands @kbd{<} and @kbd{>}
+have the special property of being able to work even when the cursor
+is not into some PO file entry, and one may use them for nicely
+correcting this situation. But even these commands will fail on a
+truly empty PO file. There are development plans for the PO mode for it
+to interactively fill an empty PO file from sources. @xref{Marking}.
+
+The translator may decide, before working at the translation of
+a particular entry, that she needs to browse the remainder of the
+PO file, maybe for finding the terminology or phraseology used
+in related entries. She can of course use the standard Emacs idioms
+for saving the current cursor location in some register, and use that
+register for getting back, or else, use the location ring.
+
+PO mode offers another approach, by which cursor locations may be saved
+onto a special stack. The command @kbd{m} (@code{po-push-location})
+merely adds the location of current entry to the stack, pushing
+the already saved locations under the new one. The command
+@kbd{r} (@code{po-pop-location}) consumes the top stack element and
+reposition the cursor to the entry associated with that top element.
+This position is then lost, for the next @kbd{r} will move the cursor
+to the previously saved location, and so on until no locations remain
+on the stack.
+
+If the translator wants the position to be kept on the location stack,
+maybe for taking a look at the entry associated with the top
+element, then go elsewhere with the intent of getting back later, she
+ought to use @kbd{m} immediately after @kbd{r}.
+
+The command @kbd{x} (@code{po-exchange-location}) simultaneously
+reposition the cursor to the entry associated with the top element of
+the stack of saved locations, and replace that top element with the
+location of the current entry before the move. Consequently, repeating
+the @kbd{x} command toggles alternatively between two entries.
+For achieving this, the translator will position the cursor on the
+first entry, use @kbd{m}, then position to the second entry, and
+merely use @kbd{x} for making the switch.
+
+@node Normalizing, , Entry Positioning, Basics
+@section Normalizing Strings in Entries
+
+There are many different ways for encoding a particular string into a
+PO file entry, because there are so many different ways to split and
+quote multi-line strings, and even, to represent special characters
+by backslahsed escaped sequences. Some features of PO mode rely on
+the ability for PO mode to scan an already existing PO file for a
+particular string encoded into the @code{msgid} field of some entry.
+Even if PO mode has internally all the built-in machinery for
+implementing this recognition easily, doing it fast is technically
+difficult. To facilitate a solution to this efficiency problem,
+we decided on a canonical representation for strings.
+
+A conventional representation of strings in a PO file is currently
+under discussion, and PO mode experiments with a canonical representation.
+Having both @code{xgettext} and PO mode converging towards a uniform
+way of representing equivalent strings would be useful, as the internal
+normalization needed by PO mode could be automatically satisfied
+when using @code{xgettext} from GNU @code{gettext}. An explicit
+PO mode normalization should then be only necessary for PO files
+imported from elsewhere, or for when the convention itself evolves.
+
+So, for achieving normalization of at least the strings of a given
+PO file needing a canonical representation, the following PO mode
+command is available:
+
+@table @kbd
+@item M-x po-normalize
+Tidy the whole PO file by making entries more uniform.
+
+@end table
+
+The special command @kbd{M-x po-normalize}, which has no associate
+keys, revises all entries, ensuring that strings of both original
+and translated entries use uniform internal quoting in the PO file.
+It also removes any crumb after the last entry. This command may be
+useful for PO files freshly imported from elsewhere, or if we ever
+improve on the canonical quoting format we use. This canonical format
+is not only meant for getting cleaner PO files, but also for greatly
+speeding up @code{msgid} string lookup for some other PO mode commands.
+
+@kbd{M-x po-normalize} presently makes three passes over the entries.
+The first implements heuristics for converting PO files for GNU
+@code{gettext} 0.6 and earlier, in which @code{msgid} and @code{msgstr}
+fields were using K&R style C string syntax for multi-line strings.
+These heuristics may fail for comments not related to obsolete
+entries and ending with a backslash; they also depend on subsequent
+passes for finalizing the proper commenting of continued lines for
+obsolete entries. This first pass might disappear once all oldish PO
+files would have been adjusted. The second and third pass normalize
+all @code{msgid} and @code{msgstr} strings respectively. They also
+clean out those trailing backslashes used by XView's @code{msgfmt}
+for continued lines.
+
+Having such an explicit normalizing command allows for importing PO
+files from other sources, but also eases the evolution of the current
+convention, evolution driven mostly by aesthetic concerns, as of now.
+It is easy to make suggested adjustments at a later time, as the
+normalizing command and eventually, other GNU @code{gettext} tools
+should greatly automate conformance. A description of the canonical
+string format is given below, for the particular benefit of those not
+having Emacs handy, and who would nevertheless want to handcraft
+their PO files in nice ways.
+
+Right now, in PO mode, strings are single line or multi-line. A string
+goes multi-line if and only if it has @emph{embedded} newlines, that
+is, if it matches @samp{[^\n]\n+[^\n]}. So, we would have:
+
+@example
+msgstr "\n\nHello, world!\n\n\n"
+@end example
+
+but, replacing the space by a newline, this becomes:
+
+@example
+msgstr ""
+"\n"
+"\n"
+"Hello,\n"
+"world!\n"
+"\n"
+"\n"
+@end example
+
+We are deliberately using a caricatural example, here, to make the
+point clearer. Usually, multi-lines are not that bad looking.
+It is probable that we will implement the following suggestion.
+We might lump together all initial newlines into the empty string,
+and also all newlines introducing empty lines (that is, for @w{@var{n}
+> 1}, the @var{n}-1'th last newlines would go together on a separate
+string), so making the previous example appear:
+
+@example
+msgstr "\n\n"
+"Hello,\n"
+"world!\n"
+"\n\n"
+@end example
+
+There are a few yet undecided little points about string normalization,
+to be documented in this manual, once these questions settle.
+
+@node Sources, Initial, Basics, Top
+@chapter Preparing Program Sources
+
+@c FIXME: Rewrite (the whole chapter).
+
+For the programmer, changes to the C source code fall into three
+categories. First, you have to make the localization functions
+known to all modules needing message translation. Second, you should
+properly trigger the operation of GNU @code{gettext} when the program
+initializes, usually from the @code{main} function. Last, you should
+identify and especially mark all constant strings in your program
+needing translation.
+
+Presuming that your set of programs, or package, has been adjusted
+so all needed GNU @code{gettext} files are available, and your
+@file{Makefile} files are adjusted (@pxref{Maintainers}), each C module
+having translated C strings should contain the line:
+
+@example
+#include <libintl.h>
+@end example
+
+The remaining changes to your C sources are discussed in the further
+sections of this chapter.
+
+@menu
+* Triggering:: Triggering @code{gettext} Operations
+* Mark Keywords:: How Marks Appears in Sources
+* Marking:: Marking Translatable Strings
+* c-format:: Telling something about the following string
+* Special cases:: Special Cases of Translatable Strings
+@end menu
+
+@node Triggering, Mark Keywords, Sources, Sources
+@section Triggering @code{gettext} Operations
+
+The initialization of locale data should be done with more or less
+the same code in every program, as demonstrated below:
+
+@example
+@group
+int
+main (argc, argv)
+ int argc;
+ char argv;
+@{
+ @dots{}
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+ @dots{}
+@}
+@end group
+@end example
+
+@var{PACKAGE} and @var{LOCALEDIR} should be provided either by
+@file{config.h} or by the Makefile. For now consult the @code{gettext}
+sources for more information.
+
+The use of @code{LC_ALL} might not be appropriate for you.
+@code{LC_ALL} includes all locale categories and especially
+@code{LC_CTYPE}. This later category is responsible for determining
+character classes with the @code{isalnum} etc. functions from
+@file{ctype.h} which could especially for programs, which process some
+kind of input language, be wrong. For example this would mean that a
+source code using the @,{c} (c-cedilla character) is runnable in
+France but not in the U.S.
+
+Some systems also have problems with parsing number using the
+@code{scanf} functions if an other but the @code{LC_ALL} locale is used.
+The standards say that additional formats but the one known in the
+@code{"C"} locale might be recognized. But some systems seem to reject
+numbers in the @code{"C"} locale format. In some situation, it might
+also be a problem with the notation itself which makes it impossible to
+recognize whether the number is in the @code{"C"} locale or the local
+format. This can happen if thousands separator characters are used.
+Some locales define this character accordfing to the national
+conventions to @code{'.'} which is the same character used in the
+@code{"C"} locale to denote the decimal point.
+
+So it is sometimes necessary to replace the @code{LC_ALL} line in the
+code above by a sequence of @code{setlocale} lines
+
+@example
+@group
+@{
+ @dots{}
+ setlocale (LC_TIME, "");
+ setlocale (LC_MESSAGES, "");
+ @dots{}
+@}
+@end group
+@end example
+
+@noindent
+or to switch for and back to the character class in question. On all
+POSIX conformant systems the locale categories @code{LC_CTYPE},
+@code{LC_COLLATE}, @code{LC_MONETARY}, @code{LC_NUMERIC}, and
+@code{LC_TIME} are available. On some modern systems there is also a
+locale @code{LC_MESSAGES} which is called on some old, XPG2 compliant
+systems @code{LC_RESPONSES}.
+
+@node Mark Keywords, Marking, Triggering, Sources
+@section How Marks Appears in Sources
+
+All strings requiring translation should be marked in the C sources. Marking
+is done in such a way that each translatable string appears to be
+the sole argument of some function or preprocessor macro. There are
+only a few such possible functions or macros meant for translation,
+and their names are said to be marking keywords. The marking is
+attached to strings themselves, rather than to what we do with them.
+This approach has more uses. A blatant example is an error message
+produced by formatting. The format string needs translation, as
+well as some strings inserted through some @samp{%s} specification
+in the format, while the result from @code{sprintf} may have so many
+different instances that it is impractical to list them all in some
+@samp{error_string_out()} routine, say.
+
+This marking operation has two goals. The first goal of marking
+is for triggering the retrieval of the translation, at run time.
+The keyword are possibly resolved into a routine able to dynamically
+return the proper translation, as far as possible or wanted, for the
+argument string. Most localizable strings are found in executable
+positions, that is, attached to variables or given as parameters to
+functions. But this is not universal usage, and some translatable
+strings appear in structured initializations. @xref{Special cases}.
+
+The second goal of the marking operation is to help @code{xgettext}
+at properly extracting all translatable strings when it scans a set
+of program sources and produces PO file templates.
+
+The canonical keyword for marking translatable strings is
+@samp{gettext}, it gave its name to the whole GNU @code{gettext}
+package. For packages making only light use of the @samp{gettext}
+keyword, macro or function, it is easily used @emph{as is}. However,
+for packages using the @code{gettext} interface more heavily, it
+is usually more convenient to give the main keyword a shorter, less
+obtrusive name. Indeed, the keyword might appear on a lot of strings
+all over the package, and programmers usually do not want nor need
+their program sources to remind them forcefully, all the time, that they
+are internationalized. Further, a long keyword has the disadvantage
+of using more horizontal space, forcing more indentation work on
+sources for those trying to keep them within 79 or 80 columns.
+
+Many packages use @samp{_} (a simple underline) as a keyword,
+and write @samp{_("Translatable string")} instead of @samp{gettext
+("Translatable string")}. Further, the coding rule, from GNU standards,
+wanting that there is a space between the keyword and the opening
+parenthesis is relaxed, in practice, for this particular usage.
+So, the textual overhead per translatable string is reduced to
+only three characters: the underline and the two parentheses.
+However, even if GNU @code{gettext} uses this convention internally,
+it does not offer it officially. The real, genuine keyword is truly
+@samp{gettext} indeed. It is fairly easy for those wanting to use
+@samp{_} instead of @samp{gettext} to declare:
+
+@example
+#include <libintl.h>
+#define _(String) gettext (String)
+@end example
+
+@noindent
+instead of merely using @samp{#include <libintl.h>}.
+
+Later on, the maintenance is relatively easy. If, as a programmer,
+you add or modify a string, you will have to ask yourself if the
+new or altered string requires translation, and include it within
+@samp{_()} if you think it should be translated. @samp{"%s: %d"} is
+an example of string @emph{not} requiring translation!
+
+@node Marking, c-format, Mark Keywords, Sources
+@section Marking Translatable Strings
+
+In PO mode, one set of features is meant more for the programmer than
+for the translator, and allows him to interactively mark which strings,
+in a set of program sources, are translatable, and which are not.
+Even if it is a fairly easy job for a programmer to find and mark
+such strings by other means, using any editor of his choice, PO mode
+makes this work more comfortable. Further, this gives translators
+who feel a little like programmers, or programmers who feel a little
+like translators, a tool letting them work at marking translatable
+strings in the program sources, while simultaneously producing a set of
+translation in some language, for the package being internationalized.
+
+The set of program sources, targetted by the PO mode commands describe
+here, should have an Emacs tags table constructed for your project,
+prior to using these PO file commands. This is easy to do. In any
+shell window, change the directory to the root of your project, then
+execute a command resembling:
+
+@example
+etags src/*.[hc] lib/*.[hc]
+@end example
+
+@noindent
+presuming here you want to process all @file{.h} and @file{.c} files
+from the @file{src/} and @file{lib/} directories. This command will
+explore all said files and create a @file{TAGS} file in your root
+directory, somewhat summarizing the contents using a special file
+format Emacs can understand.
+
+For packages following the GNU coding standards, there is
+a make goal @code{tags} or @code{TAGS} which construct the tag files in
+all directories and for all files containing source code.
+
+Once your @file{TAGS} file is ready, the following commands assist
+the programmer at marking translatable strings in his set of sources.
+But these commands are necessarily driven from within a PO file
+window, and it is likely that you do not even have such a PO file yet.
+This is not a problem at all, as you may safely open a new, empty PO
+file, mainly for using these commands. This empty PO file will slowly
+fill in while you mark strings as translatable in your program sources.
+
+@table @kbd
+@item ,
+Search through program sources for a string which looks like a
+candidate for translation.
+
+@item M-,
+Mark the last string found with @samp{_()}.
+
+@item M-.
+Mark the last string found with a keyword taken from a set of possible
+keywords. This command with a prefix allows some management of these
+keywords.
+
+@end table
+
+The @kbd{,} (@code{po-tags-search}) command search for the next
+occurrence of a string which looks like a possible candidate for
+translation, and displays the program source in another Emacs window,
+positioned in such a way that the string is near the top of this other
+window. If the string is too big to fit whole in this window, it is
+positioned so only its end is shown. In any case, the cursor
+is left in the PO file window. If the shown string would be better
+presented differently in different native languages, you may mark it
+using @kbd{M-,} or @kbd{M-.}. Otherwise, you might rather ignore it
+and skip to the next string by merely repeating the @kbd{,} command.
+
+A string is a good candidate for translation if it contains a sequence
+of three or more letters. A string containing at most two letters in
+a row will be considered as a candidate if it has more letters than
+non-letters. The command disregards strings containing no letters,
+or isolated letters only. It also disregards strings within comments,
+or strings already marked with some keyword PO mode knows (see below).
+
+If you have never told Emacs about some @file{TAGS} file to use, the
+command will request that you specify one from the minibuffer, the
+first time you use the command. You may later change your @file{TAGS}
+file by using the regular Emacs command @w{@kbd{M-x visit-tags-table}},
+which will ask you to name the precise @file{TAGS} file you want
+to use. @xref{Tags, , Tag Tables, emacs, The Emacs Editor}.
+
+Each time you use the @kbd{,} command, the search resumes from where it was
+left by the previous search, and goes through all program sources,
+obeying the @file{TAGS} file, until all sources have been processed.
+However, by giving a prefix argument to the command @w{(@kbd{C-u
+,})}, you may request that the search be restarted all over again
+from the first program source; but in this case, strings that you
+recently marked as translatable will be automatically skipped.
+
+Using this @kbd{,} command does not prevent using of other regular
+Emacs tags commands. For example, regular @code{tags-search} or
+@code{tags-query-replace} commands may be used without disrupting the
+independent @kbd{,} search sequence. However, as implemented, the
+@emph{initial} @kbd{,} command (or the @kbd{,} command is used with a
+prefix) might also reinitialize the regular Emacs tags searching to the
+first tags file, this reinitialization might be considered spurious.
+
+The @kbd{M-,} (@code{po-mark-translatable}) command will mark the
+recently found string with the @samp{_} keyword. The @kbd{M-.}
+(@code{po-select-mark-and-mark}) command will request that you type
+one keyword from the minibuffer and use that keyword for marking
+the string. Both commands will automatically create a new PO file
+untranslated entry for the string being marked, and make it the
+current entry (making it easy for you to immediately proceed to its
+translation, if you feel like doing it right away). It is possible
+that the modifications made to the program source by @kbd{M-,} or
+@kbd{M-.} render some source line longer than 80 columns, forcing you
+to break and re-indent this line differently. You may use the @kbd{O}
+command from PO mode, or any other window changing command from
+Emacs, to break out into the program source window, and do any
+needed adjustments. You will have to use some regular Emacs command
+to return the cursor to the PO file window, if you want command
+@kbd{,} for the next string, say.
+
+The @kbd{M-.} command has a few built-in speedups, so you do not
+have to explicitly type all keywords all the time. The first such
+speedup is that you are presented with a @emph{preferred} keyword,
+which you may accept by merely typing @kbd{@key{RET}} at the prompt.
+The second speedup is that you may type any non-ambiguous prefix of the
+keyword you really mean, and the command will complete it automatically
+for you. This also means that PO mode has to @emph{know} all
+your possible keywords, and that it will not accept mistyped keywords.
+
+If you reply @kbd{?} to the keyword request, the command gives a
+list of all known keywords, from which you may choose. When the
+command is prefixed by an argument @w{(@kbd{C-u M-.})}, it inhibits
+updating any program source or PO file buffer, and does some simple
+keyword management instead. In this case, the command asks for a
+keyword, written in full, which becomes a new allowed keyword for
+later @kbd{M-.} commands. Moreover, this new keyword automatically
+becomes the @emph{preferred} keyword for later commands. By typing
+an already known keyword in response to @w{@kbd{C-u M-.}}, one merely
+changes the @emph{preferred} keyword and does nothing more.
+
+All keywords known for @kbd{M-.} are recognized by the @kbd{,} command
+when scanning for strings, and strings already marked by any of those
+known keywords are automatically skipped. If many PO files are opened
+simultaneously, each one has its own independent set of known keywords.
+There is no provision in PO mode, currently, for deleting a known
+keyword, you have to quit the file (maybe using @kbd{q}) and reopen
+it afresh. When a PO file is newly brought up in an Emacs window, only
+@samp{gettext} and @samp{_} are known as keywords, and @samp{gettext}
+is preferred for the @kbd{M-.} command. In fact, this is not useful to
+prefer @samp{_}, as this one is already built in the @kbd{M-,} command.
+
+@node c-format, Special cases, Marking, Sources
+@section Special Comments preceding Keywords
+
+@c FIXME document c-format and no-c-format.
+
+In C programs strings are often used within calls of functions from the
+@code{printf} family. The special thing about these format strings is
+that they can contain format specifiers introduced with @kbd{%}. Assume
+we have the code
+
+@example
+printf (gettext ("String `%s' has %d characters\n"), s, strlen (s));
+@end example
+
+@noindent
+A possible German translation for the above string might be:
+
+@example
+"%d Zeichen lang ist die Zeichenkette `%s'"
+@end example
+
+A C programmer, even if he cannot speak German, will recognize that
+there is something wrong here. The order of the two format specifiers
+is changed but of course the arguments in the @code{printf} don't have.
+This will most probably lead to problems because now the length of the
+string is regarded as the address.
+
+To prevent errors at runtime caused by translations the @code{msgfmt}
+tool can check statically whether the arguments in the original and the
+translation string match in type and number. If this is not the case a
+warning will be given and the error cannot causes problems at runtime.
+
+@noindent
+If the word order in the above German translation would be correct one
+would have to write
+
+@example
+"%2$d Zeichen lang ist die Zeichenkette `%1$s'"
+@end example
+
+@noindent
+The routines in @code{msgfmt} know about this special notation.
+
+Because not all strings in a program must be format strings it is not
+useful for @code{msgfmt} to test all the strings in the @file{.po} file.
+This might cause problems because the string might contain what looks
+like a format specifier, but the string is not used in @code{printf}.
+
+Therefore the @code{xgettext} adds a special tag to those messages it
+thinks might be a format string. There is no absolute rule for this,
+only a heuristic. In the @file{.po} file the entry is marked using the
+@code{c-format} flag in the @kbd{#,} comment line (@pxref{PO Files}).
+
+The careful reader now might say that this again can cause problems.
+The heuristic might guess it wrong. This is true and therefore
+@code{xgettext} knows about special kind of comment which lets
+the programmer take over the decision. If in the same line or
+the immediately preceding line of the @code{gettext} keyword
+the @code{xgettext} program find a comment containing the words
+@kbd{xgettext:c-format} it will mark the string in any case with
+the @kbd{c-format} flag. This kind of comment should be used when
+@code{xgettext} does not recognize the string as a format string but
+is really is one and it should be tested. Please note that when the
+comment is in the same line of the @code{gettext} keyword, it must be
+before the string to be translated.
+
+This situation happens quite often. The @code{printf} function is often
+called with strings which do not contain a format specifier. Of course
+one would normally use @code{fputs} but it does happen. In this case
+@code{xgettext} does not recognize this as a format string but what
+happens if the translation introduces a valid format specifier? The
+@code{printf} function will try to access one of the parameter but none
+exists because the original code does not refer to any parameter.
+
+@code{xgettext} of course could make a wrong decision the other way
+round. A string marked as a format string is not really a format
+string. In this case the @code{msgfmt} might give too many warnings and
+would prevent translating the @file{.po} file. The method to prevent
+this wrong decision is similar to the one used above, only the comment
+to use must contain the string @kbd{xgettext:no-c-format}.
+
+If a string is marked with @kbd{c-format} and this is not correct the
+user can find out who is responsible for the decision. See
+@ref{xgettext Invocation} to see how the @kbd{--debug} option can be
+used for solving this problem.
+
+@node Special cases, , c-format, Sources
+@section Special Cases of Translatable Strings
+
+The attentive reader might now point out that it is not always possible
+to mark translatable string with @code{gettext} or something like this.
+Consider the following case:
+
+@example
+@group
+@{
+ static const char *messages[] = @{
+ "some very meaningful message",
+ "and another one"
+ @};
+ const char *string;
+ @dots{}
+ string
+ = index > 1 ? "a default message" : messages[index];
+
+ fputs (string);
+ @dots{}
+@}
+@end group
+@end example
+
+While it is no problem to mark the string @code{"a default message"} it
+is not possible to mark the string initializers for @code{messages}.
+What is to be done? We have to fulfill two tasks. First we have to mark the
+strings so that the @code{xgettext} program (@pxref{xgettext Invocation})
+can find them, and second we have to translate the string at runtime
+before printing them.
+
+The first task can be fulfilled by creating a new keyword, which names a
+no-op. For the second we have to mark all access points to a string
+from the array. So one solution can look like this:
+
+@example
+@group
+#define gettext_noop(String) (String)
+
+@{
+ static const char *messages[] = @{
+ gettext_noop ("some very meaningful message"),
+ gettext_noop ("and another one")
+ @};
+ const char *string;
+ @dots{}
+ string
+ = index > 1 ? gettext ("a default message") : gettext (messages[index]);
+
+ fputs (string);
+ @dots{}
+@}
+@end group
+@end example
+
+Please convince yourself that the string which is written by
+@code{fputs} is translated in any case. How to get @code{xgettext} know
+the additional keyword @code{gettext_noop} is explained in @ref{xgettext
+Invocation}.
+
+The above is of course not the only solution. You could also come along
+with the following one:
+
+@example
+@group
+#define gettext_noop(String) (String)
+
+@{
+ static const char *messages[] = @{
+ gettext_noop ("some very meaningful message",
+ gettext_noop ("and another one")
+ @};
+ const char *string;
+ @dots{}
+ string
+ = index > 1 ? gettext_noop ("a default message") : messages[index];
+
+ fputs (gettext (string));
+ @dots{}
+@}
+@end group
+@end example
+
+But this has some drawbacks. First the programmer has to take care that
+he uses @code{gettext_noop} for the string @code{"a default message"}.
+A use of @code{gettext} could have in rare cases unpredictable results.
+The second reason is found in the internals of the GNU @code{gettext}
+Library which will make this solution less efficient.
+
+One advantage is that you need not make control flow analysis to make
+sure the output is really translated in any case. But this analysis is
+generally not very difficult. If it should be in any situation you can
+use this second method in this situation.
+
+@node Initial, Updating, Sources, Top
+@chapter Making the Initial PO File
+
+@c FIXME: Rewrite.
+
+@menu
+* xgettext Invocation:: Invoking the @code{xgettext} Program
+* C Sources Context:: C Sources Context
+* Compendium:: Using Translation Compendiums
+@end menu
+
+@node xgettext Invocation, C Sources Context, Initial, Initial
+@section Invoking the @code{xgettext} Program
+
+@c FIXME: Rewrite.
+
+@example
+xgettext [@var{option}] @var{inputfile} @dots{}
+@end example
+
+@table @samp
+@item -a
+@itemx --extract-all
+Extract all strings.
+
+@item -c [@var{tag}]
+@itemx --add-comments[=@var{tag}]
+Place comment block with @var{tag} (or those preceding keyword lines)
+in output file.
+
+@item -C
+@itemx --c++
+Recognize C++ style comments.
+
+@itemx --debug
+Use the flags @kbd{c-format} and @kbd{possible-c-format} to show who was
+responsible for marking a message as a format string. The later form is
+used if the @code{xgettext} program decided, the format form is used if
+the programmer prescribed it.
+
+By default only the @kbd{c-format} form is used. The translator should
+not have to care about these details.
+
+@item -d @var{name}
+@itemx --default-domain=@var{name}
+Use @file{@var{name}.po} for output (instead of @file{messages.po}).
+
+The special domain name @file{-} or @file{/dev/stdout} means to write
+the output to @file{stdout}.
+
+@item -D @var{directory}
+@itemx --directory=@var{directory}
+Change to @var{directory} before beginning to search and scan source
+files. The resulting @file{.po} file will be written relative to the
+original directory, though.
+
+@item -f @var{file}
+@itemx --files-from=@var{file}
+Read the names of the input files from @var{file} instead of getting
+them from the command line.
+
+@itemx --force
+Always write output file even if no message is defined.
+
+@item -h
+@itemx --help
+Display this help and exit.
+
+@item -I @var{list}
+@itemx --input-path=@var{list}
+List of directories searched for input files.
+
+@item -j
+@itemx --join-existing
+Join messages with existing file.
+
+@item -k @var{word}
+@itemx --keyword[=@var{word}]
+Additonal keyword to be looked for (without @var{word} means not to
+use default keywords).
+
+The default keywords, which are always looked for if not explicitly
+disabled, are @code{gettext}, @code{dgettext}, @code{dcgettext} and
+@code{gettext_noop}.
+
+@item -m [@var{string}]
+@itemx --msgstr-prefix[=@var{string}]
+Use @var{string} or "" as prefix for msgstr entries.
+
+@item -M [@var{string}]
+@itemx --msgstr-suffix[=@var{string}]
+Use @var{string} or "" as suffix for msgstr entries.
+
+@item --no-location
+Do not write @samp{#: @var{filename}:@var{line}} lines.
+
+@item -n
+@itemx --add-location
+Generate @samp{#: @var{filename}:@var{line}} lines (default).
+
+@item --omit-header
+Don't write header with @samp{msgid ""} entry.
+
+This is useful for testing purposes because it eliminates a source
+of variance for generated @code{.gmo} files. We can ship some of
+these files in the GNU @code{gettext} package, and the result of
+regenerating them through @code{msgfmt} should yield the same values.
+
+@item -p @var{dir}
+@itemx --output-dir=@var{dir}
+Output files will be placed in directory @var{dir}.
+
+@item -s
+@itemx --sort-output
+Generate sorted output and remove duplicates.
+
+@item --strict
+Write out strict Uniforum conforming PO file.
+
+@item -v
+@itemx --version
+Output version information and exit.
+
+@item -x @var{file}
+@itemx --exclude-file=@var{file}
+Entries from @var{file} are not extracted.
+
+@end table
+
+Search path for supplementary PO files is:
+@file{/usr/local/share/nls/src/}.
+
+If @var{inputfile} is @samp{-}, standard input is read.
+
+This implementation of @code{xgettext} is able to process a few awkward
+cases, like strings in preprocessor macros, ANSI concatenation of
+adjacent strings, and escaped end of lines for continued strings.
+
+@node C Sources Context, Compendium, xgettext Invocation, Initial
+@section C Sources Context
+
+PO mode is particularily powerful when used with PO files
+created through GNU @code{gettext} utilities, as those utilities
+insert special comments in the PO files they generate.
+Some of these special comments relate the PO file entry to
+exactly where the untranslated string appears in the program sources.
+
+When the translator gets to an untranslated entry, she is fairly
+often faced with an original string which is not as informative as
+it normally should be, being succinct, cryptic, or otherwise ambiguous.
+Before chosing how to translate the string, she needs to understand
+better what the string really means and how tight the translation has
+to be. Most of times, when problems arise, the only way left to make
+her judgment is looking at the true program sources from where this
+string originated, searching for surrounding comments the programmer
+might have put in there, and looking around for helping clues of
+@emph{any} kind.
+
+Surely, when looking at program sources, the translator will receive
+more help if she is a fluent programmer. However, even if she is
+not versed in programming and feels a little lost in C code, the
+translator should not be shy at taking a look, once in a while.
+It is most probable that she will still be able to find some of the
+hints she needs. She will learn quickly to not feel uncomfortable
+in program code, paying more attention to programmer's comments,
+variable and function names (if he dared chosing them well), and
+overall organization, than to programmation itself.
+
+The following commands are meant to help the translator at getting
+program source context for a PO file entry.
+
+@table @kbd
+@item s
+Resume the display of a program source context, or cycle through them.
+
+@item M-s
+Display of a program source context selected by menu.
+
+@item S
+Add a directory to the search path for source files.
+
+@item M-S
+Delete a directory from the search path for source files.
+
+@end table
+
+The commands @kbd{s} (@code{po-cycle-reference}) and @kbd{M-s}
+(@code{po-select-source-reference}) both open another window displaying
+some source program file, and already positioned in such a way that
+it shows an actual use of the string to be translated. By doing
+so, the command gives source program context for the string. But if
+the entry has no source context references, or if all references
+are unresolved along the search path for program sources, then the
+command diagnoses this as an error.
+
+Even if @kbd{s} (or @kbd{M-s}) opens a new window, the cursor stays
+in the PO file window. If the translator really wants to
+get into the program source window, she ought to do it explicitly,
+maybe by using command @kbd{O}.
+
+When @kbd{s} is typed for the first time, or for a PO file entry which
+is different of the last one used for getting source context, then the
+command reacts by giving the first context available for this entry,
+if any. If some context has already been recently displayed for the
+current PO file entry, and the translator wandered off to do other
+things, typing @kbd{s} again will merely resume, in another window,
+the context last displayed. In particular, if the translator moved
+the cursor away from the context in the source file, the command will
+bring the cursor back to the context. By using @kbd{s} many times
+in a row, with no other commands intervening, PO mode will cycle to
+the next available contexts for this particular entry, getting back
+to the first context once the last has been shown.
+
+The command @kbd{M-s} behaves differently. Instead of cycling through
+references, it lets the translator choose of particular reference among
+many, and displays that reference. It is best used with completion,
+if the translator types @kbd{@key{TAB}} immediately after @kbd{M-s}, in
+response to the question, she will be offered a menu of all possible
+references, as a reminder of which are the acceptable answers.
+This command is useful only where there are really many contexts
+available for a single string to translate.
+
+Program source files are usually found relative to where the PO
+file stands. As a special provision, when this fails, the file is
+also looked for, but relative to the directory immediately above it.
+Those two cases take proper care of most PO files. However, it might
+happen that a PO file has been moved, or is edited in a different
+place than its normal location. When this happens, the translator
+should tell PO mode in which directory normally sits the genuine PO
+file. Many such directories may be specified, and all together, they
+constitute what is called the @dfn{search path} for program sources.
+The command @kbd{S} (@code{po-consider-source-path}) is used to interactively
+enter a new directory at the front of the search path, and the command
+@kbd{M-S} (@code{po-ignore-source-path}) is used to select, with completion,
+one of the directories she does not want anymore on the search path.
+
+@node Compendium, , C Sources Context, Initial
+@section Using Translation Compendiums
+
+@c FIXME: Rewrite.
+
+Compendiums are yet to be implemented.
+
+An incoming PO mode feature will let the translator maintain a
+compendium of already achieved translations. A @dfn{compendium}
+is a special PO file containing a set of translations recurring in
+many different packages. The translator will be given commands for
+adding entries to her compendium, and later initializing untranslated
+entries, or updating already translated entries, from translations
+kept in the compendium. For this to work, however, the compendium
+would have to be normalized. @xref{Normalizing}.
+
+@c It is not useful that I modify the @file{lib/} routines if not done in
+@c the true sources. How do you/I/they proceed for getting this job done?
+@c I presume that @file{lib/} routines will all use @code{gettext} for
+@c the time being.
+
+@node Updating, Binaries, Initial, Top
+@chapter Updating Existing PO Files
+
+@c FIXME: Rewrite.
+
+@menu
+* msgmerge Invocation:: Invoking the @code{msgmerge} Program
+* Translated Entries:: Translated Entries
+* Fuzzy Entries:: Fuzzy Entries
+* Untranslated Entries:: Untranslated Entries
+* Obsolete Entries:: Obsolete Entries
+* Modifying Translations:: Modifying Translations
+* Modifying Comments:: Modifying Comments
+* Subedit:: Mode for Editing Translations
+* Auxiliary:: Consulting Auxiliary PO Files
+@end menu
+
+@node msgmerge Invocation, Translated Entries, Updating, Updating
+@section Invoking the @code{msgmerge} Program
+
+@c FIXME: Rewrite.
+
+@c @example
+@c tupdate --help
+@c tupdate --version
+@c tupdate @var{new} @var{old}
+@c @end example
+
+@c File @var{new} is the last created PO file (generally by
+@c @code{xgettext}). It need not contain any translations. File
+@c @var{old} is the PO file including the old translations which will
+@c be taken over to the newly created file as long as they still match.
+
+@c When English messages change in the programs, this is reflected in
+@c the PO file as extracted by @code{xgettext}. In large messages, that
+@c can be hard to detect, and will obviously result in an incomplete
+@c translation. One of the virtues of @code{tupdate} is that it detects
+@c such changes, saving the previous translation into a PO file comment,
+@c so marking the entry as obsolete, and giving the modified string with
+@c an empty translation, that is, marking the entry as untranslated.
+
+@node Translated Entries, Fuzzy Entries, msgmerge Invocation, Updating
+@section Translated Entries
+
+Each PO file entry for which the @code{msgstr} field has been filled with
+a translation, and which is not marked as fuzzy (@pxref{Fuzzy Entries}),
+is a said to be a @dfn{translated} entry. Only translated entries will
+later be compiled by GNU @code{msgfmt} and become usable in programs.
+Other entry types will be excluded; translation will not occur for them.
+
+Some commands are more specifically related to translated entry processing.
+
+@table @kbd
+@item t
+Find the next translated entry.
+
+@item M-t
+Find the previous translated entry.
+
+@end table
+
+The commands @kbd{t} (@code{po-next-translated-entry}) and @kbd{M-t}
+(@code{po-previous-transted-entry}) move forwards or backwards, chasing
+for an translated entry. If none is found, the search is extended and
+wraps around in the PO file buffer.
+
+Translated entries usually result from the translator having edited in
+a translation for them, @ref{Modifying Translations}. However, if the
+variable @code{po-auto-fuzzy-on-edit} is not @code{nil}, the entry having
+received a new translation first becomes a fuzzy entry, which ought to
+be later unfuzzied before becoming an official, genuine translated entry.
+@xref{Fuzzy Entries}.
+
+@node Fuzzy Entries, Untranslated Entries, Translated Entries, Updating
+@section Fuzzy Entries
+
+Each PO file entry may have a set of @dfn{attributes}, which are
+qualities given an name and explicitely associated with the entry
+translation, using a special system comment. One of these attributes
+has the name @code{fuzzy}, and entries having this attribute are said
+to have a fuzzy translation. They are called fuzzy entries, for short.
+
+Fuzzy entries, even if they account for translated entries for
+most other purposes, usually call for revision by the translator.
+Those may be produced by applying the program @code{msgmerge} to
+update an older translated PO files according to a new PO template
+file, when this tool hypothesises that some new @code{msgid} has
+been modified only slightly out of an older one, and chooses to pair
+what it thinks to be the old translation for the new modified entry.
+The slight alteration in the original string (the @code{msgid} string)
+should often be reflected in the translated string, and this requires
+the intervention of the translator. For this reason, @code{msgmerge}
+might mark some entries as being fuzzy.
+
+Also, the translator may decide herself to mark an entry as fuzzy
+for her own convenience, when she wants to remember that the entry
+has to be later revisited. So, some commands are more specifically
+related to fuzzy entry processing.
+
+@table @kbd
+@item f
+Find the next fuzzy entry.
+
+@item M-f
+Find the previous fuzzy entry.
+
+@item @key{TAB}
+Remove the fuzzy attribute of the current entry.
+
+@end table
+
+The commands @kbd{f} (@code{po-next-fuzzy}) and @kbd{M-f}
+(@code{po-previous-fuzzy}) move forwards or backwards, chasing for
+a fuzzy entry. If none is found, the search is extended and wraps
+around in the PO file buffer.
+
+The command @kbd{@key{TAB}} (@code{po-unfuzzy}) removes the fuzzy
+attribute associated with an entry, usually leaving it translated.
+Further, if the variable @code{po-auto-select-on-unfuzzy} has not
+the @code{nil} value, the @kbd{@key{TAB}} command will automatically chase
+for another interesting entry to work on. The initial value of
+@code{po-auto-select-on-unfuzzy} is @code{nil}.
+
+The initial value of @code{po-auto-fuzzy-on-edit} is @code{nil}. However,
+if the variable @code{po-auto-fuzzy-on-edit} is set to @code{t}, any entry
+edited through the @kbd{@key{RET}} command is marked fuzzy, as a way to
+ensure some kind of double check, later. In this case, the usual paradigm
+is that an entry becomes fuzzy (if not already) whenever the translator
+modifies it. If she is satisfied with the translation, she then uses
+@kbd{@key{TAB}} to pick another entry to work on, clearing the fuzzy attribute
+on the same blow. If she is not satisfied yet, she merely uses @kbd{@key{SPC}}
+to chase another entry, leaving the entry fuzzy.
+
+The translator may also use the @kbd{@key{DEL}} command
+(@code{po-fade-out-entry}) over any translated entry to mark it as being
+fuzzy, when she wants to easily leave a trace she wants to later return
+working at this entry.
+
+Also, when time comes to quit working on a PO file buffer with the @kbd{q}
+command, the translator is asked for confirmation, if fuzzy string
+still exists.
+
+@node Untranslated Entries, Obsolete Entries, Fuzzy Entries, Updating
+@section Untranslated Entries
+
+When @code{xgettext} originally creates a PO file, unless told
+otherwise, it initializes the @code{msgid} field with the untranslated
+string, and leaves the @code{msgstr} string to be empty. Such entries,
+having an empty translation, are said to be @dfn{untranslated} entries.
+Later, when the programmer slightly modifies some string right in
+the program, this change is later reflected in the PO file
+by the appearance of a new untranslated entry for the modified string.
+
+The usual commands moving from entry to entry consider untranslated
+entries on the same level as active entries. Untranslated entries
+are easily recognizable by the fact they end with @w{@samp{msgstr ""}}.
+
+The work of the translator might be (quite naively) seen as the process
+of seeking after an untranslated entry, editing a translation for
+it, and repeating these actions until no untranslated entries remain.
+Some commands are more specifically related to untranslated entry
+processing.
+
+@table @kbd
+@item u
+Find the next untranslated entry.
+
+@item M-u
+Find the previous untranslated entry.
+
+@item k
+Turn the current entry into an untranslated one.
+
+@end table
+
+The commands @kbd{u} (@code{po-next-untranslated-entry}) and @kbd{M-u}
+(@code{po-previous-untransted-entry}) move forwards or backwards,
+chasing for an untranslated entry. If none is found, the search is
+extended and wraps around in the PO file buffer.
+
+An entry can be turned back into an untranslated entry by
+merely emptying its translation, using the command @kbd{k}
+(@code{po-kill-msgstr}). @xref{Modifying Translations}.
+
+Also, when time comes to quit working on a PO file buffer
+with the @kbd{q} command, the translator is asked for confirmation,
+if some untranslated string still exists.
+
+@node Obsolete Entries, Modifying Translations, Untranslated Entries, Updating
+@section Obsolete Entries
+
+By @dfn{obsolete} PO file entries, we mean those entries which are
+commented out, usually by @code{msgmerge} when it found that the
+translation is not needed anymore by the package being localized.
+
+The usual commands moving from entry to entry consider obsolete
+entries on the same level as active entries. Obsolete entries are
+easily recognizable by the fact that all their lines start with
+@kbd{#}, even those lines containing @code{msgid} or @code{msgstr}.
+
+Commands exist for emptying the translation or reinitializing it
+to the original untranslated string. Commands interfacing with the
+kill ring may force some previously saved text into the translation.
+The user may interactively edit the translation. All these commands
+may apply to obsolete entries, carefully leaving the entry obsolete
+after the fact.
+
+Moreover, some commands are more specifically related to obsolete
+entry processing.
+
+@table @kbd
+@item o
+Find the next obsolete entry.
+
+@item M-o
+Find the previous obsolete entry.
+
+@item @key{DEL}
+Make an active entry obsolete, or zap out an obsolete entry.
+
+@end table
+
+The commands @kbd{o} (@code{po-next-obsolete-entry}) and @kbd{M-o}
+(@code{po-previous-obsolete-entry}) move forwards or backwards,
+chasing for an obsolete entry. If none is found, the search is
+extended and wraps around in the PO file buffer.
+
+PO mode does not provide ways for un-commenting an obsolete entry
+and making it active, because this would reintroduce an original
+untranslated string which does not correspond to any marked string
+in the program sources. This goes with the philosophy of never
+introducing useless @code{msgid} values.
+
+However, it is possible to comment out an active entry, so making
+it obsolete. GNU @code{gettext} utilities will later react to the
+disappearance of a translation by using the untranslated string.
+The command @kbd{@key{DEL}} (@code{po-fade-out-entry}) pushes the current entry
+a little further towards annihilation. If the entry is active (it is a
+translated entry), then it is first made fuzzy. If it is already fuzzy,
+then the entry is merely commented out, with confirmation. If the entry
+is already obsolete, then it is completely deleted from the PO file.
+It is easy to recycle the translation so deleted into some other PO file
+entry, usually one which is untranslated. @xref{Modifying Translations}.
+
+Here is a quite interesting problem to solve for later development of
+PO mode, for those nights you are not sleepy. The idea would be that
+PO mode might become bright enough, one of these days, to make good
+guesses at retrieving the most probable candidate, among all obsolete
+entries, for initializing the translation of a newly appeared string.
+I think it might be a quite hard problem to do this algorithmically, as
+we have to develop good and efficient measures of string similarity.
+Right now, PO mode completely lets the decision to the translator,
+when the time comes to find the adequate obsolete translation, it
+merely tries to provide handy tools for helping her to do so.
+
+@node Modifying Translations, Modifying Comments, Obsolete Entries, Updating
+@section Modifying Translations
+
+PO mode prevents direct edition of the PO file, by the usual
+means Emacs give for altering a buffer's contents. By doing so,
+it pretends helping the translator to avoid little clerical errors
+about the overall file format, or the proper quoting of strings,
+as those errors would be easily made. Other kinds of errors are
+still possible, but some may be caught and diagnosed by the batch
+validation process, which the translator may always trigger by the
+@kbd{V} command. For all other errors, the translator has to rely on
+her own judgment, and also on the linguistic reports submitted to her
+by the users of the translated package, having the same mother tongue.
+
+When the time comes to create a translation, correct an error diagnosed
+mechanically or reported by a user, the translators have to resort to
+using the following commands for modifying the translations.
+
+@table @kbd
+@item @key{RET}
+Interactively edit the translation.
+
+@item @key{LFD}
+Reinitialize the translation with the original, untranslated string.
+
+@item k
+Save the translation on the kill ring, and delete it.
+
+@item w
+Save the translation on the kill ring, without deleting it.
+
+@item y
+Replace the translation, taking the new from the kill ring.
+
+@end table
+
+The command @kbd{@key{RET}} (@code{po-edit-msgstr}) opens a new Emacs
+window meant to edit in a new translation, or to modify an already existing
+translation. The new window contains a copy of the translation taken from
+the current PO file entry, all ready for edition, expunged of all quoting
+marks, fully modifiable and with the complete extent of Emacs modifying
+commands. When the translator is done with her modifications, she may use
+@w{@kbd{C-c C-c}} to close the subedit window with the automatically requoted
+results, or @w{@kbd{C-c C-k}} to abort her modifications. @xref{Subedit},
+for more information.
+
+The command @kbd{@key{LFD}} (@code{po-msgid-to-msgstr}) initializes, or
+reinitializes the translation with the original string. This command is
+normally used when the translator wants to redo a fresh translation of
+the original string, disregarding any previous work.
+
+It is possible to arrange so, whenever editing an untranslated
+entry, the @kbd{@key{LFD}} command be automatically executed. If you set
+@code{po-auto-edit-with-msgid} to @code{t}, the translation gets
+initialised with the original string, in case none exist already.
+The default value for @code{po-auto-edit-with-msgid} is @code{nil}.
+
+In fact, whether it is best to start a translation with an empty
+string, or rather with a copy of the original string, is a matter of
+taste or habit. Sometimes, the source language and the
+target language are so different that is simply best to start writing
+on an empty page. At other times, the source and target languages
+are so close that it would be a waste to retype a number of words
+already being written in the original string. A translator may also
+like having the original string right under her eyes, as she will
+progressively overwrite the original text with the translation, even
+if this requires some extra editing work to get rid of the original.
+
+The command @kbd{k} (@code{po-kill-msgstr}) merely empties the
+translation string, so turning the entry into an untranslated
+one. But while doing so, its previous contents is put apart in
+a special place, known as the kill ring. The command @kbd{w}
+(@code{po-kill-ring-save-msgstr}) has also the effect of taking a
+copy of the translation onto the kill ring, but it otherwise leaves
+the entry alone, and does @emph{not} remove the translation from the
+entry. Both commands use exactly the Emacs kill ring, which is shared
+between buffers, and which is well known already to Emacs lovers.
+
+The translator may use @kbd{k} or @kbd{w} many times in the course
+of her work, as the kill ring may hold several saved translations.
+From the kill ring, strings may later be reinserted in various
+Emacs buffers. In particular, the kill ring may be used for moving
+translation strings between different entries of a single PO file
+buffer, or if the translator is handling many such buffers at once,
+even between PO files.
+
+To facilitate exchanges with buffers which are not in PO mode, the
+translation string put on the kill ring by the @kbd{k} command is fully
+unquoted before being saved: external quotes are removed, multi-lines
+strings are concatenated, and backslashed escaped sequences are turned
+into their corresponding characters. In the special case of obsolete
+entries, the translation is also uncommented prior to saving.
+
+The command @kbd{y} (@code{po-yank-msgstr}) completely replaces the
+translation of the current entry by a string taken from the kill ring.
+Following Emacs terminology, we then say that the replacement
+string is @dfn{yanked} into the PO file buffer.
+@xref{Yanking, , , emacs, The Emacs Editor}.
+The first time @kbd{y} is used, the translation receives the value of
+the most recent addition to the kill ring. If @kbd{y} is typed once
+again, immediately, without intervening keystrokes, the translation
+just inserted is taken away and replaced by the second most recent
+addition to the kill ring. By repeating @kbd{y} many times in a row,
+the translator may travel along the kill ring for saved strings,
+until she finds the string she really wanted.
+
+When a string is yanked into a PO file entry, it is fully and
+automatically requoted for complying with the format PO files should
+have. Further, if the entry is obsolete, PO mode then appropriately
+push the inserted string inside comments. Once again, translators
+should not burden themselves with quoting considerations besides, of
+course, the necessity of the translated string itself respective to
+the program using it.
+
+Note that @kbd{k} or @kbd{w} are not the only commands pushing strings
+on the kill ring, as almost any PO mode command replacing translation
+strings (or the translator comments) automatically save the old string
+on the kill ring. The main exceptions to this general rule are the
+yanking commands themselves.
+
+To better illustrate the operation of killing and yanking, let's
+use an actual example, taken from a common situation. When the
+programmer slightly modifies some string right in the program, his
+change is later reflected in the PO file by the appearance
+of a new untranslated entry for the modified string, and the fact
+that the entry translating the original or unmodified string becomes
+obsolete. In many cases, the translator might spare herself some work
+by retrieving the unmodified translation from the obsolete entry,
+then initializing the untranslated entry @code{msgstr} field with
+this retrieved translation. Once this done, the obsolete entry is
+not wanted anymore, and may be safely deleted.
+
+When the translator finds an untranslated entry and suspects that a
+slight variant of the translation exists, she immediately uses @kbd{m}
+to mark the current entry location, then starts chasing obsolete
+entries with @kbd{o}, hoping to find some translation corresponding
+to the unmodified string. Once found, she uses the @kbd{@key{DEL}} command
+for deleting the obsolete entry, knowing that @kbd{@key{DEL}} also @emph{kills}
+the translation, that is, pushes the translation on the kill ring.
+Then, @kbd{r} returns to the initial untranslated entry, @kbd{y}
+then @emph{yanks} the saved translation right into the @code{msgstr}
+field. The translator is then free to use @kbd{@key{RET}} for fine
+tuning the translation contents, and maybe to later use @kbd{u},
+then @kbd{m} again, for going on with the next untranslated string.
+
+When some sequence of keys has to be typed over and over again, the
+translator may find it useful to become better acquainted with the Emacs
+capability of learning these sequences and playing them back under request.
+@xref{Keyboard Macros, , , emacs, The Emacs Editor}.
+
+@node Modifying Comments, Subedit, Modifying Translations, Updating
+@section Modifying Comments
+
+Any translation work done seriously will raise many linguistic
+difficulties, for which decisions have to be made, and the choices
+further documented. These documents may be saved within the
+PO file in form of translator comments, which the translator
+is free to create, delete, or modify at will. These comments may
+be useful to herself when she returns to this PO file after a while.
+
+Comments not having whitespace after the initial @samp{#}, for example,
+those beginning with @samp{#.} or @samp{#:}, are @emph{not} translator
+comments, they are exclusively created by other @code{gettext} tools.
+So, the commands below will never alter such system added comments,
+they are not meant for the translator to modify. @xref{PO Files}.
+
+The following commands are somewhat similar to those modifying translations,
+so the general indications given for those apply here. @xref{Modifying
+Translations}.
+
+@table @kbd
+
+@item #
+Interactively edit the translator comments.
+
+@item K
+Save the translator comments on the kill ring, and delete it.
+
+@item W
+Save the translator comments on the kill ring, without deleting it.
+
+@item Y
+Replace the translator comments, taking the new from the kill ring.
+
+@end table
+
+These commands parallel PO mode commands for modifying the translation
+strings, and behave much the same way as they do, except that they handle
+this part of PO file comments meant for translator usage, rather
+than the translation strings. So, if the descriptions given below are
+slightly succinct, it is because the full details have already been given.
+@xref{Modifying Translations}.
+
+The command @kbd{#} (@code{po-edit-comment}) opens a new Emacs window
+containing a copy of the translator comments on the current PO file entry.
+If there are no such comments, PO mode understands that the translator wants
+to add a comment to the entry, and she is presented with an empty screen.
+Comment marks (@kbd{#}) and the space following them are automatically
+removed before edition, and reinstated after. For translator comments
+pertaining to obsolete entries, the uncommenting and recommenting operations
+are done twice. Once in the editing window, the keys @w{@kbd{C-c C-c}}
+allow the translator to tell she is finished with editing the comment.
+@xref{Subedit}, for further details.
+
+Functions found on @code{po-subedit-mode-hook}, if any, are executed after
+the string has been inserted in the edit buffer.
+
+The command @kbd{K} (@code{po-kill-comment}) get rid of all
+translator comments, while saving those comments on the kill ring.
+The command @kbd{W} (@code{po-kill-ring-save-comment}) takes
+a copy of the translator comments on the kill ring, but leaves
+them undisturbed in the current entry. The command @kbd{Y}
+(@code{po-yank-comment}) completely replaces the translator comments
+by a string taken at the front of the kill ring. When this command
+is immediately repeated, the comments just inserted are withdrawn,
+and replaced by other strings taken along the kill ring.
+
+On the kill ring, all strings have the same nature. There is no
+distinction between @emph{translation} strings and @emph{translator
+comments} strings. So, for example, let's presume the translator
+has just finished editing a translation, and wants to create a new
+translator comment to document why the previous translation was
+not good, just to remember what was the problem. Foreseeing that she
+will do that in her documentation, the translator may want to quote
+the previous translation in her translator comments. To do so, she
+may initialize the translator comments with the previous translation,
+still at the head of the kill ring. Because editing already pushed the
+previous translation on the kill ring, she merely has to type @kbd{M-w}
+prior to @kbd{#}, and the previous translation will be right there,
+all ready for being introduced by some explanatory text.
+
+On the other hand, presume there are some translator comments already
+and that the translator wants to add to those comments, instead
+of wholly replacing them. Then, she should edit the comment right
+away with @kbd{#}. Once inside the editing window, she can use the
+regular Emacs commands @kbd{C-y} (@code{yank}) and @kbd{M-y}
+(@code{yank-pop}) to get the previous translation where she likes.
+
+@node Subedit, Auxiliary, Modifying Comments, Updating
+@section Details of Sub Edition
+
+The PO subedit minor mode has a few peculiarities worth being described
+in fuller detail. It installs a few commands over the usual editing set
+of Emacs, which are described below.
+
+@table @kbd
+@item C-c C-c
+Complete edition.
+
+@item C-c C-k
+Abort edition.
+
+@item C-c C-a
+Consult auxiliary PO files.
+
+@end table
+
+The windows contents represents a translation for a given message,
+or a translator comment. The translator may modify this window to
+her heart's content. Once this done, the command @w{@kbd{C-c C-c}}
+(@code{po-subedit-exit}) may be used to return the edited translation into
+the PO file, replacing the original translation, even if it moved out of
+sight or if buffers were switched.
+
+If the translator becomes unsatisfied with her translation or comment,
+to the extent she prefers keeping what was existent prior to the
+@kbd{@key{RET}} or @kbd{#} command, she may use the command @w{@kbd{C-c C-k}}
+(@code{po-subedit-abort}) to merely get rid of edition, while preserving
+the original translation or comment. Another way would be for her to exit
+normally with @w{@kbd{C-c C-c}}, then type @code{U} once for undoing the
+whole effect of last edition.
+
+The command @w{@kbd{C-c C-a}} allows for glancing through translations
+already achieved in other languages, directly while editing the current
+translation. This may be quite convenient when the translator is fluent
+at many languages, but of course, only makes sense when such completed
+auxiliary PO files are already available to her (@pxref{Auxiliary}).
+
+Functions found on @code{po-subedit-mode-hook}, if any, are executed after
+the string has been inserted in the edit buffer.
+
+While editing her translation, the translator should pay attention to not
+inserting unwanted @kbd{@key{RET}} (carriage returns) characters at the end
+of the translated string if those are not meant to be there, or to removing
+such characters when they are required. Since these characters are not
+visible in the editing buffer, they are easily introduced by mistake.
+To help her, @kbd{@key{RET}} automatically puts the character @kbd{<}
+at the end of the string being edited, but this @kbd{<} is not really
+part of the string. On exiting the editing window with @w{@kbd{C-c C-c}},
+PO mode automatically removes such @kbd{<} and all whitespace added after
+it. If the translator adds characters after the terminating @kbd{<}, it
+looses its delimiting property and integrally becomes part of the string.
+If she removes the delimiting @kbd{<}, then the edited string is taken
+@emph{as is}, with all trailing newlines, even if invisible. Also, if
+the translated string ought to end itself with a genuine @kbd{<}, then
+the delimiting @kbd{<} may not be removed; so the string should appear,
+in the editing window, as ending with two @kbd{<} in a row.
+
+When a translation (or a comment) is being edited, the translator may move
+the cursor back into the PO file buffer and freely move to other entries,
+browsing at will. If, with an edition pending, the translator wanders in the
+PO file buffer, she may decide to start modifying another entry. Each entry
+being edited has its own subedit buffer. It is possible to simultaneously
+edit the translation @emph{and} the comment of a single entry, or to
+edit entries in different PO files, all at once. Typing @kbd{@key{RET}}
+on a field already being edited merely resume that particular edit. Yet,
+the translator should better be comfortable at handling many Emacs windows!
+
+Pending subedits may be completed or aborted in any order, regardless
+of how or when they were started. When many subedits are pending and the
+translator asks for quitting the PO file (with the @kbd{q} command), subedits
+are automatically resumed one at a time, so she may decide for each of them.
+
+@node Auxiliary, , Subedit, Updating
+@section Consulting Auxiliary PO Files
+
+PO mode is able to help the knowledgeable translator, being fluent in
+many languages, at taking advantage of translations already achieved
+in other languages she just happens to know. It provides these other
+language translations as additional context for her own work. Moreover,
+it has features to ease the production of translations for many languages
+at once, for translators preferring to work in this way.
+
+An @dfn{auxiliary} PO file is an existing PO file meant for the same
+package the translator is working on, but targeted to a different mother
+tongue language. Commands exist for declaring and handling auxiliary
+PO files, and also for showing contexts for the entry under work.
+
+Here are the auxiliary file commands available in PO mode.
+
+@table @kbd
+@item a
+Seek auxiliary files for another translation for the same entry.
+
+@item M-a
+Switch to a particular auxiliary file.
+
+@item A
+Declare this PO file as an auxiliary file.
+
+@item M-A
+Remove this PO file from the list of auxiliary files.
+
+@end table
+
+Command @kbd{A} (@code{po-consider-as-auxiliary}) adds the current
+PO file to the list of auxiliary files, while command @kbd{M-A}
+(@code{po-ignore-as-auxiliary} just removes it.
+
+The command @kbd{a} (@code{po-cycle-auxiliary}) seeks all auxiliary PO
+files, round-robin, searching for a translated entry in some other language
+having an @code{msgid} field identical as the one for the current entry.
+The found PO file, if any, takes the place of the current PO file in
+the display (its window gets on top). Before doing so, the current PO
+file is also made into an auxiliary file, if not already. So, @kbd{a}
+in this newly displayed PO file will seek another PO file, and so on,
+so repeating @kbd{a} will eventually yield back the original PO file.
+
+The command @kbd{M-a} (@code{po-select-auxiliary}) asks the translator
+for her choice of a particular auxiliary file, with completion, and
+then switches to that selected PO file. The command also checks if
+the selected file has an @code{msgid} field identical as the one for
+the current entry, and if yes, this entry becomes current. Otherwise,
+the cursor of the selected file is left undisturbed.
+
+For all this to work fully, auxiliary PO files will have to be normalized,
+in that way that @code{msgid} fields should be written @emph{exactly}
+the same way. It is possible to write @code{msgid} fields in various
+ways for representing the same string, different writing would break the
+proper behaviour of the auxiliary file commands of PO mode. This is not
+expected to be much a problem in practice, as most existing PO files have
+their @code{msgid} entries written by the same GNU @code{gettext} tools.
+
+However, PO files initially created by PO mode itself, while marking
+strings in source files, are normalised differently. So are PO
+files resulting of the the @samp{M-x normalize} command. Until these
+discrepancies between PO mode and other GNU @code{gettext} tools get
+fully resolved, the translator should stay aware of normalisation issues.
+
+@node Binaries, Users, Updating, Top
+@chapter Producing Binary MO Files
+
+@c FIXME: Rewrite.
+
+@menu
+* msgfmt Invocation:: Invoking the @code{msgfmt} Program
+* MO Files:: The Format of GNU MO Files
+@end menu
+
+@node msgfmt Invocation, MO Files, Binaries, Binaries
+@section Invoking the @code{msgfmt} Program
+
+@c FIXME: Rewrite.
+
+@example
+Usage: msgfmt [@var{option}] @var{filename}.po @dots{}
+@end example
+
+@table @samp
+@item -a @var{number}
+@itemx --alignment=@var{number}
+Align strings to @var{number} bytes (default: 1).
+@c Currently the README mentions that this constant could be changed by
+@c the installer by changing the value in config.h. Should this go away?
+
+@item -h
+@itemx --help
+Display this help and exit.
+
+@item --no-hash
+Binary file will not include the hash table.
+
+@item -o @var{file}
+@itemx --output-file=@var{file}
+Specify output file name as @var{file}.
+
+@itemx --strict
+Direct the program to work strictly following the Uniforum/Sun
+implementation. Currently this only affects the naming of the output
+file. If this option is not given the name of the output file is the
+same as the domain name. If the strict Uniforum mode is enable the
+suffix @file{.mo} is added to the file name if it is not already
+present.
+
+We find this behaviour of Sun's implementation rather silly and so by
+default this mode is @emph{not} selected.
+
+@item -v
+@itemx --verbose
+Detect and diagnose input file anomalies which might represent
+translation errors. The @code{msgid} and @code{msgstr} strings are
+studied and compared. It is considered abnormal that one string
+starts or ends with a newline while the other does not.
+
+Also, if the string represents a format sring used in a
+@code{printf}-like function both strings should have the same number of
+@samp{%} format specifiers, with matching types. If the flag
+@code{c-format} or @code{possible-c-format} appears in the special
+comment @key{#,} for this entry a check is performed. For example, the
+check will diagnose using @samp{%.*s} against @samp{%s}, or @samp{%d}
+against @samp{%s}, or @samp{%d} against @samp{%x}. It can even handle
+positional parameters.
+
+Normally the @code{xgettext} program automatically decides whether a
+string is a format string or not. This algorithm is not perfect,
+though. It might regard a string as a format string though it is not
+used in a @code{printf}-like function and so @code{msgfmt} might report
+errors where there are none. Or the other way round: a string is not
+regarded as a format string but it is used in a @code{printf}-like
+function.
+
+So solve this problem the programmer can dictate the decision to the
+@code{xgettext} program (@pxref{c-format}). The translator should not
+consider removing the flag from the @key{#,} line. This "fix" would be
+reversed again as soon as @code{msgmerge} is called the next time.
+
+@item -V
+@itemx --version
+Output version information and exit.
+
+@end table
+
+If input file is @samp{-}, standard input is read. If output file
+is @samp{-}, output is written to standard output.
+
+@node MO Files, , msgfmt Invocation, Binaries
+@section The Format of GNU MO Files
+
+The format of the generated MO files is best described by a picture,
+which appears below.
+
+The first two words serve the identification of the file. The magic
+number will always signal GNU MO files. The number is stored in the
+byte order of the generating machine, so the magic number really is
+two numbers: @code{0x950412de} and @code{0xde120495}. The second
+word describes the current revision of the file format. For now the
+revision is 0. This might change in future versions, and ensures
+that the readers of MO files can distinguish new formats from old
+ones, so that both can be handled correctly. The version is kept
+separate from the magic number, instead of using different magic
+numbers for different formats, mainly because @file{/etc/magic} is
+not updated often. It might be better to have magic separated from
+internal format version identification.
+
+Follow a number of pointers to later tables in the file, allowing
+for the extension of the prefix part of MO files without having to
+recompile programs reading them. This might become useful for later
+inserting a few flag bits, indication about the charset used, new
+tables, or other things.
+
+Then, at offset @var{O} and offset @var{T} in the picture, two tables
+of string descriptors can be found. In both tables, each string
+descriptor uses two 32 bits integers, one for the string length,
+another for the offset of the string in the MO file, counting in bytes
+from the start of the file. The first table contains descriptors
+for the original strings, and is sorted so the original strings
+are in increasing lexicographical order. The second table contains
+descriptors for the translated strings, and is parallel to the first
+table: to find the corresponding translation one has to access the
+array slot in the second array with the same index.
+
+Having the original strings sorted enables the use of simple binary
+search, for when the MO file does not contain an hashing table, or
+for when it is not practical to use the hashing table provided in
+the MO file. This also has another advantage, as the empty string
+in a PO file GNU @code{gettext} is usually @emph{translated} into
+some system information attached to that particular MO file, and the
+empty string necessarily becomes the first in both the original and
+translated tables, making the system information very easy to find.
+
+The size @var{S} of the hash table can be zero. In this case, the
+hash table itself is not contained in the MO file. Some people might
+prefer this because a precomputed hashing table takes disk space, and
+does not win @emph{that} much speed. The hash table contains indices
+to the sorted array of strings in the MO file. Conflict resolution is
+done by double hashing. The precise hashing algorithm used is fairly
+dependent of GNU @code{gettext} code, and is not documented here.
+
+As for the strings themselves, they follow the hash file, and each
+is terminated with a @key{NUL}, and this @key{NUL} is not counted in
+the length which appears in the string descriptor. The @code{msgfmt}
+program has an option selecting the alignment for MO file strings.
+With this option, each string is separately aligned so it starts at
+an offset which is a multiple of the alignment value. On some RISC
+machines, a correct alignment will speed things up.
+
+Nothing prevents a MO file from having embedded @key{NUL}s in strings.
+However, the program interface currently used already presumes
+that strings are @key{NUL} terminated, so embedded @key{NUL}s are
+somewhat useless. But MO file format is general enough so other
+interfaces would be later possible, if for example, we ever want to
+implement wide characters right in MO files, where @key{NUL} bytes may
+accidently appear.
+
+This particular issue has been strongly debated in the GNU
+@code{gettext} development forum, and it is expectable that MO file
+format will evolve or change over time. It is even possible that many
+formats may later be supported concurrently. But surely, we have to
+start somewhere, and the MO file format described here is a good start.
+Nothing is cast in concrete, and the format may later evolve fairly
+easily, so we should feel comfortable with the current approach.
+
+@example
+@group
+ byte
+ +------------------------------------------+
+ 0 | magic number = 0x950412de |
+ | |
+ 4 | file format revision = 0 |
+ | |
+ 8 | number of strings | == N
+ | |
+ 12 | offset of table with original strings | == O
+ | |
+ 16 | offset of table with translation strings | == T
+ | |
+ 20 | size of hashing table | == S
+ | |
+ 24 | offset of hashing table | == H
+ | |
+ . .
+ . (possibly more entries later) .
+ . .
+ | |
+ O | length & offset 0th string ----------------.
+ O + 8 | length & offset 1st string ------------------.
+ ... ... | |
+O + ((N-1)*8)| length & offset (N-1)th string | | |
+ | | | |
+ T | length & offset 0th translation ---------------.
+ T + 8 | length & offset 1st translation -----------------.
+ ... ... | | | |
+T + ((N-1)*8)| length & offset (N-1)th translation | | | | |
+ | | | | | |
+ H | start hash table | | | | |
+ ... ... | | | |
+ H + S * 4 | end hash table | | | | |
+ | | | | | |
+ | NUL terminated 0th string <----------------' | | |
+ | | | | |
+ | NUL terminated 1st string <------------------' | |
+ | | | |
+ ... ... | |
+ | | | |
+ | NUL terminated 0th translation <---------------' |
+ | | |
+ | NUL terminated 1st translation <-----------------'
+ | |
+ ... ...
+ | |
+ +------------------------------------------+
+@end group
+@end example
+
+@node Users, Programmers, Binaries, Top
+@chapter The User's View
+
+When GNU @code{gettext} will truly have reached is goal, average users
+should feel some kind of astonished pleasure, seeing the effect of
+that strange kind of magic that just makes their own native language
+appear everywhere on their screens. As for naive users, they would
+ideally have no special pleasure about it, merely taking their own
+language for @emph{granted}, and becoming rather unhappy otherwise.
+
+So, let's try to describe here how we would like the magic to operate,
+as we want the users' view to be the simplest, among all ways one
+could look at GNU @code{gettext}. All other software engineers:
+programmers, translators, maintainers, should work together in such a
+way that the magic becomes possible. This is a long and progressive
+undertaking, and information is available about the progress of the
+Translation Project.
+
+When a package is distributed, there are two kind of users:
+@dfn{installers} who fetch the distribution, unpack it, configure
+it, compile it and install it for themselves or others to use; and
+@dfn{end users} that call programs of the package, once these have
+been installed at their site. GNU @code{gettext} is offering magic
+for both installers and end users.
+
+@menu
+* Matrix:: The Current @file{ABOUT-NLS} Matrix
+* Installers:: Magic for Installers
+* End Users:: Magic for End Users
+@end menu
+
+@node Matrix, Installers, Users, Users
+@section The Current @file{ABOUT-NLS} Matrix
+
+Languages are not equally supported in all packages using GNU
+@code{gettext}. To know if some package uses GNU @code{gettext}, one
+may check the distribution for the @file{ABOUT-NLS} information file, for
+some @file{@var{ll}.po} files, often kept together into some @file{po/}
+directory, or for an @file{intl/} directory. Internationalized packages
+have usually many @file{@var{ll}.po} files, where @var{ll} represents
+the language. @ref{End Users} for a complete description of the format
+for @var{ll}.
+
+More generally, a matrix is available for showing the current state
+of the Translation Project, listing which packages are prepared for
+multi-lingual messages, and which languages is supported by each.
+Because this information changes often, this matrix is not kept within
+this GNU @code{gettext} manual. This information is often found in
+file @file{ABOUT-NLS} from various distributions, but is also as old as
+the distribution itself. A recent copy of this @file{ABOUT-NLS} file,
+containing up-to-date information, should generally be found on the
+Translation Project sites, and also on most GNU archive sites.
+
+@node Installers, End Users, Matrix, Users
+@section Magic for Installers
+
+By default, packages fully using GNU @code{gettext}, internally,
+are installed in such a way that they to allow translation of
+messages. At @emph{configuration} time, those packages should
+automatically detect whether the underlying host system provides usable
+@code{catgets} or @code{gettext} functions. If neither is present,
+the GNU @code{gettext} library should be automatically prepared
+and used. Installers may use special options at configuration
+time for changing this behavior. The command @samp{./configure
+--with-included-gettext} bypasses system @code{catgets} or @code{gettext} to
+use GNU @code{gettext} instead, while @samp{./configure --disable-nls}
+produces program totally unable to translate messages.
+
+Internationalized packages have usually many @file{@var{ll}.po}
+files. Unless
+translations are disabled, all those available are installed together
+with the package. However, the environment variable @code{LINGUAS}
+may be set, prior to configuration, to limit the installed set.
+@code{LINGUAS} should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+@node End Users, , Installers, Users
+@section Magic for End Users
+
+We consider here those packages using GNU @code{gettext} internally,
+and for which the installers did not disable translation at
+@emph{configure} time. Then, users only have to set the @code{LANG}
+environment variable to the appropriate @samp{@var{ll}} prior to
+using the programs in the package. @xref{Matrix}. For example,
+let's presume a German site. At the shell prompt, users merely have to
+execute @w{@samp{setenv LANG de}} (in @code{csh}) or @w{@samp{export
+LANG; LANG=de}} (in @code{sh}). They could even do this from their
+@file{.login} or @file{.profile} file.
+
+@node Programmers, Translators, Users, Top
+@chapter The Programmer's View
+
+@c FIXME: Reorganize whole chapter.
+
+One aim of the current message catalog implementation provided by
+GNU @code{gettext} was to use the systems message catalog handling, if the
+installer wishes to do so. So we perhaps should first take a look at
+the solutions we know about. The people in the POSIX committee does not
+manage to agree on one of the semi-official standards which we'll
+describe below. In fact they couldn't agree on anything, so nothing
+decide only to include an example of an interface. The major Unix vendors
+are split in the usage of the two most important specifications: X/Opens
+catgets vs. Uniforums gettext interface. We'll describe them both and
+later explain our solution of this dilemma.
+
+@menu
+* catgets:: About @code{catgets}
+* gettext:: About @code{gettext}
+* Comparison:: Comparing the two interfaces
+* Using libintl.a:: Using libintl.a in own programs
+* gettext grok:: Being a @code{gettext} grok
+* Temp Programmers:: Temporary Notes for the Programmers Chapter
+@end menu
+
+@node catgets, gettext, Programmers, Programmers
+@section About @code{catgets}
+
+The @code{catgets} implementation is defined in the X/Open Portability
+Guide, Volume 3, XSI Supplementary Definitions, Chapter 5. But the
+process of creating this standard seemed to be too slow for some of
+the Unix vendors so they created their implementations on preliminary
+versions of the standard. Of course this leads again to problems while
+writing platform independent programs: even the usage of @code{catgets}
+does not guarantee a unique interface.
+
+Another, personal comment on this that only a bunch of committee members
+could have made this interface. They never really tried to program
+using this interface. It is a fast, memory-saving implementation, an
+user can happily live with it. But programmers hate it (at least me and
+some others do@dots{})
+
+But we must not forget one point: after all the trouble with transfering
+the rights on Unix(tm) they at last came to X/Open, the very same who
+published this specifications. This leads me to making the prediction
+that this interface will be in future Unix standards (e.g. Spec1170) and
+therefore part of all Unix implementation (implementations, which are
+@emph{allowed} to wear this name).
+
+@menu
+* Interface to catgets:: The interface
+* Problems with catgets:: Problems with the @code{catgets} interface?!
+@end menu
+
+@node Interface to catgets, Problems with catgets, catgets, catgets
+@subsection The Interface
+
+The interface to the @code{catgets} implementation consists of three
+functions which correspond to those used in file access: @code{catopen}
+to open the catalog for using, @code{catgets} for accessing the message
+tables, and @code{catclose} for closing after work is done. Prototypes
+for the functions and the needed definitions are in the
+@code{<nl_types.h>} header file.
+
+@code{catopen} is used like in this:
+
+@example
+nl_catd catd = catopen ("catalog_name", 0);
+@end example
+
+The function takes as the argument the name of the catalog. This usual
+refers to the name of the program or the package. The second parameter
+is not further specified in the standard. I don't even know whether it
+is implemented consistently among various systems. So the common advice
+is to use @code{0} as the value. The return value is a handle to the
+message catalog, equivalent to handles to file returned by @code{open}.
+
+This handle is of course used in the @code{catgets} function which can
+be used like this:
+
+@example
+char *translation = catgets (catd, set_no, msg_id, "original string");
+@end example
+
+The first parameter is this catalog descriptor. The second parameter
+specifies the set of messages in this catalog, in which the message
+described by @code{msg_id} is obtained. @code{catgets} therefore uses a
+three-stage addressing:
+
+@display
+catalog name @result{} set number @result{} message ID @result{} translation
+@end display
+
+@c Anybody else loving Haskell??? :-) -- Uli
+
+The fourth argument is not used to address the translation. It is given
+as a default value in case when one of the addressing stages fail. One
+important thing to remember is that although the return type of catgets
+is @code{char *} the resulting string @emph{must not} be changed. It
+should better @code{const char *}, but the standard is published in
+1988, one year before ANSI C.
+
+@noindent
+The last of these function functions is used and behaves as expected:
+
+@example
+catclose (catd);
+@end example
+
+After this no @code{catgets} call using the descriptor is legal anymore.
+
+@node Problems with catgets, , Interface to catgets, catgets
+@subsection Problems with the @code{catgets} Interface?!
+
+Now that this descriptions seemed to be really easy where are the
+problem we speak of. In fact the interface could be used in a
+reasonable way, but constructing the message catalogs is a pain. The
+reason for this lies in the third argument of @code{catgets}: the unique
+message ID. This has to be a numeric value for all messages in a single
+set. Perhaps you could imagine the problems keeping such list while
+changing the source code. Add a new message here, remove one there. Of
+course there have been developed a lot of tools helping to organize this
+chaos but one as the other fails in one aspect or the other. We don't
+want to say that the other approach has no problems but they are far
+more easily to manage.
+
+@node gettext, Comparison, catgets, Programmers
+@section About @code{gettext}
+
+The definition of the @code{gettext} interface comes from a Uniforum
+proposal and it is followed by at least one major Unix vendor
+(Sun) in its last developments. It is not specified in any official
+standard, though.
+
+The main points about this solution is that it does not follow the
+method of normal file handling (open-use-close) and that it does not
+burden the programmer so many task, especially the unique key handling.
+Of course here is also a unique key needed, but this key is the message
+itself (how long or short it is). See @ref{Comparison} for a more
+detailed comparison of the two methods.
+
+The following section contains a rather detailed description of the
+interface. We make it that detailed because this is the interface
+we chose for the GNU @code{gettext} Library. Programmers interested
+in using this library will be interested in this description.
+
+@menu
+* Interface to gettext:: The interface
+* Ambiguities:: Solving ambiguities
+* Locating Catalogs:: Locating message catalog files
+* Optimized gettext:: Optimization of the *gettext functions
+@end menu
+
+@node Interface to gettext, Ambiguities, gettext, gettext
+@subsection The Interface
+
+The minimal functionality an interface must have is a) to select a
+domain the strings are coming from (a single domain for all programs is
+not reasonable because its construction and maintenance is difficult,
+perhaps impossible) and b) to access a string in a selected domain.
+
+This is principally the description of the @code{gettext} interface. It
+has an global domain which unqualified usages reference. Of course this
+domain is selectable by the user.
+
+@example
+char *textdomain (const char *domain_name);
+@end example
+
+This provides the possibility to change or query the current status of
+the current global domain of the @code{LC_MESSAGE} category. The
+argument is a null-terminated string, whose characters must be legal in
+the use in filenames. If the @var{domain_name} argument is @code{NULL},
+the function return the current value. If no value has been set
+before, the name of the default domain is returned: @emph{messages}.
+Please note that although the return value of @code{textdomain} is of
+type @code{char *} no changing is allowed. It is also important to know
+that no checks of the availability are made. If the name is not
+available you will see this by the fact that no translations are provided.
+
+@noindent
+To use a domain set by @code{textdomain} the function
+
+@example
+char *gettext (const char *msgid);
+@end example
+
+is to be used. This is the simplest reasonable form one can imagine.
+The translation of the string @var{msgid} is returned if it is available
+in the current domain. If not available the argument itself is
+returned. If the argument is @code{NULL} the result is undefined.
+
+One things which should come into mind is that no explicit dependency to
+the used domain is given. The current value of the domain for the
+@code{LC_MESSAGES} locale is used. If this changes between two
+executions of the same @code{gettext} call in the program, both calls
+reference a different message catalog.
+
+For the easiest case, which is normally used in internationalized
+packages, once at the beginning of execution a call to @code{textdomain}
+is issued, setting the domain to a unique name, normally the package
+name. In the following code all strings which have to be translated are
+filtered through the gettext function. That's all, the package speaks
+your language.
+
+@node Ambiguities, Locating Catalogs, Interface to gettext, gettext
+@subsection Solving Ambiguities
+
+While this single name domain work good for most applications there
+might be the need to get translations from more than one domain. Of
+course one could switch between different domains with calls to
+@code{textdomain}, but this is really not convenient nor is it fast. A
+possible situation could be one case discussing while this writing: all
+error messages of functions in the set of common used functions should
+go into a separate domain @code{error}. By this mean we would only need
+to translate them once.
+
+@noindent
+For this reasons there are two more functions to retrieve strings:
+
+@example
+char *dgettext (const char *domain_name, const char *msgid);
+char *dcgettext (const char *domain_name, const char *msgid,
+ int category);
+@end example
+
+Both take an additional argument at the first place, which corresponds
+to the argument of @code{textdomain}. The third argument of
+@code{dcgettext} allows to use another locale but @code{LC_MESSAGES}.
+But I really don't know where this can be useful. If the
+@var{domain_name} is @code{NULL} or @var{category} has an value beside
+the known ones, the result is undefined. It should also be noted that
+this function is not part of the second known implementation of this
+function family, the one found in Solaris.
+
+A second ambiguity can arise by the fact, that perhaps more than one
+domain has the same name. This can be solved by specifying where the
+needed message catalog files can be found.
+
+@example
+char *bindtextdomain (const char *domain_name,
+ const char *dir_name);
+@end example
+
+Calling this function binds the given domain to a file in the specified
+directory (how this file is determined follows below). Especially a
+file in the systems default place is not favored against the specified
+file anymore (as it would be by solely using @code{textdomain}). A
+@code{NULL} pointer for the @var{dir_name} parameter returns the binding
+associated with @var{domain_name}. If @var{domain_name} itself is
+@code{NULL} nothing happens and a @code{NULL} pointer is returned. Here
+again as for all the other functions is true that none of the return
+value must be changed!
+
+It is important to remember that relative path names for the
+@var{dir_name} parameter can be trouble. Since the path is always
+computed relative to the current directory different results will be
+achieved when the program executes a @code{chdir} command. Relative
+paths should always be avoided to avoid dependencies and
+unreliabilities.
+
+@node Locating Catalogs, Optimized gettext, Ambiguities, gettext
+@subsection Locating Message Catalog Files
+
+Because many different languages for many different packages have to be
+stored we need some way to add these information to file message catalog
+files. The way usually used in Unix environments is have this encoding
+in the file name. This is also done here. The directory name given in
+@code{bindtextdomain}s second argument (or the default directory),
+followed by the value and name of the locale and the domain name are
+concatenated:
+
+@example
+@var{dir_name}/@var{locale}/LC_@var{category}/@var{domain_name}.mo
+@end example
+
+The default value for @var{dir_name} is system specific. For the GNU
+library, and for packages adhering to its conventions, it's:
+@example
+/usr/local/share/locale
+@end example
+
+@noindent
+@var{locale} is the value of the locale whose name is this
+@code{LC_@var{category}}. For @code{gettext} and @code{dgettext} this
+locale is always @code{LC_MESSAGES}. @code{dcgettext} specifies the
+locale by the third argument.@footnote{Some
+system, eg Ultrix, don't have @code{LC_MESSAGES}. Here we use a more or
+less arbitrary value for it.} @footnote{When the system does not support
+@code{setlocale} its behavior in setting the locale values is simulated
+by looking at the environment variables.}
+
+@node Optimized gettext, , Locating Catalogs, gettext
+@subsection Optimization of the *gettext functions
+
+At this point of the discussion we should talk about an advantage of the
+GNU @code{gettext} implementation. Some readers might have pointed out
+that an internationalized program might have a poor performance if some
+string has to be translated in an inner loop. While this is unavoidable
+when the string varies from one run of the loop to the other it is
+simply a waste of time when the string is always the same. Take the
+following example:
+
+@example
+@group
+@{
+ while (@dots{})
+ @{
+ puts (gettext ("Hello world"));
+ @}
+@}
+@end group
+@end example
+
+@noindent
+When the locale selection does not change between two runs the resulting
+string is always the same. One way to use this is:
+
+@example
+@group
+@{
+ str = gettext ("Hello world");
+ while (@dots{})
+ @{
+ puts (str);
+ @}
+@}
+@end group
+@end example
+
+@noindent
+But this solution is not usable in all situation (e.g. when the locale
+selection changes) nor is it good readable.
+
+The GNU C compiler, version 2.7 and above, provide another solution for
+this. To describe this we show here some lines of the
+@file{intl/libgettext.h} file. For an explanation of the expression
+command block see @ref{Statement Exprs, , Statements and Declarations in
+Expressions, gcc, The GNU CC Manual}.
+
+@example
+@group
+# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
+extern int _nl_msg_cat_cntr;
+# define dcgettext(domainname, msgid, category) \
+ (__extension__ \
+ (@{ \
+ char *result; \
+ if (__builtin_constant_p (msgid)) \
+ @{ \
+ static char *__translation__; \
+ static int __catalog_counter__; \
+ if (! __translation__ \
+ || __catalog_counter__ != _nl_msg_cat_cntr) \
+ @{ \
+ __translation__ = \
+ dcgettext__ ((domainname), (msgid), (category)); \
+ __catalog_counter__ = _nl_msg_cat_cntr; \
+ @} \
+ result = __translation__; \
+ @} \
+ else \
+ result = dcgettext__ ((domainname), (msgid), (category)); \
+ result; \
+ @}))
+# endif
+@end group
+@end example
+
+The interesting thing here is the @code{__builtin_constant_p} predicate.
+This is evaluated at compile time and so optimization can take place
+immediately. Here two cases are distinguished: the argument to
+@code{gettext} is not a constant value in which case simply the function
+@code{dcgettext__} is called, the real implementation of the
+@code{dcgettext} function.
+
+If the string argument @emph{is} constant we can reuse the once gained
+translation when the locale selection has not changed. This is exactly
+what is done here. The @code{_nl_msg_cat_cntr} variable is defined in
+the @file{loadmsgcat.c} which is available in @file{libintl.a} and is
+changed whenever a new message catalog is loaded.
+
+@node Comparison, Using libintl.a, gettext, Programmers
+@section Comparing the Two Interfaces
+
+@c FIXME: arguments to catgets vs. gettext
+@c Partly done 950718 -- drepper
+
+The following discussion is perhaps a little bit colored. As said
+above we implemented GNU @code{gettext} following the Uniforum
+proposal and this surely has its reasons. But it should show how we
+came to this decision.
+
+First we take a look at the developing process. When we write an
+application using NLS provided by @code{gettext} we proceed as always.
+Only when we come to a string which might be seen by the users and thus
+has to be translated we use @code{gettext("@dots{}")} instead of
+@code{"@dots{}"}. At the beginning of each source file (or in a central
+header file) we define
+
+@example
+#define gettext(String) (String)
+@end example
+
+Even this definition can be avoided when the system supports the
+@code{gettext} function in its C library. When we compile this code the
+result is the same as if no NLS code is used. When you take a look at
+the GNU @code{gettext} code you will see that we use @code{_("@dots{}")}
+instead of @code{gettext("@dots{}")}. This reduces the number of
+additional characters per translatable string to @emph{3} (in words:
+three).
+
+When now a production version of the program is needed we simply replace
+the definition
+
+@example
+#define _(String) (String)
+@end example
+
+@noindent
+by
+
+@example
+#include <libintl.h>
+#define _(String) gettext (String)
+@end example
+
+@noindent
+Additionally we run the program @file{xgettext} on all source code file
+which contain translatable strings and that's it: we have a running
+program which does not depend on translations to be available, but which
+can use any that becomes available.
+
+The same procedure can be done for the @code{gettext_noop} invocations
+(@pxref{Special cases}). First you can define @code{gettext_noop} to a
+no-op macro and later use the definition from @file{libintl.h}. Because
+this name is not used in Suns implementation of @file{libintl.h},
+you should consider the following code for your project:
+
+@example
+#ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+#else
+# define N_(String) (String)
+#endif
+@end example
+
+@code{N_} is a short form similar to @code{_}. The @file{Makefile} in
+the @file{po/} directory of GNU @code{gettext} knows by default both of the
+mentioned short forms so you are invited to follow this proposal for
+your own ease.
+
+Now to @code{catgets}. The main problem is the work for the
+programmer. Every time he comes to a translatable string he has to
+define a number (or a symbolic constant) which has also be defined in
+the message catalog file. He also has to take care for duplicate
+entries, duplicate message IDs etc. If he wants to have the same
+quality in the message catalog as the GNU @code{gettext} program
+provides he also has to put the descriptive comments for the strings and
+the location in all source code files in the message catalog. This is
+nearly a Mission: Impossible.
+
+But there are also some points people might call advantages speaking for
+@code{catgets}. If you have a single word in a string and this string
+is used in different contexts it is likely that in one or the other
+language the word has different translations. Example:
+
+@example
+printf ("%s: %d", gettext ("number"), number_of_errors)
+
+printf ("you should see %d %s", number_count,
+ number_count == 1 ? gettext ("number") : gettext ("numbers"))
+@end example
+
+Here we have to translate two times the string @code{"number"}. Even
+if you do not speak a language beside English it might be possible to
+recognize that the two words have a different meaning. In German the
+first appearance has to be translated to @code{"Anzahl"} and the second
+to @code{"Zahl"}.
+
+Now you can say that this example is really esoteric. And you are
+right! This is exactly how we felt about this problem and decide that
+it does not weight that much. The solution for the above problem could
+be very easy:
+
+@example
+printf ("%s %d", gettext ("number:"), number_of_errors)
+
+printf (number_count == 1 ? gettext ("you should see %d number")
+ : gettext ("you should see %d numbers"),
+ number_count)
+@end example
+
+We believe that we can solve all conflicts with this method. If it is
+difficult one can also consider changing one of the conflicting string a
+little bit. But it is not impossible to overcome.
+
+@c Should this be here?
+Translator note: It is perhaps appropriate here to tell those English
+speaking programmers that the plural form of a noun cannot be formed by
+appending a single `s'. Most other languages use different methods.
+Even the above form is not general enough to cope with all languages.
+Rafal Maszkowski <rzm@@mat.uni.torun.pl> reports:
+
+@quotation
+In Polish we use e.g. plik (file) this way:
+@example
+1 plik
+2,3,4 pliki
+5-21 pliko'w
+22-24 pliki
+25-31 pliko'w
+@end example
+and so on (o' means 8859-2 oacute which should be rather okreska,
+similar to aogonek).
+@end quotation
+
+A workable approach might be to consider methods like the one used for
+@code{LC_TIME} in the POSIX.2 standard. The value of the
+@code{alt_digits} field can be up to 100 strings which represent the
+numbers 1 to 100. Using this in a situation of an internationalized
+program means that an array of translatable strings should be indexed by
+the number which should represent. A small example:
+
+@example
+@group
+void
+print_month_info (int month)
+@{
+ const char *month_pos[12] =
+ @{ N_("first"), N_("second"), N_("third"), N_("fourth"),
+ N_("fifth"), N_("sixth"), N_("seventh"), N_("eighth"),
+ N_("ninth"), N_("tenth"), N_("eleventh"), N_("twelfth") @};
+ printf (_("%s is the %s month\n"), nl_langinfo (MON_1 + month),
+ _(month_pos[month]));
+@}
+@end group
+@end example
+
+@noindent
+It should be obvious that this method is only reasonable for small
+ranges of numbers.
+
+@c catgets allows same original entry to have different translations
+
+@node Using libintl.a, gettext grok, Comparison, Programmers
+@section Using libintl.a in own programs
+
+Starting with version 0.9.4 the library @code{libintl.h} should be
+self-contained. I.e., you can use it in your own programs without
+providing additional functions. The @file{Makefile} will put the header
+and the library in directories selected using the @code{$(prefix)}.
+
+One exception of the above is found on HP-UX systems. Here the C library
+does not contain the @code{alloca} function (and the HP compiler does
+not generate it inlined). But it is not intended to rewrite the whole
+library just because of this dumb system. Instead include the
+@code{alloca} function in all package you use the @code{libintl.a} in.
+
+@node gettext grok, Temp Programmers, Using libintl.a, Programmers
+@section Being a @code{gettext} grok
+
+To fully exploit the functionality of the GNU @code{gettext} library it
+is surely helpful to read the source code. But for those who don't want
+to spend that much time in reading the (sometimes complicated) code here
+is a list comments:
+
+@itemize @bullet
+@item Changing the language at runtime
+
+For interactive programs it might be useful to offer a selection of the
+used language at runtime. To understand how to do this one need to know
+how the used language is determined while executing the @code{gettext}
+function. The method which is presented here only works correctly
+with the GNU implementation of the @code{gettext} functions. It is not
+possible with underlying @code{catgets} functions or @code{gettext}
+functions from the systems C library. The exception is of course the
+GNU C Library which uses the GNU @code{gettext} Library for message handling.
+
+In the function @code{dcgettext} at every call the current setting of
+the highest priority environment variable is determined and used.
+Highest priority means here the following list with decreasing
+priority:
+
+@enumerate
+@item @code{LANGUAGE}
+@item @code{LC_ALL}
+@item @code{LC_xxx}, according to selected locale
+@item @code{LANG}
+@end enumerate
+
+Afterwards the path is constructed using the found value and the
+translation file is loaded if available.
+
+What is now when the value for, say, @code{LANGUAGE} changes. According
+to the process explained above the new value of this variable is found
+as soon as the @code{dcgettext} function is called. But this also means
+the (perhaps) different message catalog file is loaded. In other
+words: the used language is changed.
+
+But there is one little hook. The code for gcc-2.7.0 and up provides
+some optimization. This optimization normally prevents the calling of
+the @code{dcgettext} function as long as no new catalog is loaded. But
+if @code{dcgettext} is not called the program also cannot find the
+@code{LANGUAGE} variable be changed (@pxref{Optimized gettext}). A
+solution for this is very easy. Include the following code in the
+language switching function.
+
+@example
+ /* Change language. */
+ setenv ("LANGUAGE", "fr", 1);
+
+ /* Make change known. */
+ @{
+ extern int _nl_msg_cat_cntr;
+ ++_nl_msg_cat_cntr;
+ @}
+@end example
+
+The variable @code{_nl_msg_cat_cntr} is defined in @file{loadmsgcat.c}.
+The programmer will find himself in need for a construct like this only
+when developing programs which do run longer and provide the user to
+select the language at runtime. Non-interactive programs (like all
+these little Unix tools) should never need this.
+
+@end itemize
+
+@node Temp Programmers, , gettext grok, Programmers
+@section Temporary Notes for the Programmers Chapter
+
+@menu
+* Temp Implementations:: Temporary - Two Possible Implementations
+* Temp catgets:: Temporary - About @code{catgets}
+* Temp WSI:: Temporary - Why a single implementation
+* Temp Notes:: Temporary - Notes
+@end menu
+
+@node Temp Implementations, Temp catgets, Temp Programmers, Temp Programmers
+@subsection Temporary - Two Possible Implementations
+
+There are two competing methods for language independent messages:
+the X/Open @code{catgets} method, and the Uniforum @code{gettext}
+method. The @code{catgets} method indexes messages by integers; the
+@code{gettext} method indexes them by their English translations.
+The @code{catgets} method has been around longer and is supported
+by more vendors. The @code{gettext} method is supported by Sun,
+and it has been heard that the COSE multi-vendor initiative is
+supporting it. Neither method is a POSIX standard; the POSIX.1
+committee had a lot of disagreement in this area.
+
+Neither one is in the POSIX standard. There was much disagreement
+in the POSIX.1 committee about using the @code{gettext} routines
+vs. @code{catgets} (XPG). In the end the committee couldn't
+agree on anything, so no messaging system was included as part
+of the standard. I believe the informative annex of the standard
+includes the XPG3 messaging interfaces, ``@dots{}as an example of
+a messaging system that has been implemented@dots{}''
+
+They were very careful not to say anywhere that you should use one
+set of interfaces over the other. For more on this topic please
+see the Programming for Internationalization FAQ.
+
+@node Temp catgets, Temp WSI, Temp Implementations, Temp Programmers
+@subsection Temporary - About @code{catgets}
+
+There have been a few discussions of late on the use of
+@code{catgets} as a base. I think it important to present both
+sides of the argument and hence am opting to play devil's advocate
+for a little bit.
+
+I'll not deny the fact that @code{catgets} could have been designed
+a lot better. It currently has quite a number of limitations and
+these have already been pointed out.
+
+However there is a great deal to be said for consistency and
+standardization. A common recurring problem when writing Unix
+software is the myriad portability problems across Unix platforms.
+It seems as if every Unix vendor had a look at the operating system
+and found parts they could improve upon. Undoubtedly, these
+modifications are probably innovative and solve real problems.
+However, software developers have a hard time keeping up with all
+these changes across so many platforms.
+
+And this has prompted the Unix vendors to begin to standardize their
+systems. Hence the impetus for Spec1170. Every major Unix vendor
+has committed to supporting this standard and every Unix software
+developer waits with glee the day they can write software to this
+standard and simply recompile (without having to use autoconf)
+across different platforms.
+
+As I understand it, Spec1170 is roughly based upon version 4 of the
+X/Open Portability Guidelines (XPG4). Because @code{catgets} and
+friends are defined in XPG4, I'm led to believe that @code{catgets}
+is a part of Spec1170 and hence will become a standardized component
+of all Unix systems.
+
+@node Temp WSI, Temp Notes, Temp catgets, Temp Programmers
+@subsection Temporary - Why a single implementation
+
+Now it seems kind of wasteful to me to have two different systems
+installed for accessing message catalogs. If we do want to remedy
+@code{catgets} deficiencies why don't we try to expand @code{catgets}
+(in a compatible manner) rather than implement an entirely new system.
+Otherwise, we'll end up with two message catalog access systems installed
+with an operating system - one set of routines for packages using GNU
+@code{gettext} for their internationalization, and another set of routines
+(catgets) for all other software. Bloated?
+
+Supposing another catalog access system is implemented. Which do
+we recommend? At least for Linux, we need to attract as many
+software developers as possible. Hence we need to make it as easy
+for them to port their software as possible. Which means supporting
+@code{catgets}. We will be implementing the @code{glocale} code
+within our @code{libc}, but does this mean we also have to incorporate
+another message catalog access scheme within our @code{libc} as well?
+And what about people who are going to be using the @code{glocale}
++ non-@code{catgets} routines. When they port their software to
+other platforms, they're now going to have to include the front-end
+(@code{glocale}) code plus the back-end code (the non-@code{catgets}
+access routines) with their software instead of just including the
+@code{glocale} code with their software.
+
+Message catalog support is however only the tip of the iceberg.
+What about the data for the other locale categories. They also have
+a number of deficiencies. Are we going to abandon them as well and
+develop another duplicate set of routines (should @code{glocale}
+expand beyond message catalog support)?
+
+Like many parts of Unix that can be improved upon, we're stuck with balancing
+compatibility with the past with useful improvements and innovations for
+the future.
+
+@node Temp Notes, , Temp WSI, Temp Programmers
+@subsection Temporary - Notes
+
+X/Open agreed very late on the standard form so that many
+implementations differ from the final form. Both of my system (old
+Linux catgets and Ultrix-4) have a strange variation.
+
+OK. After incorporating the last changes I have to spend some time on
+making the GNU/Linux @code{libc} @code{gettext} functions. So in future
+Solaris is not the only system having @code{gettext}.
+
+@node Translators, Maintainers, Programmers, Top
+@chapter The Translator's View
+
+@c FIXME: Reorganize whole chapter.
+
+@menu
+* Trans Intro 0:: Introduction 0
+* Trans Intro 1:: Introduction 1
+* Discussions:: Discussions
+* Organization:: Organization
+* Information Flow:: Information Flow
+@end menu
+
+@node Trans Intro 0, Trans Intro 1, Translators, Translators
+@section Introduction 0
+
+Free software is going international! The Translation Project is a way
+to get maintainers, translators and users all together, so free software
+will gradually become able to speak many native languages.
+
+The GNU @code{gettext} tool set contains @emph{everything} maintainers
+need for internationalizing their packages for messages. It also
+contains quite useful tools for helping translators at localizing
+messages to their native language, once a package has already been
+internationalized.
+
+To achieve the Translation Project, we need many interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+If you'd like to volunteer to @emph{work} at translating messages,
+please send mail to your translating team.
+
+Each team has its own mailing list, courtesy of Linux
+International. You may reach your translating team at the address
+@file{@var{ll}@@li.org}, replacing @var{ll} by the two-letter @w{ISO 639}
+code for your language. Language codes are @emph{not} the same as
+country codes given in @w{ISO 3166}. The following translating teams
+exist:
+
+@quotation
+Chinese @code{zh}, Czech @code{cs}, Danish @code{da}, Dutch @code{nl},
+Esperanto @code{eo}, Finnish @code{fi}, French @code{fr}, Irish
+@code{ga}, German @code{de}, Greek @code{el}, Italian @code{it},
+Japanese @code{ja}, Indonesian @code{in}, Norwegian @code{no}, Polish
+@code{pl}, Portuguese @code{pt}, Russian @code{ru}, Spanish @code{es},
+Swedish @code{sv} and Turkish @code{tr}.
+@end quotation
+
+@noindent
+For example, you may reach the Chinese translating team by writing to
+@file{zh@@li.org}. When you become a member of the translating team
+for your own language, you may subscribe to its list. For example,
+Swedish people can send a message to @w{@file{sv-request@@li.org}},
+having this message body:
+
+@example
+subscribe
+@end example
+
+Keep in mind that team members should be interested in @emph{working}
+at translations, or at solving translational difficulties, rather than
+merely lurking around. If your team does not exist yet and you want to
+start one, please write to @w{@file{translation@@iro.umontreal.ca}};
+you will then reach the coordinator for all translator teams.
+
+A handful of GNU packages have already been adapted and provided
+with message translations for several languages. Translation
+teams have begun to organize, using these packages as a starting
+point. But there are many more packages and many languages for
+which we have no volunteer translators. If you would like to
+volunteer to work at translating messages, please send mail to
+@file{translation@@iro.umontreal.ca} indicating what language(s)
+you can work on.
+
+@node Trans Intro 1, Discussions, Trans Intro 0, Translators
+@section Introduction 1
+
+This is now official, GNU is going international! Here is the
+announcement submitted for the January 1995 GNU Bulletin:
+
+@quotation
+A handful of GNU packages have already been adapted and provided
+with message translations for several languages. Translation
+teams have begun to organize, using these packages as a starting
+point. But there are many more packages and many languages
+for which we have no volunteer translators. If you'd like to
+volunteer to work at translating messages, please send mail to
+@samp{translation@@iro.umontreal.ca} indicating what language(s)
+you can work on.
+@end quotation
+
+This document should answer many questions for those who are curious about
+the process or would like to contribute. Please at least skim over it,
+hoping to cut down a little of the high volume of e-mail generated by this
+collective effort towards internationalization of free software.
+
+Most free programming which is widely shared is done in English, and
+currently, English is used as the main communicating language between
+national communities collaborating to free software. This very document
+is written in English. This will not change in the foreseeable future.
+
+However, there is a strong appetite from national communities for
+having more software able to write using national language and habits,
+and there is an on-going effort to modify free software in such a way
+that it becomes able to do so. The experiments driven so far raised
+an enthusiastic response from pretesters, so we believe that
+internationalization of free software is dedicated to succeed.
+
+For suggestion clarifications, additions or corrections to this
+document, please e-mail to @file{translation@@iro.umontreal.ca}.
+
+@node Discussions, Organization, Trans Intro 1, Translators
+@section Discussions
+
+Facing this internationalization effort, a few users expressed their
+concerns. Some of these doubts are presented and discussed, here.
+
+@itemize @bullet
+@item Smaller groups
+
+Some languages are not spoken by a very large number of people, so people
+speaking them sometimes consider that there may not be all that much
+demand such versions of free software packages. Moreover, many people
+being @emph{into computers}, in some countries, generally seem to prefer
+English versions of their software.
+
+On the other end, people might enjoy their own language a lot, and be
+very motivated at providing to themselves the pleasure of having their
+beloved free software speaking their mother tongue. They do themselves
+a personal favor, and do not pay that much attention to the number of
+people beneficiating of their work.
+
+@item Misinterpretation
+
+Other users are shy to push forward their own language, seeing in this
+some kind of misplaced propaganda. Someone thought there must be some
+users of the language over the networks pestering other people with it.
+
+But any spoken language is worth localization, because there are
+people behind the language for whom the language is important and
+dear to their hearts.
+
+@item Odd translations
+
+The biggest problem is to find the right translations so that
+everybody can understand the messages. Translations are usually a
+little odd. Some people get used to English, to the extent they may
+find translations into their own language ``rather pushy, obnoxious
+and sometimes even hilarious.'' As a French speaking man, I have
+the experience of those instruction manuals for goods, so poorly
+translated in French in Korea or Taiwan@dots{}
+
+The fact is that we sometimes have to create a kind of national
+computer culture, and this is not easy without the collaboration of
+many people liking their mother tongue. This is why translations are
+better achieved by people knowing and loving their own language, and
+ready to work together at improving the results they obtain.
+
+@item Dependencies over the GPL
+
+Some people wonder if using GNU @code{gettext} necessarily brings their package
+under the protective wing of the GNU General Public License, when they
+do not want to make their program free, or want other kinds of freedom.
+The simplest answer is yes.
+
+The mere marking of localizable strings in a package, or conditional
+inclusion of a few lines for initialization, is not really including
+GPL'ed code. However, the localization routines themselves are under
+the GPL and would bring the remainder of the package under the GPL
+if they were distributed with it. So, I presume that, for those
+for which this is a problem, it could be circumvented by letting to
+the end installers the burden of assembling a package prepared for
+localization, but not providing the localization routines themselves.
+
+@end itemize
+
+@node Organization, Information Flow, Discussions, Translators
+@section Organization
+
+On a larger scale, the true solution would be to organize some kind of
+fairly precise set up in which volunteers could participate. I gave
+some thought to this idea lately, and realize there will be some
+touchy points. I thought of writing to Richard Stallman to launch
+such a project, but feel it might be good to shake out the ideas
+between ourselves first. Most probably that Linux International has
+some experience in the field already, or would like to orchestrate
+the volunteer work, maybe. Food for thought, in any case!
+
+I guess we have to setup something early, somehow, that will help
+many possible contributors of the same language to interlock and avoid
+work duplication, and further be put in contact for solving together
+problems particular to their tongue (in most languages, there are many
+difficulties peculiar to translating technical English). My Swedish
+contributor acknowledged these difficulties, and I'm well aware of
+them for French.
+
+This is surely not a technical issue, but we should manage so the
+effort of locale contributors be maximally useful, despite the national
+team layer interface between contributors and maintainers.
+
+The Translation Project needs some setup for coordinating language
+coordinators. Localizing evolving programs will surely
+become a permanent and continuous activity in the free software community,
+once well started.
+The setup should be minimally completed and tested before GNU
+@code{gettext} becomes an official reality. The e-mail address
+@file{translation@@iro.umontreal.ca} has been setup for receiving
+offers from volunteers and general e-mail on these topics. This address
+reaches the Translation Project coordinator.
+
+@menu
+* Central Coordination:: Central Coordination
+* National Teams:: National Teams
+* Mailing Lists:: Mailing Lists
+@end menu
+
+@node Central Coordination, National Teams, Organization, Organization
+@subsection Central Coordination
+
+I also think GNU will need sooner than it thinks, that someone setup
+a way to organize and coordinate these groups. Some kind of group
+of groups. My opinion is that it would be good that GNU delegates
+this task to a small group of collaborating volunteers, shortly.
+Perhaps in @file{gnu.announce} a list of this national committee's
+can be published.
+
+My role as coordinator would simply be to refer to Ulrich any German
+speaking volunteer interested to localization of free software packages, and
+maybe helping national groups to initially organize, while maintaining
+national registries for until national groups are ready to take over.
+In fact, the coordinator should ease volunteers to get in contact with
+one another for creating national teams, which should then select
+one coordinator per language, or country (regionalized language).
+If well done, the coordination should be useful without being an
+overwhelming task, the time to put delegations in place.
+
+@node National Teams, Mailing Lists, Central Coordination, Organization
+@subsection National Teams
+
+I suggest we look for volunteer coordinators/editors for individual
+languages. These people will scan contributions of translation files
+for various programs, for their own languages, and will ensure high
+and uniform standards of diction.
+
+From my current experience with other people in these days, those who
+provide localizations are very enthusiastic about the process, and are
+more interested in the localization process than in the program they
+localize, and want to do many programs, not just one. This seems
+to confirm that having a coordinator/editor for each language is a
+good idea.
+
+We need to choose someone who is good at writing clear and concise
+prose in the language in question. That is hard---we can't check
+it ourselves. So we need to ask a few people to judge each others'
+writing and select the one who is best.
+
+I announce my prerelease to a few dozen people, and you would not
+believe all the discussions it generated already. I shudder to think
+what will happen when this will be launched, for true, officially,
+world wide. Who am I to arbitrate between two Czekolsovak users
+contradicting each other, for example?
+
+I assume that your German is not much better than my French so that
+I would not be able to judge about these formulations. What I would
+suggest is that for each language there is a group for people who
+maintain the PO files and judge about changes. I suspect there will
+be cultural differences between how such groups of people will behave.
+Some will have relaxed ways, reach consensus easily, and have anyone
+of the group relate to the maintainers, while others will fight to
+death, organize heavy administrations up to national standards, and
+use strict channels.
+
+The German team is putting out a good example. Right now, they are
+maybe half a dozen people revising translations of each other and
+discussing the linguistic issues. I do not even have all the names.
+Ulrich Drepper is taking care of coordinating the German team.
+He subscribed to all my pretest lists, so I do not even have to warn
+him specifically of incoming releases.
+
+I'm sure, that is a good idea to get teams for each language working
+on translations. That will make the translations better and more
+consistent.
+
+@menu
+* Sub-Cultures:: Sub-Cultures
+* Organizational Ideas:: Organizational Ideas
+@end menu
+
+@node Sub-Cultures, Organizational Ideas, National Teams, National Teams
+@subsubsection Sub-Cultures
+
+Taking French for example, there are a few sub-cultures around computers
+which developed diverging vocabularies. Picking volunteers here and
+there without addressing this problem in an organized way, soon in the
+project, might produce a distasteful mix of internationalized programs,
+and possibly trigger endless quarrels among those who really care.
+
+Keeping some kind of unity in the way French localization of
+internationalized programs is achieved is a difficult (and delicate) job.
+Knowing the latin character of French people (:-), if we take this
+the wrong way, we could end up nowhere, or spoil a lot of energies.
+Maybe we should begin to address this problem seriously @emph{before}
+GNU @code{gettext} become officially published. And I suspect that this
+means soon!
+
+@node Organizational Ideas, , Sub-Cultures, National Teams
+@subsubsection Organizational Ideas
+
+I expect the next big changes after the official release. Please note
+that I use the German translation of the short GPL message. We need
+to set a few good examples before the localization goes out for true
+in the free software community. Here are a few points to discuss:
+
+@itemize @bullet
+@item
+Each group should have one FTP server (at least one master).
+
+@item
+The files on the server should reflect the latest version (of
+course!) and it should also contain a RCS directory with the
+corresponding archives (I don't have this now).
+
+@item
+There should also be a ChangeLog file (this is more useful than the
+RCS archive but can be generated automatically from the later by
+Emacs).
+
+@item
+A @dfn{core group} should judge about questionable changes (for now
+this group consists solely by me but I ask some others occasionally;
+this also seems to work).
+
+@end itemize
+
+@node Mailing Lists, , National Teams, Organization
+@subsection Mailing Lists
+
+If we get any inquiries about GNU @code{gettext}, send them on to:
+
+@example
+@file{translation@@iro.umontreal.ca}
+@end example
+
+The @file{*-pretest} lists are quite useful to me, maybe the idea could
+be generalized to many GNU, and non-GNU packages. But each maintainer
+his/her way!
+
+Fran@,{c}ois, we have a mechanism in place here at
+@file{gnu.ai.mit.edu} to track teams, support mailing lists for
+them and log members. We have a slight preference that you use it.
+If this is OK with you, I can get you clued in.
+
+Things are changing! A few years ago, when Daniel Fekete and I
+asked for a mailing list for GNU localization, nested at the FSF, we
+were politely invited to organize it anywhere else, and so did we.
+For communicating with my pretesters, I later made a handful of
+mailing lists located at iro.umontreal.ca and administrated by
+@code{majordomo}. These lists have been @emph{very} dependable
+so far@dots{}
+
+I suspect that the German team will organize itself a mailing list
+located in Germany, and so forth for other countries. But before they
+organize for true, it could surely be useful to offer mailing lists
+located at the FSF to each national team. So yes, please explain me
+how I should proceed to create and handle them.
+
+We should create temporary mailing lists, one per country, to help
+people organize. Temporary, because once regrouped and structured, it
+would be fair the volunteers from country bring back @emph{their} list
+in there and manage it as they want. My feeling is that, in the long
+run, each team should run its own list, from within their country.
+There also should be some central list to which all teams could
+subscribe as they see fit, as long as each team is represented in it.
+
+@node Information Flow, , Organization, Translators
+@section Information Flow
+
+There will surely be some discussion about this messages after the
+packages are finally released. If people now send you some proposals
+for better messages, how do you proceed? Jim, please note that
+right now, as I put forward nearly a dozen of localizable programs, I
+receive both the translations and the coordination concerns about them.
+
+If I put one of my things to pretest, Ulrich receives the announcement
+and passes it on to the German team, who make last minute revisions.
+Then he submits the translation files to me @emph{as the maintainer}.
+For free packages I do not maintain, I would not even hear about it.
+This scheme could be made to work for the whole Translation Project,
+I think. For security reasons, maybe Ulrich (national coordinators,
+in fact) should update central registry kept at the Translation Project
+(Jim, me, or Len's recruits) once in a while.
+
+In December/January, I was aggressively ready to internationalize
+all of GNU, giving myself the duty of one small GNU package per week
+or so, taking many weeks or months for bigger packages. But it does
+not work this way. I first did all the things I'm responsible for.
+I've nothing against some missionary work on other maintainers, but
+I'm also loosing a lot of energy over it---same debates over again.
+
+And when the first localized packages are released we'll get a lot of
+responses about ugly translations :-). Surely, and we need to have
+beforehand a fairly good idea about how to handle the information
+flow between the national teams and the package maintainers.
+
+Please start saving somewhere a quick history of each PO file. I know
+for sure that the file format will change, allowing for comments.
+It would be nice that each file has a kind of log, and references for
+those who want to submit comments or gripes, or otherwise contribute.
+I sent a proposal for a fast and flexible format, but it is not
+receiving acceptance yet by the GNU deciders. I'll tell you when I
+have more information about this.
+
+@node Maintainers, Conclusion, Translators, Top
+@chapter The Maintainer's View
+
+The maintainer of a package has many responsibilities. One of them
+is ensuring that the package will install easily on many platforms,
+and that the magic we described earlier (@pxref{Users}) will work
+for installers and end users.
+
+Of course, there are many possible ways by which GNU @code{gettext}
+might be integrated in a distribution, and this chapter does not cover
+them in all generality. Instead, it details one possible approach which
+is especially adequate for many free software distributions following GNU
+standards, or even better, Gnits standards, because GNU @code{gettext}
+is purposely for helping the internationalization of the whole GNU
+project, and as many other good free packages as possible. So, the
+maintainer's view presented here presumes that the package already has
+a @file{configure.in} file and uses GNU Autoconf.
+
+Nevertheless, GNU @code{gettext} may surely be useful for free packages
+not following GNU standards and conventions, but the maintainers of such
+packages might have to show imagination and initiative in organizing
+their distributions so @code{gettext} work for them in all situations.
+There are surely many, out there.
+
+Even if @code{gettext} methods are now stabilizing, slight adjustments
+might be needed between successive @code{gettext} versions, so you
+should ideally revise this chapter in subsequent releases, looking
+for changes.
+
+@menu
+* Flat and Non-Flat:: Flat or Non-Flat Directory Structures
+* Prerequisites:: Prerequisite Works
+* gettextize Invocation:: Invoking the @code{gettextize} Program
+* Adjusting Files:: Files You Must Create or Alter
+@end menu
+
+@node Flat and Non-Flat, Prerequisites, Maintainers, Maintainers
+@section Flat or Non-Flat Directory Structures
+
+Some free software packages are distributed as @code{tar} files which unpack
+in a single directory, these are said to be @dfn{flat} distributions.
+Other free software packages have a one level hierarchy of subdirectories, using
+for example a subdirectory named @file{doc/} for the Texinfo manual and
+man pages, another called @file{lib/} for holding functions meant to
+replace or complement C libraries, and a subdirectory @file{src/} for
+holding the proper sources for the package. These other distributions
+are said to be @dfn{non-flat}.
+
+For now, we cannot say much about flat distributions. A flat
+directory structure has the disadvantage of increasing the difficulty
+of updating to a new version of GNU @code{gettext}. Also, if you have
+many PO files, this could somewhat pollute your single directory.
+In the GNU @code{gettext} distribution, the @file{misc/} directory
+contains a shell script named @file{combine-sh}. That script may
+be used for combining all the C files of the @file{intl/} directory
+into a pair of C files (one @file{.c} and one @file{.h}). Those two
+generated files would fit more easily in a flat directory structure,
+and you will then have to add these two files to your project.
+
+Maybe because GNU @code{gettext} itself has a non-flat structure,
+we have more experience with this approach, and this is what will be
+described in the remaining of this chapter. Some maintainers might
+use this as an opportunity to unflatten their package structure.
+Only later, once gained more experience adapting GNU @code{gettext}
+to flat distributions, we might add some notes about how to proceed
+in flat situations.
+
+@node Prerequisites, gettextize Invocation, Flat and Non-Flat, Maintainers
+@section Prerequisite Works
+
+There are some works which are required for using GNU @code{gettext}
+in one of your package. These works have some kind of generality
+that escape the point by point descriptions used in the remainder
+of this chapter. So, we describe them here.
+
+@itemize @bullet
+@item
+Before attempting to use you should install some other packages first.
+Ensure that recent versions of GNU @code{m4}, GNU Autoconf and GNU
+@code{gettext} are already installed at your site, and if not, proceed
+to do this first. If you got to install these things, beware that
+GNU @code{m4} must be fully installed before GNU Autoconf is even
+@emph{configured}.
+
+To further ease the task of a package maintainer the @code{automake}
+package was designed and implemented. GNU @code{gettext} now uses this
+tool and the @file{Makefile}s in the @file{intl/} and @file{po/}
+therefore know about all the goals necessary for using @code{automake}
+and @file{libintl} in one project.
+
+Those four packages are only needed to you, as a maintainer; the
+installers of your own package and end users do not really need any of
+GNU @code{m4}, GNU Autoconf, GNU @code{gettext}, or GNU @code{automake}
+for successfully installing and running your package, with messages
+properly translated. But this is not completely true if you provide
+internationalized shell scripts within your own package: GNU
+@code{gettext} shall then be installed at the user site if the end users
+want to see the translation of shell script messages.
+
+@item
+Your package should use Autoconf and have a @file{configure.in} file.
+If it does not, you have to learn how. The Autoconf documentation
+is quite well written, it is a good idea that you print it and get
+familiar with it.
+
+@item
+Your C sources should have already been modified according to
+instructions given earlier in this manual. @xref{Sources}.
+
+@item
+Your @file{po/} directory should receive all PO files submitted to you
+by the translator teams, each having @file{@var{ll}.po} as a name.
+This is not usually easy to get translation
+work done before your package gets internationalized and available!
+Since the cycle has to start somewhere, the easiest for the maintainer
+is to start with absolutely no PO files, and wait until various
+translator teams get interested in your package, and submit PO files.
+
+@end itemize
+
+It is worth adding here a few words about how the maintainer should
+ideally behave with PO files submissions. As a maintainer, your role is
+to authentify the origin of the submission as being the representative
+of the appropriate translating teams of the Translation Project (forward
+the submission to @file{translation@@iro.umontreal.ca} in case of doubt),
+to ensure that the PO file format is not severely broken and does not
+prevent successful installation, and for the rest, to merely to put these
+PO files in @file{po/} for distribution.
+
+As a maintainer, you do not have to take on your shoulders the
+responsibility of checking if the translations are adequate or
+complete, and should avoid diving into linguistic matters. Translation
+teams drive themselves and are fully responsible of their linguistic
+choices for the Translation Project. Keep in mind that translator teams are @emph{not}
+driven by maintainers. You can help by carefully redirecting all
+communications and reports from users about linguistic matters to the
+appropriate translation team, or explain users how to reach or join
+their team. The simplest might be to send them the @file{ABOUT-NLS} file.
+
+Maintainers should @emph{never ever} apply PO file bug reports
+themselves, short-cutting translation teams. If some translator has
+difficulty to get some of her points through her team, it should not be
+an issue for her to directly negotiate translations with maintainers.
+Teams ought to settle their problems themselves, if any. If you, as
+a maintainer, ever think there is a real problem with a team, please
+never try to @emph{solve} a team's problem on your own.
+
+@node gettextize Invocation, Adjusting Files, Prerequisites, Maintainers
+@section Invoking the @code{gettextize} Program
+
+Some files are consistently and identically needed in every package
+internationalized through GNU @code{gettext}. As a matter of
+convenience, the @code{gettextize} program puts all these files right
+in your package. This program has the following synopsis:
+
+@example
+gettextize [ @var{option}@dots{} ] [ @var{directory} ]
+@end example
+
+@noindent
+and accepts the following options:
+
+@table @samp
+@item -c
+@itemx --copy
+Copy the needed files instead of making symbolic links. Using links
+would allow the package to always use the latest @code{gettext} code
+available on the system, but it might disturb some mechanism the
+maintainer is used to apply to the sources. Because running
+@code{gettextize} is easy there shouldn't be problems with using copies.
+
+@item -f
+@itemx --force
+Force replacement of files which already exist.
+
+@item -h
+@itemx --help
+Display this help and exit.
+
+@item --version
+Output version information and exit.
+
+@end table
+
+If @var{directory} is given, this is the top level directory of a
+package to prepare for using GNU @code{gettext}. If not given, it
+is assumed that the current directory is the top level directory of
+such a package.
+
+The program @code{gettextize} provides the following files. However,
+no existing file will be replaced unless the option @code{--force}
+(@code{-f}) is specified.
+
+@enumerate
+@item
+The @file{ABOUT-NLS} file is copied in the main directory of your package,
+the one being at the top level. This file gives the main indications
+about how to install and use the Native Language Support features
+of your program. You might elect to use a more recent copy of this
+@file{ABOUT-NLS} file than the one provided through @code{gettextize},
+if you have one handy. You may also fetch a more recent copy of file
+@file{ABOUT-NLS} from Translation Project sites, and from most GNU
+archive sites.
+
+@item
+A @file{po/} directory is created for eventually holding
+all translation files, but initially only containing the file
+@file{po/Makefile.in.in} from the GNU @code{gettext} distribution.
+(beware the double @samp{.in} in the file name). If the @file{po/}
+directory already exists, it will be preserved along with the files
+it contains, and only @file{Makefile.in.in} will be overwritten.
+
+@item
+A @file{intl/} directory is created and filled with most of the files
+originally in the @file{intl/} directory of the GNU @code{gettext}
+distribution. Also, if option @code{--force} (@code{-f}) is given,
+the @file{intl/} directory is emptied first.
+
+@end enumerate
+
+If your site support symbolic links, @code{gettextize} will not
+actually copy the files into your package, but establish symbolic
+links instead. This avoids duplicating the disk space needed in
+all packages. Merely using the @samp{-h} option while creating the
+@code{tar} archive of your distribution will resolve each link by an
+actual copy in the distribution archive. So, to insist, you really
+should use @samp{-h} option with @code{tar} within your @code{dist}
+goal of your main @file{Makefile.in}.
+
+It is interesting to understand that most new files for supporting
+GNU @code{gettext} facilities in one package go in @file{intl/}
+and @file{po/} subdirectories. One distinction between these two
+directories is that @file{intl/} is meant to be completely identical
+in all packages using GNU @code{gettext}, while all newly created
+files, which have to be different, go into @file{po/}. There is a
+common @file{Makefile.in.in} in @file{po/}, because the @file{po/}
+directory needs its own @file{Makefile}, and it has been designed so
+it can be identical in all packages.
+
+@node Adjusting Files, , gettextize Invocation, Maintainers
+@section Files You Must Create or Alter
+
+Besides files which are automatically added through @code{gettextize},
+there are many files needing revision for properly interacting with
+GNU @code{gettext}. If you are closely following GNU standards for
+Makefile engineering and auto-configuration, the adaptations should
+be easier to achieve. Here is a point by point description of the
+changes needed in each.
+
+So, here comes a list of files, each one followed by a description of
+all alterations it needs. Many examples are taken out from the GNU
+@code{gettext} @value{VERSION} distribution itself. You may indeed
+refer to the source code of the GNU @code{gettext} package, as it
+is intended to be a good example and master implementation for using
+its own functionality.
+
+@menu
+* po/POTFILES.in:: @file{POTFILES.in} in @file{po/}
+* configure.in:: @file{configure.in} at top level
+* aclocal:: @file{aclocal.m4} at top level
+* acconfig:: @file{acconfig.h} at top level
+* Makefile:: @file{Makefile.in} at top level
+* src/Makefile:: @file{Makefile.in} in @file{src/}
+@end menu
+
+@node po/POTFILES.in, configure.in, Adjusting Files, Adjusting Files
+@subsection @file{POTFILES.in} in @file{po/}
+
+The @file{po/} directory should receive a file named
+@file{POTFILES.in}. This file tells which files, among all program
+sources, have marked strings needing translation. Here is an example
+of such a file:
+
+@example
+@group
+# List of source files containing translatable strings.
+# Copyright (C) 1995 Free Software Foundation, Inc.
+
+# Common library files
+lib/error.c
+lib/getopt.c
+lib/xmalloc.c
+
+# Package source files
+src/gettextp.c
+src/msgfmt.c
+src/xgettext.c
+@end group
+@end example
+
+@noindent
+Dashed comments and white lines are ignored. All other lines
+list those source files containing strings marked for translation
+(@pxref{Mark Keywords}), in a notation relative to the top level
+of your whole distribution, rather than the location of the
+@file{POTFILES.in} file itself.
+
+@node configure.in, aclocal, po/POTFILES.in, Adjusting Files
+@subsection @file{configure.in} at top level
+
+@enumerate
+@item Declare the package and version.
+
+This is done by a set of lines like these:
+
+@example
+PACKAGE=gettext
+VERSION=@value{VERSION}
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+@end example
+
+@noindent
+Of course, you replace @samp{gettext} with the name of your package,
+and @samp{@value{VERSION}} by its version numbers, exactly as they
+should appear in the packaged @code{tar} file name of your distribution
+(@file{gettext-@value{VERSION}.tar.gz}, here).
+
+@item Declare the available translations.
+
+This is done by defining @code{ALL_LINGUAS} to the white separated,
+quoted list of available languages, in a single line, like this:
+
+@example
+ALL_LINGUAS="de fr"
+@end example
+
+@noindent
+This example means that German and French PO files are available, so
+that these languages are currently supported by your package. If you
+want to further restrict, at installation time, the set of installed
+languages, this should not be done by modifying @code{ALL_LINGUAS} in
+@file{configure.in}, but rather by using the @code{LINGUAS} environment
+variable (@pxref{Installers}).
+
+@item Check for internationalization support.
+
+Here is the main @code{m4} macro for triggering internationalization
+support. Just add this line to @file{configure.in}:
+
+@example
+AM_GNU_GETTEXT
+@end example
+
+@noindent
+This call is purposely simple, even if it generates a lot of configure
+time checking and actions.
+
+@item Have output files created.
+
+The @code{AC_OUTPUT} directive, at the end of your @file{configure.in}
+file, needs to be modified in two ways:
+
+@example
+AC_OUTPUT([@var{existing configuration files} intl/Makefile po/Makefile.in],
+@var{existing additional actions}])
+@end example
+
+The modification to the first argument to @code{AC_OUTPUT} asks
+for substitution in the @file{intl/} and @file{po/} directories.
+Note the @samp{.in} suffix used for @file{po/} only. This is because
+the distributed file is really @file{po/Makefile.in.in}.
+
+@end enumerate
+
+@node aclocal, acconfig, configure.in, Adjusting Files
+@subsection @file{aclocal.m4} at top level
+
+If you do not have an @file{aclocal.m4} file in your distribution,
+the simplest is taking a copy of @file{aclocal.m4} from
+GNU @code{gettext}. But to be precise, you only need macros
+@code{AM_LC_MESSAGES}, @code{AM_WITH_NLS} and @code{AM_GNU_GETTEXT},
+and @code{AM_PATH_PROG_WITH_TEST}, which is called by @code{AM_WITH_NLS},
+so you may use an editor and remove macros you do not need.
+
+If you already have an @file{aclocal.m4} file, then you will have
+to merge the said macros into your @file{aclocal.m4}. Note that if
+you are upgrading from a previous release of GNU @code{gettext}, you
+should most probably @emph{replace} the said macros, as they usually
+change a little from one release of GNU @code{gettext} to the next.
+Their contents may vary as we get more experience with strange systems
+out there.
+
+These macros check for the internationalization support functions
+and related informations. Hopefully, once stabilized, these macros
+might be integrated in the standard Autoconf set, because this
+piece of @code{m4} code will be the same for all projects using GNU
+@code{gettext}.
+
+@node acconfig, Makefile, aclocal, Adjusting Files
+@subsection @file{acconfig.h} at top level
+
+If you do not have an @file{acconfig.h} file in your distribution, the
+simplest is use take a copy of @file{acconfig.h} from GNU
+@code{gettext}. But to be precise, you only need the lines and comments
+for @code{ENABLE_NLS}, @code{HAVE_CATGETS}, @code{HAVE_GETTEXT} and
+@code{HAVE_LC_MESSAGES}, @code{HAVE_STPCPY}, @code{PACKAGE} and
+@code{VERSION}, so you may use an editor and remove everything else. If
+you already have an @file{acconfig.h} file, then you should merge the
+said definitions into your @file{acconfig.h}.
+
+@node Makefile, src/Makefile, acconfig, Adjusting Files
+@subsection @file{Makefile.in} at top level
+
+Here are a few modifications you need to make to your main, top-level
+@file{Makefile.in} file.
+
+@enumerate
+@item
+Add the following lines near the beginning of your @file{Makefile.in},
+so the @samp{dist:} goal will work properly (as explained further down):
+
+@example
+PACKAGE = @@PACKAGE@@
+VERSION = @@VERSION@@
+@end example
+
+@item
+Add file @file{ABOUT-NLS} to the @code{DISTFILES} definition, so the file gets
+distributed.
+
+@item
+Wherever you process subdirectories in your @file{Makefile.in}, be sure
+you also process dir subdirectories @samp{intl} and @samp{po}. Special
+rules in the @file{Makefiles} take care for the case where no
+internationalization is wanted.
+
+If you are using Makefiles, either generated by automake, or hand-written
+so they carefully follow the GNU coding standards, the effected goals for
+which the new subdirectories must be handled include @samp{installdirs},
+@samp{install}, @samp{uninstall}, @samp{clean}, @samp{distclean}.
+
+Here is an example of a canonical order of processing. In this
+example, we also define @code{SUBDIRS} in @code{Makefile.in} for it
+to be further used in the @samp{dist:} goal.
+
+@example
+SUBDIRS = doc lib @@INTLSUB@@ src @@POSUB@@
+@end example
+
+@noindent
+that you will have to adapt to your own package.
+
+@item
+A delicate point is the @samp{dist:} goal, as both
+@file{intl/Makefile} and @file{po/Makefile} will later assume that the
+proper directory has been set up from the main @file{Makefile}. Here is
+an example at what the @samp{dist:} goal might look like:
+
+@example
+distdir = $(PACKAGE)-$(VERSION)
+dist: Makefile
+ rm -fr $(distdir)
+ mkdir $(distdir)
+ chmod 777 $(distdir)
+ for file in $(DISTFILES); do \
+ ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
+ done
+ for subdir in $(SUBDIRS); do \
+ mkdir $(distdir)/$$subdir || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $@@) || exit 1; \
+ done
+ tar chozf $(distdir).tar.gz $(distdir)
+ rm -fr $(distdir)
+@end example
+
+@end enumerate
+
+@node src/Makefile, , Makefile, Adjusting Files
+@subsection @file{Makefile.in} in @file{src/}
+
+Some of the modifications made in the main @file{Makefile.in} will
+also be needed in the @file{Makefile.in} from your package sources,
+which we assume here to be in the @file{src/} subdirectory. Here are
+all the modifications needed in @file{src/Makefile.in}:
+
+@enumerate
+@item
+In view of the @samp{dist:} goal, you should have these lines near the
+beginning of @file{src/Makefile.in}:
+
+@example
+PACKAGE = @@PACKAGE@@
+VERSION = @@VERSION@@
+@end example
+
+@item
+If not done already, you should guarantee that @code{top_srcdir}
+gets defined. This will serve for @code{cpp} include files. Just add
+the line:
+
+@example
+top_srcdir = @@top_srcdir@@
+@end example
+
+@item
+You might also want to define @code{subdir} as @samp{src}, later
+allowing for almost uniform @samp{dist:} goals in all your
+@file{Makefile.in}. At list, the @samp{dist:} goal below assume that
+you used:
+
+@example
+subdir = src
+@end example
+
+@item
+You should ensure that the final linking will use @code{@@INTLLIBS@@} as
+a library. An easy way to achieve this is to manage that it gets into
+@code{LIBS}, like this:
+
+@example
+LIBS = @@INTLLIBS@@ @@LIBS@@
+@end example
+
+In most packages internationalized with GNU @code{gettext}, one will
+find a directory @file{lib/} in which a library containing some helper
+functions will be build. (You need at least the few functions which the
+GNU @code{gettext} Library itself needs.) However some of the functions
+in the @file{lib/} also give messages to the user which of course should be
+translated, too. Taking care of this it is not enough to place the support
+library (say @file{libsupport.a}) just between the @code{@@INTLLIBS@@}
+and @code{@@LIBS@@} in the above example. Instead one has to write this:
+
+@example
+LIBS = ../lib/libsupport.a @@INTLLIBS@@ ../lib/libsupport.a @@LIBS@@
+@end example
+
+@item
+You should also ensure that directory @file{intl/} will be searched for
+C preprocessor include files in all circumstances. So, you have to
+manage so both @samp{-I../intl} and @samp{-I$(top_srcdir)/intl} will
+be given to the C compiler.
+
+@item
+Your @samp{dist:} goal has to conform with others. Here is a
+reasonable definition for it:
+
+@example
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist: Makefile $(DISTFILES)
+ for file in $(DISTFILES); do \
+ ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
+ done
+@end example
+
+@end enumerate
+
+@node Conclusion, Country Codes, Maintainers, Top
+@chapter Concluding Remarks
+
+We would like to conclude this GNU @code{gettext} manual by presenting
+an history of the Translation Project so far. We finally give
+a few pointers for those who want to do further research or readings
+about Native Language Support matters.
+
+@menu
+* History:: History of GNU @code{gettext}
+* References:: Related Readings
+@end menu
+
+@node History, References, Conclusion, Conclusion
+@section History of GNU @code{gettext}
+
+Internationalization concerns and algorithms have been informally
+and casually discussed for years in GNU, sometimes around GNU
+@code{libc}, maybe around the incoming @code{Hurd}, or otherwise
+(nobody clearly remembers). And even then, when the work started for
+real, this was somewhat independently of these previous discussions.
+
+This all began in July 1994, when Patrick D'Cruze had the idea and
+initiative of internationalizing version 3.9.2 of GNU @code{fileutils}.
+He then asked Jim Meyering, the maintainer, how to get those changes
+folded into an official release. That first draft was full of
+@code{#ifdef}s and somewhat disconcerting, and Jim wanted to find
+nicer ways. Patrick and Jim shared some tries and experimentations
+in this area. Then, feeling that this might eventually have a deeper
+impact on GNU, Jim wanted to know what standards were, and contacted
+Richard Stallman, who very quickly and verbally described an overall
+design for what was meant to become @code{glocale}, at that time.
+
+Jim implemented @code{glocale} and got a lot of exhausting feedback
+from Patrick and Richard, of course, but also from Mitchum DSouza
+(who wrote a @code{catgets}-like package), Roland McGrath, maybe David
+MacKenzie, Fran@,{c}ois Pinard, and Paul Eggert, all pushing and
+pulling in various directions, not always compatible, to the extent
+that after a couple of test releases, @code{glocale} was torn apart.
+
+While Jim took some distance and time and became dad for a second
+time, Roland wanted to get GNU @code{libc} internationalized, and
+got Ulrich Drepper involved in that project. Instead of starting
+from @code{glocale}, Ulrich rewrote something from scratch, but
+more conformant to the set of guidelines who emerged out of the
+@code{glocale} effort. Then, Ulrich got people from the previous
+forum to involve themselves into this new project, and the switch
+from @code{glocale} to what was first named @code{msgutils}, renamed
+@code{nlsutils}, and later @code{gettext}, became officially accepted
+by Richard in May 1995 or so.
+
+Let's summarize by saying that Ulrich Drepper wrote GNU @code{gettext}
+in April 1995. The first official release of the package, including
+PO mode, occurred in July 1995, and was numbered 0.7. Other people
+contributed to the effort by providing a discussion forum around
+Ulrich, writing little pieces of code, or testing. These are quoted
+in the @code{THANKS} file which comes with the GNU @code{gettext}
+distribution.
+
+While this was being done, Fran@,{c}ois adapted half a dozen of
+GNU packages to @code{glocale} first, then later to @code{gettext},
+putting them in pretest, so providing along the way an effective
+user environment for fine tuning the evolving tools. He also took
+the responsibility of organizing and coordinating the Translation
+Project. After nearly a year of informal exchanges between people from
+many countries, translator teams started to exist in May 1995, through
+the creation and support by Patrick D'Cruze of twenty unmoderated
+mailing lists for that many native languages, and two moderated
+lists: one for reaching all teams at once, the other for reaching
+all willing maintainers of internationalized free software packages.
+
+Fran@,{c}ois also wrote PO mode in June 1995 with the collaboration
+of Greg McGary, as a kind of contribution to Ulrich's package.
+He also gave a hand with the GNU @code{gettext} Texinfo manual.
+
+@node References, , History, Conclusion
+@section Related Readings
+
+Eugene H. Dorr (@file{dorre@@well.com}) maintains an interesting
+bibliography on internationalization matters, called
+@cite{Internationalization Reference List}, which is available as:
+@example
+ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/i18n-books.txt
+@end example
+
+Michael Gschwind (@file{mike@@vlsivie.tuwien.ac.at}) maintains a
+Frequently Asked Questions (FAQ) list, entitled @cite{Programming for
+Internationalisation}. This FAQ discusses writing programs which
+can handle different language conventions, character sets, etc.;
+and is applicable to all character set encodings, with particular
+emphasis on @w{ISO 8859-1}. It is regularly published in Usenet
+groups @file{comp.unix.questions}, @file{comp.std.internat},
+@file{comp.software.international}, @file{comp.lang.c},
+@file{comp.windows.x}, @file{comp.std.c}, @file{comp.answers}
+and @file{news.answers}. The home location of this document is:
+@example
+ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/ISO-programming
+@end example
+
+Patrick D'Cruze (@file{pdcruze@@li.org}) wrote a tutorial about NLS
+matters, and Jochen Hein (@file{Hein@@student.tu-clausthal.de}) took
+over the responsibility of maintaining it. It may be found as:
+@example
+ftp://sunsite.unc.edu/pub/Linux/utils/nls/catalogs/Incoming/...
+ ...locale-tutorial-0.8.txt.gz
+@end example
+@noindent
+This site is mirrored in:
+@example
+ftp://ftp.ibp.fr/pub/linux/sunsite/
+@end example
+
+A French version of the same tutorial should be findable at:
+@example
+ftp://ftp.ibp.fr/pub/linux/french/docs/
+@end example
+@noindent
+together with French translations of many Linux-related documents.
+
+@node Country Codes, , Conclusion, Top
+@appendix Country Codes
+
+The @w{ISO 639} standard defines two character codes for many countries.
+All abreviations for countries or languages used in the Translation
+Project should come from this standard.
+
+@table @samp
+@include iso-apdx.texi
+@end table
+
+@contents
+@bye
+
+@c Local variables:
+@c texinfo-column-for-description: 32
+@c End:
diff --git a/doc/iso-apdx.sed b/doc/iso-apdx.sed
new file mode 100644
index 0000000..1f9948b
--- /dev/null
+++ b/doc/iso-apdx.sed
@@ -0,0 +1,19 @@
+#! /usr/bin/sed -f
+#
+# each line of the form ^.. .* contains the code for a country.
+#
+/^.. / {
+ h
+ s/^.. \(.*\)/\1./
+ x
+ s/^\(..\).*/@item \1/
+ G
+ p
+}
+#
+# delete the rest
+#
+d
+
+
+
diff --git a/doc/iso-apdx.texi b/doc/iso-apdx.texi
new file mode 100644
index 0000000..df50921
--- /dev/null
+++ b/doc/iso-apdx.texi
@@ -0,0 +1,278 @@
+@item aa
+Afar.
+@item ab
+Abkhazian.
+@item af
+Afrikaans.
+@item am
+Amharic.
+@item ar
+Arabic.
+@item as
+Assamese.
+@item ay
+Aymara.
+@item az
+Azerbaijani.
+@item ba
+Bashkir.
+@item be
+Byelorussian.
+@item bg
+Bulgarian.
+@item bh
+Bihari.
+@item bi
+Bislama.
+@item bn
+Bengali; Bangla.
+@item bo
+Tibetan.
+@item br
+Breton.
+@item ca
+Catalan.
+@item co
+Corsican.
+@item cs
+Czech.
+@item cy
+Welsh.
+@item da
+Danish.
+@item de
+German.
+@item dz
+Bhutani.
+@item el
+Greek.
+@item en
+English.
+@item eo
+Esperanto.
+@item es
+Spanish.
+@item et
+Estonian.
+@item eu
+Basque.
+@item fa
+Persian.
+@item fi
+Finnish.
+@item fj
+Fiji.
+@item fo
+Faroese.
+@item fr
+French.
+@item fy
+Frisian.
+@item ga
+Irish.
+@item gd
+Scots Gaelic.
+@item gl
+Galician.
+@item gn
+Guarani.
+@item gu
+Gujarati.
+@item ha
+Hausa.
+@item he
+Hebrew (formerly iw).
+@item hi
+Hindi.
+@item hr
+Croatian.
+@item hu
+Hungarian.
+@item hy
+Armenian.
+@item ia
+Interlingua.
+@item id
+Indonesian (formerly in).
+@item ie
+Interlingue.
+@item ik
+Inupiak.
+@item is
+Icelandic.
+@item it
+Italian.
+@item iu
+Inuktitut.
+@item ja
+Japanese.
+@item jw
+Javanese.
+@item ka
+Georgian.
+@item kk
+Kazakh.
+@item kl
+Greenlandic.
+@item km
+Cambodian.
+@item kn
+Kannada.
+@item ko
+Korean.
+@item ks
+Kashmiri.
+@item ku
+Kurdish.
+@item ky
+Kirghiz.
+@item la
+Latin.
+@item ln
+Lingala.
+@item lo
+Laothian.
+@item lt
+Lithuanian.
+@item lv
+Latvian, Lettish.
+@item mg
+Malagasy.
+@item mi
+Maori.
+@item mk
+Macedonian.
+@item ml
+Malayalam.
+@item mn
+Mongolian.
+@item mo
+Moldavian.
+@item mr
+Marathi.
+@item ms
+Malay.
+@item mt
+Maltese.
+@item my
+Burmese.
+@item na
+Nauru.
+@item ne
+Nepali.
+@item nl
+Dutch.
+@item no
+Norwegian.
+@item oc
+Occitan.
+@item om
+(Afan) Oromo.
+@item or
+Oriya.
+@item pa
+Punjabi.
+@item pl
+Polish.
+@item ps
+Pashto, Pushto.
+@item pt
+Portuguese.
+@item qu
+Quechua.
+@item rm
+Rhaeto-Romance.
+@item rn
+Kirundi.
+@item ro
+Romanian.
+@item ru
+Russian.
+@item rw
+Kinyarwanda.
+@item sa
+Sanskrit.
+@item sd
+Sindhi.
+@item sg
+Sangro.
+@item sh
+Serbo-Croatian.
+@item si
+Sinhalese.
+@item sk
+Slovak.
+@item sl
+Slovenian.
+@item sm
+Samoan.
+@item sn
+Shona.
+@item so
+Somali.
+@item sq
+Albanian.
+@item sr
+Serbian.
+@item ss
+Siswati.
+@item st
+Sesotho.
+@item su
+Sundanese.
+@item sv
+Swedish.
+@item sw
+Swahili.
+@item ta
+Tamil.
+@item te
+Telugu.
+@item tg
+Tajik.
+@item th
+Thai.
+@item ti
+Tigrinya.
+@item tk
+Turkmen.
+@item tl
+Tagalog.
+@item tn
+Setswana.
+@item to
+Tonga.
+@item tr
+Turkish.
+@item ts
+Tsonga.
+@item tt
+Tatar.
+@item tw
+Twi.
+@item ug
+Uighur.
+@item uk
+Ukrainian.
+@item ur
+Urdu.
+@item uz
+Uzbek.
+@item vi
+Vietnamese.
+@item vo
+Volapuk.
+@item wo
+Wolof.
+@item xh
+Xhosa.
+@item yi
+Yiddish (formerly ji).
+@item yo
+Yoruba.
+@item za
+Zhuang.
+@item zh
+Chinese.
+@item zu
+Zulu.
diff --git a/doc/matrix.texi b/doc/matrix.texi
new file mode 100644
index 0000000..c3b8995
--- /dev/null
+++ b/doc/matrix.texi
@@ -0,0 +1,75 @@
+@example
+@group
+Ready PO files cs da de el en es fi fr it
+ .----------------------------.
+bash | [] [] |
+bison | [] [] |
+clisp | [] [] [] [] |
+cpio | [] [] [] |
+diffutils | [] [] [] |
+enscript | [] [] [] [] |
+fileutils | [] [] [] [] |
+findutils | [] [] [] [] |
+flex | [] [] |
+gcal | [] [] |
+gettext | [] [] [] [] [] |
+grep | [] [] [] [] |
+hello | [] [] [] [] [] |
+id-utils | [] [] |
+indent | [] [] |
+libc | [] [] [] |
+m4 | [] [] |
+make | [] [] [] |
+music | [] |
+ptx | [] [] [] |
+recode | [] [] [] [] |
+sed | |
+sh-utils | [] [] [] |
+sharutils | [] [] [] [] [] |
+tar | [] [] [] [] |
+texinfo | [] [] [] |
+textutils | [] [] [] [] |
+wdiff | [] [] [] [] |
+wget | [] [] [] [] |
+ `----------------------------'
+ cs da de el en es fi fr it
+ 7 4 26 4 1 18 1 26 4
+@end group
+
+@group
+ ja ko nl no pl pt ru sl sv
+ .----------------------------.
+bash | [] | 3
+bison | [] | 3
+clisp | | 4
+cpio | [] [] [] | 6
+diffutils | [] [] | 5
+enscript | [] [] | 6
+fileutils | [] [] [] [] [] [] [] | 11
+findutils | [] [] [] [] [] | 9
+flex | [] [] | 4
+gcal | [] [] [] | 5
+gettext | [] [] [] [] [] [] [] | 13
+grep | [] [] [] [] [] [] [] | 11
+hello | [] [] [] [] [] [] [] | 12
+id-utils | [] | 3
+indent | [] [] [] | 5
+libc | [] [] [] [] [] | 8
+m4 | [] [] [] [] | 6
+make | [] [] [] | 6
+music | [] | 2
+ptx | [] [] [] [] [] | 8
+recode | [] [] [] [] [] | 9
+sed | | 0
+sh-utils | [] [] [] [] [] | 8
+sharutils | [] [] | 7
+tar | [] [] [] [] [] [] [] | 11
+texinfo | [] | 4
+textutils | [] [] [] [] [] | 9
+wdiff | [] [] [] [] | 8
+wget | [] | 5
+ `----------------------------'
+ 18 teams ja ko nl no pl pt ru sl sv
+ 29 domains 1 12 21 11 19 7 5 7 17 191
+@end group
+@end example
diff --git a/doc/mdate-sh b/doc/mdate-sh
new file mode 100755
index 0000000..37171f2
--- /dev/null
+++ b/doc/mdate-sh
@@ -0,0 +1,92 @@
+#!/bin/sh
+# Get modification time of a file or directory and pretty-print it.
+# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Prevent date giving response in another language.
+LANG=C
+export LANG
+LC_ALL=C
+export LC_ALL
+LC_TIME=C
+export LC_TIME
+
+# Get the extended ls output of the file or directory.
+# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
+if ls -L /dev/null 1>/dev/null 2>&1; then
+ set - x`ls -L -l -d $1`
+else
+ set - x`ls -l -d $1`
+fi
+# The month is at least the fourth argument
+# (3 shifts here, the next inside the loop).
+shift
+shift
+shift
+
+# Find the month. Next argument is day, followed by the year or time.
+month=
+until test $month
+do
+ shift
+ case $1 in
+ Jan) month=January; nummonth=1;;
+ Feb) month=February; nummonth=2;;
+ Mar) month=March; nummonth=3;;
+ Apr) month=April; nummonth=4;;
+ May) month=May; nummonth=5;;
+ Jun) month=June; nummonth=6;;
+ Jul) month=July; nummonth=7;;
+ Aug) month=August; nummonth=8;;
+ Sep) month=September; nummonth=9;;
+ Oct) month=October; nummonth=10;;
+ Nov) month=November; nummonth=11;;
+ Dec) month=December; nummonth=12;;
+ esac
+done
+
+day=$2
+
+# Here we have to deal with the problem that the ls output gives either
+# the time of day or the year.
+case $3 in
+ *:*) set `date`; eval year=\$$#
+ case $2 in
+ Jan) nummonthtod=1;;
+ Feb) nummonthtod=2;;
+ Mar) nummonthtod=3;;
+ Apr) nummonthtod=4;;
+ May) nummonthtod=5;;
+ Jun) nummonthtod=6;;
+ Jul) nummonthtod=7;;
+ Aug) nummonthtod=8;;
+ Sep) nummonthtod=9;;
+ Oct) nummonthtod=10;;
+ Nov) nummonthtod=11;;
+ Dec) nummonthtod=12;;
+ esac
+ # For the first six month of the year the time notation can also
+ # be used for files modified in the last year.
+ if (expr $nummonth \> $nummonthtod) > /dev/null;
+ then
+ year=`expr $year - 1`
+ fi;;
+ *) year=$3;;
+esac
+
+# The result.
+echo $day $month $year
diff --git a/doc/nls.texi b/doc/nls.texi
new file mode 100644
index 0000000..a7797e8
--- /dev/null
+++ b/doc/nls.texi
@@ -0,0 +1,254 @@
+@node Translation Intro
+@chapter Notes on the Free Translation Project
+
+@set STATUS August 1998
+
+Free software is going international! The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that will gradually become able to speak many languages.
+A few packages already provide translations for their messages.
+
+If you found this @file{ABOUT-NLS} file inside a distribution, you
+may assume that the distributed package does use GNU @code{gettext}
+internally, itself available at your nearest GNU archive site. But you
+do @emph{not} need to install GNU @code{gettext} prior to configuring,
+installing or using this package with messages translated.
+
+Installers will find here some useful hints. These notes also explain
+how users should proceed for getting the programs to use the available
+translations. They tell how people wanting to contribute and work
+at translations should contact the appropriate team.
+
+When reporting bugs in the @file{intl/} directory or bugs which may
+be related to internationalization, you should tell about the version
+of @code{gettext} which is used. The information can be found in
+the @file{intl/VERSION} file, in internationalized packages.
+
+@menu
+* One advise::
+* INSTALL Matters::
+* Using This Package::
+* Translating Teams::
+* Available Packages::
+* Using gettext in own code::
+@end menu
+
+@node One advise
+@section One advise in advance
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+@example
+./configure --with-included-gettext
+@end example
+
+@noindent
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed. So far, only
+the @code{gettext} implementation in the GNU C library version 2
+provides as many features (such as locale alias or message inheritance)
+as the implementation here. It is also not possible to offer this
+additional functionality on top of a @code{catgets} implementation.
+Future versions of GNU @code{gettext} will very likely convey even more
+functionality. So it might be a good idea to change to GNU
+@code{gettext} as soon as possible.
+
+So you need not provide this option if you are using GNU libc 2 or you
+have installed a recent copy of the GNU gettext package with the
+included @file{libintl}.
+
+
+@node INSTALL Matters
+@section INSTALL Matters
+
+Some packages are @dfn{localizable} when properly installed; the
+programs they contain can be made to speak your own native language.
+Most such packages use GNU @code{gettext}. Other packages have their
+own ways to internationalization, predating GNU @code{gettext}.
+
+By default, this package will be installed to allow translation of
+messages. It will automatically detect whether the system provides
+usable @code{catgets} (if using this is selected by the installer) or
+@code{gettext} functions. If neither is available, the GNU
+@code{gettext} own library will be used. This library is wholly
+contained within this package, usually in the @file{intl/} subdirectory,
+so prior installation of the GNU @code{gettext} package is @emph{not}
+required. Installers may use special options at configuration time for
+changing the default behaviour. The commands:
+
+@example
+./configure --with-included-gettext
+./configure --with-catgets
+./configure --disable-nls
+@end example
+
+@noindent
+will respectively bypass any pre-existing @code{catgets} or
+@code{gettext} to use the internationalizing routines provided within
+this package, enable the use of the @code{catgets} functions (if found
+on the locale system), or else, @emph{totally} disable translation of
+messages.
+
+When you already have GNU @code{gettext} installed on your system and
+run configure without an option for your new package, @code{configure}
+will probably detect the previously built and installed @file{libintl.a}
+file and will decide to use this. This might be not what is desirable.
+You should use the more recent version of the GNU @code{gettext}
+library. I.e. if the file @file{intl/VERSION} shows that the library
+which comes with this package is more recent, you should use
+
+@example
+./configure --with-included-gettext
+@end example
+
+@noindent
+to prevent auto-detection.
+
+By default the configuration process will not test for the
+@code{catgets} function and therefore they will not be used. The
+reasons are already given above: the emulation on top of @code{catgets}
+cannot provide all the extensions provided by the GNU @code{gettext}
+library. If you nevertheless want to use the @code{catgets} functions
+use
+
+@example
+./configure --with-catgets
+@end example
+
+@noindent
+to enable the test for @code{catgets} (this causes no harm if
+@code{catgets} is not available on your system). If you really select
+this option we would like to hear about the reasons because we cannot
+think of any good one ourself.
+
+Internationalized packages have usually many @file{po/@var{ll}.po}
+files, where @var{ll} gives an @w{ISO 639} two-letter code
+identifying the language. Unless translations have been forbidden
+at @code{configure} time by using the @samp{--disable-nls} switch,
+all available translations are installed together with the package.
+However, the environment variable @code{LINGUAS} may be set, prior
+to configuration, to limit the installed set. @code{LINGUAS} should
+then contain a space separated list of two-letter codes, stating
+which languages are allowed.
+
+@node Using This Package
+@section Using This Package
+
+@c --
+@c FIXME: rewrite to document LANGUAGE, the long names, and aliases.
+@c --
+As a user, if your language has been installed for this package, you
+only have to set the @code{LANG} environment variable to the appropriate
+@w{ISO 639} @samp{@var{ll}} two-letter code prior to using the programs
+in the package. For example, let's suppose that you speak German. At
+the shell prompt, merely execute @w{@samp{setenv LANG de}} (in
+@code{csh}), @w{@samp{export LANG; LANG=de}} (in @code{sh}) or
+@w{@samp{export LANG=de}} (in @code{bash}). This can be done from your
+@file{.login} or @file{.profile} file, once and for all.
+@c Packages which are not internationalized will merely ignore the
+@c setting of this variable.
+@c FIXME: This last sentence is not true!! --drepper
+
+An operating system might already offer message localization for many of
+its programs, while other programs have been
+installed locally with the full capabilities of GNU @code{gettext}.
+Just using @code{gettext} extended syntax for @code{LANG} would break
+proper localization of already available operating system programs. In
+this case, users should set both @code{LANGUAGE} and @code{LANG}
+variables in their environment, as programs using GNU @code{gettext}
+give preference to @code{LANGUAGE}. For example, some Swedish users
+would rather read translations in German than English for when Swedish
+is not available. This is easily accomplished by setting
+@code{LANGUAGE} to @samp{sv:de} while leaving @code{LANG} to @samp{sv}.
+
+
+@node Translating Teams
+@section Translating Teams
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list, courtesy of Linux
+International. You may reach your translation team at the address
+@file{@var{ll}@@li.org}, replacing @var{ll} by the two-letter @w{ISO
+639} code for your language. Language codes are @emph{not} the same as
+the country codes given in @w{ISO 3166}. The following translation
+teams exist, as of @value{STATUS}:
+
+@quotation
+Chinese @code{zh}, Czech @code{cs}, Danish @code{da}, Dutch @code{nl},
+English @code{en}, Esperanto @code{eo}, Finnish @code{fi}, French
+@code{fr}, German @code{de}, Hungarian @code{hu}, Irish @code{ga},
+Italian @code{it}, Indonesian @code{id}, Japanese @code{ja}, Korean
+@code{ko}, Latin @code{la}, Norwegian @code{no}, Persian @code{fa},
+Polish @code{pl}, Portuguese @code{pt}, Russian @code{ru}, Slovenian
+@code{sl}, Spanish @code{es}, Swedish @code{sv}, and Turkish @code{tr}.
+@end quotation
+
+@noindent
+For example, you may reach the Chinese translation team by writing to
+@file{zh@@li.org}.
+
+If you'd like to volunteer to @emph{work} at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is @emph{not} the same as the list itself, it
+has @samp{-request} appended. For example, speakers of Swedish can send
+a message to @w{@file{sv-request@@li.org}}, having this message body:
+
+@example
+subscribe
+@end example
+
+Keep in mind that team members are expected to participate
+@emph{actively} in translations, or at solving translational
+difficulties, rather than merely lurking around. If your team does not
+exist yet and you want to start one, or if you are unsure about what to
+do or how to get started, please write to
+@w{@file{translation@@iro.umontreal.ca}} to reach the
+coordinator for all translator teams.
+
+The English team is special. It works at improving and uniformizing
+the terminology in use. Proven linguistic skill are praised
+more than programming skill, here.
+
+@node Available Packages
+@section Available Packages
+
+Languages are not equally supported in all packages. The following
+matrix shows the current state of internationalization, as of
+@value{STATUS}. The matrix shows, in regard of each package, for which
+languages PO files have been submitted to translation coordination.
+
+@include matrix.texi
+
+Some counters in the preceding matrix are higher than the number of visible
+blocks let us expect. This is because a few extra PO files are used for
+implementing regional variants of languages, or language dialects.
+
+For a PO file in the matrix above to be effective, the package to which
+it applies should also have been internationalized and distributed as
+such by its maintainer. There might be an observable lag between the
+mere existence a PO file and its wide availability in a distribution.
+
+If @value{STATUS} seems to be old, you may fetch a more recent copy
+of this @file{ABOUT-NLS} file on most GNU archive sites.
+
+
+@node Using gettext in own code
+@section Using @code{gettext} in new packages
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU @file{gettext} in your
+package. Of course the GNU Public License applies to your sources from
+then if you include @code{gettext} directly in your distribution on but
+since you are writing free software anyway this is no restriction.
+
+Once the sources are change appropriately and the setup can handle to
+use of @code{gettext} the only thing missing are the translations. The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project. Therefore the information given above
+applies also for every other Free Software Project. Contact
+@w{@file{translation@@iro.umontreal.ca}} to make the @file{.pot} files
+available to the translation teams.
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
new file mode 100644
index 0000000..5469103
--- /dev/null
+++ b/doc/texinfo.tex
@@ -0,0 +1,5302 @@
+% texinfo.tex -- TeX macros to handle Texinfo files.
+% $Id: texinfo.tex,v 1.1 2000/06/16 07:49:23 drepper Exp $
+%
+% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
+% Free Software Foundation, Inc.
+%
+% This texinfo.tex file is free software; you can redistribute it and/or
+% modify it under the terms of the GNU General Public License as
+% published by the Free Software Foundation; either version 2, or (at
+% your option) any later version.
+%
+% This texinfo.tex file is distributed in the hope that it will be
+% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this texinfo.tex file; see the file COPYING. If not, write
+% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+% Boston, MA 02111-1307, USA.
+%
+% In other words, you are welcome to use, share and improve this program.
+% You are forbidden to forbid anyone else to use, share and improve
+% what you give them. Help stamp out software-hoarding!
+%
+% Please try the latest version of texinfo.tex before submitting bug
+% reports; you can get the latest version from:
+% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
+% ftp://ftp.gnu.org/pub/gnu/texinfo.tex
+% (and all GNU mirrors, see ftp://ftp.gnu.org/pub/gnu/README.mirrors)
+% ftp://tug.org/tex/texinfo.tex
+% ftp://ctan.org/macros/texinfo/texinfo.tex
+% (and all CTAN mirrors, finger ctan@tug.org for a list).
+%
+% Send bug reports to bug-texinfo@gnu.org.
+% Please include a precise test case in each bug report,
+% including a complete document with which we can reproduce the problem.
+%
+% Texinfo macros (with @macro) are *not* supported by texinfo.tex. You
+% have to run makeinfo -E to expand macros first; the texi2dvi script
+% does this.
+%
+% To process a Texinfo manual with TeX, it's most reliable to use the
+% texi2dvi shell script that comes with the distribution. For simple
+% manuals, you can get away with:
+% tex foo.texi
+% texindex foo.??
+% tex foo.texi
+% tex foo.texi
+% dvips foo.dvi -o # or whatever, to process the dvi file.
+% The extra runs of TeX get the cross-reference information correct.
+% Sometimes one run after texindex suffices, and sometimes you need more
+% than two; texi2dvi does it as many times as necessary.
+
+
+% Make it possible to create a .fmt file just by loading this file:
+% if the underlying format is not loaded, start by loading it now.
+% Added by gildea November 1993.
+\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
+
+% This automatically updates the version number based on RCS.
+\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
+\deftexinfoversion$Revision: 1.1 $
+\message{Loading texinfo package [Version \texinfoversion]:}
+
+% If in a .fmt file, print the version number
+% and turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+\everyjob{\message{[Texinfo version \texinfoversion]}\message{}
+ \catcode`+=\active \catcode`\_=\active}
+
+% Save some parts of plain tex whose names we will redefine.
+
+\let\ptexb=\b
+\let\ptexbullet=\bullet
+\let\ptexc=\c
+\let\ptexcomma=\,
+\let\ptexdot=\.
+\let\ptexdots=\dots
+\let\ptexend=\end
+\let\ptexequiv=\equiv
+\let\ptexexclam=\!
+\let\ptexi=\i
+\let\ptexlbrace=\{
+\let\ptexrbrace=\}
+\let\ptexstar=\*
+\let\ptext=\t
+
+% We never want plain's outer \+ definition in Texinfo.
+% For @tex, we can use \tabalign.
+\let\+ = \relax
+
+
+\message{Basics,}
+\chardef\other=12
+
+% If this character appears in an error message or help string, it
+% starts a new line in the output.
+\newlinechar = `^^J
+
+% Set up fixed words for English if not already set.
+\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
+\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
+\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
+\ifx\putwordInfo\undefined \gdef\putwordfile{Info}\fi
+\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
+\ifx\putwordon\undefined \gdef\putwordon{on}\fi
+\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
+\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
+\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
+\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
+\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
+\ifx\putwordShortContents\undefined \gdef\putwordShortContents{Short Contents}\fi
+\ifx\putwordTableofContents\undefined\gdef\putwordTableofContents{Table of Contents}\fi
+
+% Ignore a token.
+%
+\def\gobble#1{}
+
+\hyphenation{ap-pen-dix}
+\hyphenation{mini-buf-fer mini-buf-fers}
+\hyphenation{eshell}
+\hyphenation{white-space}
+
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen \bindingoffset
+\newdimen \normaloffset
+\newdimen\pagewidth \newdimen\pageheight
+
+% Sometimes it is convenient to have everything in the transcript file
+% and nothing on the terminal. We don't just call \tracingall here,
+% since that produces some useless output on the terminal.
+%
+\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
+\def\loggingall{\tracingcommands2 \tracingstats2
+ \tracingpages1 \tracingoutput1 \tracinglostchars1
+ \tracingmacros2 \tracingparagraphs1 \tracingrestores1
+ \showboxbreadth\maxdimen\showboxdepth\maxdimen
+}%
+
+% For @cropmarks command.
+% Do @cropmarks to get crop marks.
+%
+\newif\ifcropmarks
+\let\cropmarks = \cropmarkstrue
+%
+% Dimensions to add cropmarks at corners.
+% Added by P. A. MacKay, 12 Nov. 1986
+%
+\newdimen\cornerlong \newdimen\cornerthick
+\newdimen\topandbottommargin
+\newdimen\outerhsize \newdimen\outervsize
+\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
+\outerhsize=7in
+%\outervsize=9.5in
+% Alternative @smallbook page size is 9.25in
+\outervsize=9.25in
+\topandbottommargin=.75in
+
+% Main output routine.
+\chardef\PAGE = 255
+\output = {\onepageout{\pagecontents\PAGE}}
+
+\newbox\headlinebox
+\newbox\footlinebox
+
+% \onepageout takes a vbox as an argument. Note that \pagecontents
+% does insertions, but you have to call it yourself.
+\def\onepageout#1{%
+ \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
+ %
+ \ifodd\pageno \advance\hoffset by \bindingoffset
+ \else \advance\hoffset by -\bindingoffset\fi
+ %
+ % Do this outside of the \shipout so @code etc. will be expanded in
+ % the headline as they should be, not taken literally (outputting ''code).
+ \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+ %
+ {%
+ % Have to do this stuff outside the \shipout because we want it to
+ % take effect in \write's, yet the group defined by the \vbox ends
+ % before the \shipout runs.
+ %
+ \escapechar = `\\ % use backslash in output files.
+ \indexdummies % don't expand commands in the output.
+ \normalturnoffactive % \ in index entries must not stay \, e.g., if
+ % the page break happens to be in the middle of an example.
+ \shipout\vbox{%
+ \ifcropmarks \vbox to \outervsize\bgroup
+ \hsize = \outerhsize
+ \line{\ewtop\hfil\ewtop}%
+ \nointerlineskip
+ \line{%
+ \vbox{\moveleft\cornerthick\nstop}%
+ \hfill
+ \vbox{\moveright\cornerthick\nstop}%
+ }%
+ \vskip\topandbottommargin
+ \line\bgroup
+ \hfil % center the page within the outer (page) hsize.
+ \ifodd\pageno\hskip\bindingoffset\fi
+ \vbox\bgroup
+ \fi
+ %
+ \unvbox\headlinebox
+ \pagebody{#1}%
+ \ifdim\ht\footlinebox > 0pt
+ % Only leave this space if the footline is nonempty.
+ % (We lessened \vsize for it in \oddfootingxxx.)
+ % The \baselineskip=24pt in plain's \makefootline has no effect.
+ \vskip 2\baselineskip
+ \unvbox\footlinebox
+ \fi
+ %
+ \ifcropmarks
+ \egroup % end of \vbox\bgroup
+ \hfil\egroup % end of (centering) \line\bgroup
+ \vskip\topandbottommargin plus1fill minus1fill
+ \boxmaxdepth = \cornerthick
+ \line{%
+ \vbox{\moveleft\cornerthick\nsbot}%
+ \hfill
+ \vbox{\moveright\cornerthick\nsbot}%
+ }%
+ \nointerlineskip
+ \line{\ewbot\hfil\ewbot}%
+ \egroup % \vbox from first cropmarks clause
+ \fi
+ }% end of \shipout\vbox
+ }% end of group with \turnoffactive
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi
+}
+
+\newinsert\margin \dimen\margin=\maxdimen
+
+\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+{\catcode`\@ =11
+\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+% marginal hacks, juha@viisa.uucp (Juha Takala)
+\ifvoid\margin\else % marginal info is present
+ \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
+\dimen@=\dp#1 \unvbox#1
+\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
+\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
+}
+
+% Here are the rules for the cropmarks. Note that they are
+% offset so that the space between them is truly \outerhsize or \outervsize
+% (P. A. MacKay, 12 November, 1986)
+%
+\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
+\def\nstop{\vbox
+ {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
+\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
+\def\nsbot{\vbox
+ {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
+
+% Parse an argument, then pass it to #1. The argument is the rest of
+% the input line (except we remove a trailing comment). #1 should be a
+% macro which expects an ordinary undelimited TeX argument.
+%
+\def\parsearg#1{%
+ \let\next = #1%
+ \begingroup
+ \obeylines
+ \futurelet\temp\parseargx
+}
+
+% If the next token is an obeyed space (from an @example environment or
+% the like), remove it and recurse. Otherwise, we're done.
+\def\parseargx{%
+ % \obeyedspace is defined far below, after the definition of \sepspaces.
+ \ifx\obeyedspace\temp
+ \expandafter\parseargdiscardspace
+ \else
+ \expandafter\parseargline
+ \fi
+}
+
+% Remove a single space (as the delimiter token to the macro call).
+{\obeyspaces %
+ \gdef\parseargdiscardspace {\futurelet\temp\parseargx}}
+
+{\obeylines %
+ \gdef\parseargline#1^^M{%
+ \endgroup % End of the group started in \parsearg.
+ %
+ % First remove any @c comment, then any @comment.
+ % Result of each macro is put in \toks0.
+ \argremovec #1\c\relax %
+ \expandafter\argremovecomment \the\toks0 \comment\relax %
+ %
+ % Call the caller's macro, saved as \next in \parsearg.
+ \expandafter\next\expandafter{\the\toks0}%
+ }%
+}
+
+% Since all \c{,omment} does is throw away the argument, we can let TeX
+% do that for us. The \relax here is matched by the \relax in the call
+% in \parseargline; it could be more or less anything, its purpose is
+% just to delimit the argument to the \c.
+\def\argremovec#1\c#2\relax{\toks0 = {#1}}
+\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}}
+
+% \argremovec{,omment} might leave us with trailing spaces, though; e.g.,
+% @end itemize @c foo
+% will have two active spaces as part of the argument with the
+% `itemize'. Here we remove all active spaces from #1, and assign the
+% result to \toks0.
+%
+% This loses if there are any *other* active characters besides spaces
+% in the argument -- _ ^ +, for example -- since they get expanded.
+% Fortunately, Texinfo does not define any such commands. (If it ever
+% does, the catcode of the characters in questionwill have to be changed
+% here.) But this means we cannot call \removeactivespaces as part of
+% \argremovec{,omment}, since @c uses \parsearg, and thus the argument
+% that \parsearg gets might well have any character at all in it.
+%
+\def\removeactivespaces#1{%
+ \begingroup
+ \ignoreactivespaces
+ \edef\temp{#1}%
+ \global\toks0 = \expandafter{\temp}%
+ \endgroup
+}
+
+% Change the active space to expand to nothing.
+%
+\begingroup
+ \obeyspaces
+ \gdef\ignoreactivespaces{\obeyspaces\let =\empty}
+\endgroup
+
+
+\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
+
+%% These are used to keep @begin/@end levels from running away
+%% Call \inENV within environments (after a \begingroup)
+\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
+\def\ENVcheck{%
+\ifENV\errmessage{Still within an environment. Type Return to continue.}
+\endgroup\fi} % This is not perfect, but it should reduce lossage
+
+% @begin foo is the same as @foo, for now.
+\newhelp\EMsimple{Type <Return> to continue.}
+
+\outer\def\begin{\parsearg\beginxxx}
+
+\def\beginxxx #1{%
+\expandafter\ifx\csname #1\endcsname\relax
+{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
+\csname #1\endcsname\fi}
+
+% @end foo executes the definition of \Efoo.
+%
+\def\end{\parsearg\endxxx}
+\def\endxxx #1{%
+ \removeactivespaces{#1}%
+ \edef\endthing{\the\toks0}%
+ %
+ \expandafter\ifx\csname E\endthing\endcsname\relax
+ \expandafter\ifx\csname \endthing\endcsname\relax
+ % There's no \foo, i.e., no ``environment'' foo.
+ \errhelp = \EMsimple
+ \errmessage{Undefined command `@end \endthing'}%
+ \else
+ \unmatchedenderror\endthing
+ \fi
+ \else
+ % Everything's ok; the right environment has been started.
+ \csname E\endthing\endcsname
+ \fi
+}
+
+% There is an environment #1, but it hasn't been started. Give an error.
+%
+\def\unmatchedenderror#1{%
+ \errhelp = \EMsimple
+ \errmessage{This `@end #1' doesn't have a matching `@#1'}%
+}
+
+% Define the control sequence \E#1 to give an unmatched @end error.
+%
+\def\defineunmatchedend#1{%
+ \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}%
+}
+
+
+% Single-spacing is done by various environments (specifically, in
+% \nonfillstart and \quotations).
+\newskip\singlespaceskip \singlespaceskip = 12.5pt
+\def\singlespace{%
+ % Why was this kern here? It messes up equalizing space above and below
+ % environments. --karl, 6may93
+ %{\advance \baselineskip by -\singlespaceskip
+ %\kern \baselineskip}%
+ \setleading \singlespaceskip
+}
+
+%% Simple single-character @ commands
+
+% @@ prints an @
+% Kludge this until the fonts are right (grr).
+\def\@{{\tt\char64}}
+
+% This is turned off because it was never documented
+% and you can use @w{...} around a quote to suppress ligatures.
+%% Define @` and @' to be the same as ` and '
+%% but suppressing ligatures.
+%\def\`{{`}}
+%\def\'{{'}}
+
+% Used to generate quoted braces.
+\def\mylbrace {{\tt\char123}}
+\def\myrbrace {{\tt\char125}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+ % Definitions to produce actual \{ & \} command in an index.
+ \catcode`\{ = 12 \catcode`\} = 12
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\@ = 0 \catcode`\\ = 12
+ @gdef@lbracecmd[\{]%
+ @gdef@rbracecmd[\}]%
+@endgroup
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
+\let\, = \c
+\let\dotaccent = \.
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \t
+\let\ubaraccent = \b
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown
+% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+ \def\temp{#1}%
+ \ifx\temp\imacro \ptexi
+ \else\ifx\temp\jmacro \j
+ \else \errmessage{@dotless can be used only with i or j}%
+ \fi\fi
+}
+
+% Be sure we're in horizontal mode when doing a tie, since we make space
+% equivalent to this in @example-like environments. Otherwise, a space
+% at the beginning of a line will start with \penalty -- and
+% since \penalty is valid in vertical mode, we'd end up putting the
+% penalty on the vertical list instead of in the new paragraph.
+{\catcode`@ = 11
+ % Avoid using \@M directly, because that causes trouble
+ % if the definition is written into an index file.
+ \global\let\tiepenalty = \@M
+ \gdef\tie{\leavevmode\penalty\tiepenalty\ }
+}
+
+% @: forces normal size whitespace following.
+\def\:{\spacefactor=1000 }
+
+% @* forces a line break.
+\def\*{\hfil\break\hbox{}\ignorespaces}
+
+% @. is an end-of-sentence period.
+\def\.{.\spacefactor=3000 }
+
+% @! is an end-of-sentence bang.
+\def\!{!\spacefactor=3000 }
+
+% @? is an end-of-sentence query.
+\def\?{?\spacefactor=3000 }
+
+% @w prevents a word break. Without the \leavevmode, @w at the
+% beginning of a paragraph, when TeX is still in vertical mode, would
+% produce a whole line of output instead of starting the paragraph.
+\def\w#1{\leavevmode\hbox{#1}}
+
+% @group ... @end group forces ... to be all on one page, by enclosing
+% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
+% to keep its height that of a normal line. According to the rules for
+% \topskip (p.114 of the TeXbook), the glue inserted is
+% max (\topskip - \ht (first item), 0). If that height is large,
+% therefore, no glue is inserted, and the space between the headline and
+% the text is small, which looks bad.
+%
+\def\group{\begingroup
+ \ifnum\catcode13=\active \else
+ \errhelp = \groupinvalidhelp
+ \errmessage{@group invalid in context where filling is enabled}%
+ \fi
+ %
+ % The \vtop we start below produces a box with normal height and large
+ % depth; thus, TeX puts \baselineskip glue before it, and (when the
+ % next line of text is done) \lineskip glue after it. (See p.82 of
+ % the TeXbook.) Thus, space below is not quite equal to space
+ % above. But it's pretty close.
+ \def\Egroup{%
+ \egroup % End the \vtop.
+ \endgroup % End the \group.
+ }%
+ %
+ \vtop\bgroup
+ % We have to put a strut on the last line in case the @group is in
+ % the midst of an example, rather than completely enclosing it.
+ % Otherwise, the interline space between the last line of the group
+ % and the first line afterwards is too small. But we can't put the
+ % strut in \Egroup, since there it would be on a line by itself.
+ % Hence this just inserts a strut at the beginning of each line.
+ \everypar = {\strut}%
+ %
+ % Since we have a strut on every line, we don't need any of TeX's
+ % normal interline spacing.
+ \offinterlineskip
+ %
+ % OK, but now we have to do something about blank
+ % lines in the input in @example-like environments, which normally
+ % just turn into \lisppar, which will insert no space now that we've
+ % turned off the interline space. Simplest is to make them be an
+ % empty paragraph.
+ \ifx\par\lisppar
+ \edef\par{\leavevmode \par}%
+ %
+ % Reset ^^M's definition to new definition of \par.
+ \obeylines
+ \fi
+ %
+ % Do @comment since we are called inside an environment such as
+ % @example, where each end-of-line in the input causes an
+ % end-of-line in the output. We don't want the end-of-line after
+ % the `@group' to put extra space in the output. Since @group
+ % should appear on a line by itself (according to the Texinfo
+ % manual), we don't worry about eating any user text.
+ \comment
+}
+%
+% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
+% message, so this ends up printing `@group can only ...'.
+%
+\newhelp\groupinvalidhelp{%
+group can only be used in environments such as @example,^^J%
+where each line of input produces a line of output.}
+
+% @need space-in-mils
+% forces a page break if there is not space-in-mils remaining.
+
+\newdimen\mil \mil=0.001in
+
+\def\need{\parsearg\needx}
+
+% Old definition--didn't work.
+%\def\needx #1{\par %
+%% This method tries to make TeX break the page naturally
+%% if the depth of the box does not fit.
+%{\baselineskip=0pt%
+%\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000
+%\prevdepth=-1000pt
+%}}
+
+\def\needx#1{%
+ % Go into vertical mode, so we don't make a big box in the middle of a
+ % paragraph.
+ \par
+ %
+ % Don't add any leading before our big empty box, but allow a page
+ % break, since the best break might be right here.
+ \allowbreak
+ \nointerlineskip
+ \vtop to #1\mil{\vfil}%
+ %
+ % TeX does not even consider page breaks if a penalty added to the
+ % main vertical list is 10000 or more. But in order to see if the
+ % empty box we just added fits on the page, we must make it consider
+ % page breaks. On the other hand, we don't want to actually break the
+ % page after the empty box. So we use a penalty of 9999.
+ %
+ % There is an extremely small chance that TeX will actually break the
+ % page at this \penalty, if there are no other feasible breakpoints in
+ % sight. (If the user is using lots of big @group commands, which
+ % almost-but-not-quite fill up a page, TeX will have a hard time doing
+ % good page breaking, for example.) However, I could not construct an
+ % example where a page broke at this \penalty; if it happens in a real
+ % document, then we can reconsider our strategy.
+ \penalty9999
+ %
+ % Back up by the size of the box, whether we did a page break or not.
+ \kern -#1\mil
+ %
+ % Do not allow a page break right after this kern.
+ \nobreak
+}
+
+% @br forces paragraph break
+
+\let\br = \par
+
+% @dots{} output an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in a typewriter
+% font as three actual period characters.
+%
+\def\dots{\hbox to 1.5em{%
+ \hskip 0pt plus 0.25fil minus 0.25fil
+ .\hss.\hss.%
+ \hskip 0pt plus 0.5fil minus 0.5fil
+}}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+ \hbox to 2em{%
+ \hskip 0pt plus 0.25fil minus 0.25fil
+ .\hss.\hss.\hss.%
+ \hskip 0pt plus 0.5fil minus 0.5fil
+ }%
+ \spacefactor=3000
+}
+
+
+% @page forces the start of a new page
+
+\def\page{\par\vfill\supereject}
+
+% @exdent text....
+% outputs text on separate line in roman font, starting at standard page margin
+
+% This records the amount of indent in the innermost environment.
+% That's how much \exdent should take out.
+\newskip\exdentamount
+
+% This defn is used inside fill environments such as @defun.
+\def\exdent{\parsearg\exdentyyy}
+\def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}}
+
+% This defn is used inside nofill environments such as @example.
+\def\nofillexdent{\parsearg\nofillexdentyyy}
+\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
+\leftline{\hskip\leftskip{\rm#1}}}}
+
+% @inmargin{TEXT} puts TEXT in the margin next to the current paragraph.
+
+\def\inmargin#1{%
+\strut\vadjust{\nobreak\kern-\strutdepth
+ \vtop to \strutdepth{\baselineskip\strutdepth\vss
+ \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}}
+\newskip\inmarginspacing \inmarginspacing=1cm
+\def\strutdepth{\dp\strutbox}
+
+%\hbox{{\rm#1}}\hfil\break}}
+
+% @include file insert text of that file as input.
+% Allow normal characters that we make active in the argument (a file name).
+\def\include{\begingroup
+ \catcode`\\=12
+ \catcode`~=12
+ \catcode`^=12
+ \catcode`_=12
+ \catcode`|=12
+ \catcode`<=12
+ \catcode`>=12
+ \catcode`+=12
+ \parsearg\includezzz}
+% Restore active chars for included file.
+\def\includezzz#1{\endgroup\begingroup
+ % Read the included file in a group so nested @include's work.
+ \def\thisfile{#1}%
+ \input\thisfile
+\endgroup}
+
+\def\thisfile{}
+
+% @center line outputs that line, centered
+
+\def\center{\parsearg\centerzzz}
+\def\centerzzz #1{{\advance\hsize by -\leftskip
+\advance\hsize by -\rightskip
+\centerline{#1}}}
+
+% @sp n outputs n lines of vertical space
+
+\def\sp{\parsearg\spxxx}
+\def\spxxx #1{\vskip #1\baselineskip}
+
+% @comment ...line which is ignored...
+% @c is the same as @comment
+% @ignore ... @end ignore is another way to write a comment
+
+\def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other%
+\parsearg \commentxxx}
+
+\def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 }
+
+\let\c=\comment
+
+% @paragraphindent is defined for the Info formatting commands only.
+\let\paragraphindent=\comment
+
+% Prevent errors for section commands.
+% Used in @ignore and in failing conditionals.
+\def\ignoresections{%
+\let\chapter=\relax
+\let\unnumbered=\relax
+\let\top=\relax
+\let\unnumberedsec=\relax
+\let\unnumberedsection=\relax
+\let\unnumberedsubsec=\relax
+\let\unnumberedsubsection=\relax
+\let\unnumberedsubsubsec=\relax
+\let\unnumberedsubsubsection=\relax
+\let\section=\relax
+\let\subsec=\relax
+\let\subsubsec=\relax
+\let\subsection=\relax
+\let\subsubsection=\relax
+\let\appendix=\relax
+\let\appendixsec=\relax
+\let\appendixsection=\relax
+\let\appendixsubsec=\relax
+\let\appendixsubsection=\relax
+\let\appendixsubsubsec=\relax
+\let\appendixsubsubsection=\relax
+\let\contents=\relax
+\let\smallbook=\relax
+\let\titlepage=\relax
+}
+
+% Used in nested conditionals, where we have to parse the Texinfo source
+% and so want to turn off most commands, in case they are used
+% incorrectly.
+%
+\def\ignoremorecommands{%
+ \let\defcodeindex = \relax
+ \let\defcv = \relax
+ \let\deffn = \relax
+ \let\deffnx = \relax
+ \let\defindex = \relax
+ \let\defivar = \relax
+ \let\defmac = \relax
+ \let\defmethod = \relax
+ \let\defop = \relax
+ \let\defopt = \relax
+ \let\defspec = \relax
+ \let\deftp = \relax
+ \let\deftypefn = \relax
+ \let\deftypefun = \relax
+ \let\deftypevar = \relax
+ \let\deftypevr = \relax
+ \let\defun = \relax
+ \let\defvar = \relax
+ \let\defvr = \relax
+ \let\ref = \relax
+ \let\xref = \relax
+ \let\printindex = \relax
+ \let\pxref = \relax
+ \let\settitle = \relax
+ \let\setchapternewpage = \relax
+ \let\setchapterstyle = \relax
+ \let\everyheading = \relax
+ \let\evenheading = \relax
+ \let\oddheading = \relax
+ \let\everyfooting = \relax
+ \let\evenfooting = \relax
+ \let\oddfooting = \relax
+ \let\headings = \relax
+ \let\include = \relax
+ \let\lowersections = \relax
+ \let\down = \relax
+ \let\raisesections = \relax
+ \let\up = \relax
+ \let\set = \relax
+ \let\clear = \relax
+ \let\item = \relax
+}
+
+% Ignore @ignore ... @end ignore.
+%
+\def\ignore{\doignore{ignore}}
+
+% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
+%
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifhtml{\doignore{ifhtml}}
+\def\ifnottex{\doignore{ifnottex}}
+\def\html{\doignore{html}}
+\def\menu{\doignore{menu}}
+\def\direntry{\doignore{direntry}}
+
+% Also ignore @macro ... @end macro. The user must run texi2dvi,
+% which runs makeinfo to do macro expansion. Ignore @unmacro, too.
+\def\macro{\doignore{macro}}
+\def\macrocsname{macro}
+\let\unmacro = \comment
+
+
+% @dircategory CATEGORY -- specify a category of the dir file
+% which this file should belong to. Ignore this in TeX.
+\let\dircategory = \comment
+
+% Ignore text until a line `@end #1'.
+%
+\def\doignore#1{\begingroup
+ % Don't complain about control sequences we have declared \outer.
+ \ignoresections
+ %
+ % Define a command to swallow text until we reach `@end #1'.
+ % This @ is a catcode 12 token (that is the normal catcode of @ in
+ % this texinfo.tex file). We change the catcode of @ below to match.
+ \long\def\doignoretext##1@end #1{\enddoignore}%
+ %
+ % Make sure that spaces turn into tokens that match what \doignoretext wants.
+ \catcode32 = 10
+ %
+ % Ignore braces, too, so mismatched braces don't cause trouble.
+ \catcode`\{ = 9
+ \catcode`\} = 9
+ %
+ % We must not have @c interpreted as a control sequence.
+ \catcode`\@ = 12
+ %
+ % Make the letter c a comment character so that the rest of the line
+ % will be ignored. This way, the document can have (for example)
+ % @c @end ifinfo
+ % and the @end ifinfo will be properly ignored.
+ % (We've just changed @ to catcode 12.)
+ %
+ % But we can't do this if #1 is `macro', since that actually contains a c.
+ % Happily, none of the other conditionals have the letter `c' in their names!
+ \def\temp{#1}%
+ \ifx\temp\macrocsname \else
+ \catcode`\c = 14
+ \fi
+ %
+ % And now expand that command.
+ \doignoretext
+}
+
+% What we do to finish off ignored text.
+%
+\def\enddoignore{\endgroup\ignorespaces}%
+
+\newif\ifwarnedobs\warnedobsfalse
+\def\obstexwarn{%
+ \ifwarnedobs\relax\else
+ % We need to warn folks that they may have trouble with TeX 3.0.
+ % This uses \immediate\write16 rather than \message to get newlines.
+ \immediate\write16{}
+ \immediate\write16{***WARNING*** for users of Unix TeX 3.0!}
+ \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
+ \immediate\write16{If you are running another version of TeX, relax.}
+ \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
+ \immediate\write16{ Then upgrade your TeX installation if you can.}
+ \immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)}
+ \immediate\write16{If you are stuck with version 3.0, run the}
+ \immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
+ \immediate\write16{ to use a workaround.}
+ \immediate\write16{}
+ \global\warnedobstrue
+ \fi
+}
+
+% **In TeX 3.0, setting text in \nullfont hangs tex. For a
+% workaround (which requires the file ``dummy.tfm'' to be installed),
+% uncomment the following line:
+%%%%%\font\nullfont=dummy\let\obstexwarn=\relax
+
+% Ignore text, except that we keep track of conditional commands for
+% purposes of nesting, up to an `@end #1' command.
+%
+\def\nestedignore#1{%
+ \obstexwarn
+ % We must actually expand the ignored text to look for the @end
+ % command, so that nested ignore constructs work. Thus, we put the
+ % text into a \vbox and then do nothing with the result. To minimize
+ % the change of memory overflow, we follow the approach outlined on
+ % page 401 of the TeXbook: make the current font be a dummy font.
+ %
+ \setbox0 = \vbox\bgroup
+ % Don't complain about control sequences we have declared \outer.
+ \ignoresections
+ %
+ % Define `@end #1' to end the box, which will in turn undefine the
+ % @end command again.
+ \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
+ %
+ % We are going to be parsing Texinfo commands. Most cause no
+ % trouble when they are used incorrectly, but some commands do
+ % complicated argument parsing or otherwise get confused, so we
+ % undefine them.
+ %
+ % We can't do anything about stray @-signs, unfortunately;
+ % they'll produce `undefined control sequence' errors.
+ \ignoremorecommands
+ %
+ % Set the current font to be \nullfont, a TeX primitive, and define
+ % all the font commands to also use \nullfont. We don't use
+ % dummy.tfm, as suggested in the TeXbook, because not all sites
+ % might have that installed. Therefore, math mode will still
+ % produce output, but that should be an extremely small amount of
+ % stuff compared to the main input.
+ %
+ \nullfont
+ \let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont
+ \let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont
+ \let\tensf = \nullfont
+ % Similarly for index fonts (mostly for their use in
+ % smallexample)
+ \let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont
+ \let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont
+ \let\indsf = \nullfont
+ %
+ % Don't complain when characters are missing from the fonts.
+ \tracinglostchars = 0
+ %
+ % Don't bother to do space factor calculations.
+ \frenchspacing
+ %
+ % Don't report underfull hboxes.
+ \hbadness = 10000
+ %
+ % Do minimal line-breaking.
+ \pretolerance = 10000
+ %
+ % Do not execute instructions in @tex
+ \def\tex{\doignore{tex}}%
+}
+
+% @set VAR sets the variable VAR to an empty value.
+% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
+%
+% Since we want to separate VAR from REST-OF-LINE (which might be
+% empty), we can't just use \parsearg; we have to insert a space of our
+% own to delimit the rest of the line, and then take it out again if we
+% didn't need it. Make sure the catcode of space is correct to avoid
+% losing inside @example, for instance.
+%
+\def\set{\begingroup\catcode` =10
+ \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
+ \parsearg\setxxx}
+\def\setxxx#1{\setyyy#1 \endsetyyy}
+\def\setyyy#1 #2\endsetyyy{%
+ \def\temp{#2}%
+ \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
+ \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
+ \fi
+ \endgroup
+}
+% Can't use \xdef to pre-expand #2 and save some time, since \temp or
+% \next or other control sequences that we've defined might get us into
+% an infinite loop. Consider `@set foo @cite{bar}'.
+\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
+
+% @clear VAR clears (i.e., unsets) the variable VAR.
+%
+\def\clear{\parsearg\clearxxx}
+\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
+
+% @value{foo} gets the text saved in variable foo.
+%
+\def\value{\begingroup
+ \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
+ \valuexxx}
+\def\valuexxx#1{\expandablevalue{#1}\endgroup}
+
+% We have this subroutine so that we can handle at least some @value's
+% properly in indexes (we \let\value to this in \indexdummies). Ones
+% whose names contain - or _ still won't work, but we can't do anything
+% about that. The command has to be fully expandable, since the result
+% winds up in the index file. This means that if the variable's value
+% contains other Texinfo commands, it's almost certain it will fail
+% (although perhaps we could fix that with sufficient work to do a
+% one-level expansion on the result, instead of complete).
+%
+\def\expandablevalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ {[No value for ``#1'']v}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
+% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
+% with @set.
+%
+\def\ifset{\parsearg\ifsetxxx}
+\def\ifsetxxx #1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ \expandafter\ifsetfail
+ \else
+ \expandafter\ifsetsucceed
+ \fi
+}
+\def\ifsetsucceed{\conditionalsucceed{ifset}}
+\def\ifsetfail{\nestedignore{ifset}}
+\defineunmatchedend{ifset}
+
+% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% defined with @set, or has been undefined with @clear.
+%
+\def\ifclear{\parsearg\ifclearxxx}
+\def\ifclearxxx #1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ \expandafter\ifclearsucceed
+ \else
+ \expandafter\ifclearfail
+ \fi
+}
+\def\ifclearsucceed{\conditionalsucceed{ifclear}}
+\def\ifclearfail{\nestedignore{ifclear}}
+\defineunmatchedend{ifclear}
+
+% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
+% following, through the first @end iftex (etc.). Make `@end iftex'
+% (etc.) valid only after an @iftex.
+%
+\def\iftex{\conditionalsucceed{iftex}}
+\def\ifnothtml{\conditionalsucceed{ifnothtml}}
+\def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
+\defineunmatchedend{iftex}
+\defineunmatchedend{ifnothtml}
+\defineunmatchedend{ifnotinfo}
+
+% We can't just want to start a group at @iftex (for example) and end it
+% at @end iftex, since then @set commands inside the conditional have no
+% effect (they'd get reverted at the end of the group). So we must
+% define \Eiftex to redefine itself to be its previous value. (We can't
+% just define it to fail again with an ``unmatched end'' error, since
+% the @ifset might be nested.)
+%
+\def\conditionalsucceed#1{%
+ \edef\temp{%
+ % Remember the current value of \E#1.
+ \let\nece{prevE#1} = \nece{E#1}%
+ %
+ % At the `@end #1', redefine \E#1 to be its previous value.
+ \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%
+ }%
+ \temp
+}
+
+% We need to expand lots of \csname's, but we don't want to expand the
+% control sequences after we've constructed them.
+%
+\def\nece#1{\expandafter\noexpand\csname#1\endcsname}
+
+% @asis just yields its argument. Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math means output in math mode.
+% We don't use $'s directly in the definition of \math because control
+% sequences like \math are expanded when the toc file is written. Then,
+% we read the toc file back, the $'s will be normal characters (as they
+% should be, according to the definition of Texinfo). So we must use a
+% control sequence to switch into and out of math mode.
+%
+% This isn't quite enough for @math to work properly in indices, but it
+% seems unlikely it will ever be needed there.
+%
+\let\implicitmath = $
+\def\math#1{\implicitmath #1\implicitmath}
+
+% @bullet and @minus need the same treatment as @math, just above.
+\def\bullet{\implicitmath\ptexbullet\implicitmath}
+\def\minus{\implicitmath-\implicitmath}
+
+\def\node{\ENVcheck\parsearg\nodezzz}
+\def\nodezzz#1{\nodexxx [#1,]}
+\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
+\let\nwnode=\node
+\let\lastnode=\relax
+
+\def\donoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\setref{\lastnode}\fi
+\global\let\lastnode=\relax}
+
+\def\unnumbnoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
+\global\let\lastnode=\relax}
+
+\def\appendixnoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
+\global\let\lastnode=\relax}
+
+% @refill is a no-op.
+\let\refill=\relax
+
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate (before @setfilename).
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% @setfilename is done at the beginning of every texinfo file.
+% So open here the files we need to have open while reading the input.
+% This makes it possible to make a .fmt file for texinfo.
+\def\setfilename{%
+ \iflinks
+ \readauxfile
+ \opencontents
+ \fi % \openindices needs to do some work in any case.
+ \openindices
+ \fixbackslash % Turn off hack to swallow `\input texinfo'.
+ \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
+ %
+ % If texinfo.cnf is present on the system, read it.
+ % Useful for site-wide @afourpaper, etc.
+ % Just to be on the safe side, close the input stream before the \input.
+ \openin 1 texinfo.cnf
+ \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi
+ \closein1
+ \temp
+ %
+ \comment % Ignore the actual filename.
+}
+
+% @bye.
+\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+
+% \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx}
+% \def\macroxxx#1#2 \end macro{%
+% \expandafter\gdef\macrotemp#1{#2}%
+% \endgroup}
+
+%\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx}
+%\def\linemacroxxx#1#2 \end linemacro{%
+%\let\parsearg=\relax
+%\edef\macrotempx{\csname M\butfirst\expandafter\string\macrotemp\endcsname}%
+%\expandafter\xdef\macrotemp{\parsearg\macrotempx}%
+%\expandafter\gdef\macrotempx#1{#2}%
+%\endgroup}
+
+%\def\butfirst#1{}
+
+
+\message{fonts,}
+
+% Font-change commands.
+
+% Texinfo supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf analogous to plain's \rm, etc.
+\newfam\sffam
+\def\sf{\fam=\sffam \tensf}
+\let\li = \sf % Sometimes we call it \li, not \sf.
+
+% We don't need math for this one.
+\def\ttsl{\tenttsl}
+
+% Use Computer Modern fonts at \magstephalf (11pt).
+\newcount\mainmagstep
+\mainmagstep=\magstephalf
+
+% Set the font macro #1 to the font named #2, adding on the
+% specified font prefix (normally `cm').
+% #3 is the font's design size, #4 is a scale factor
+\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
+
+% Use cm as the default font prefix.
+% To specify the font prefix, you must define \fontprefix
+% before you read in texinfo.tex.
+\ifx\fontprefix\undefined
+\def\fontprefix{cm}
+\fi
+% Support font families that don't use the same naming scheme as CM.
+\def\rmshape{r}
+\def\rmbshape{bx} %where the normal face is bold
+\def\bfshape{b}
+\def\bxshape{bx}
+\def\ttshape{tt}
+\def\ttbshape{tt}
+\def\ttslshape{sltt}
+\def\itshape{ti}
+\def\itbshape{bxti}
+\def\slshape{sl}
+\def\slbshape{bxsl}
+\def\sfshape{ss}
+\def\sfbshape{ss}
+\def\scshape{csc}
+\def\scbshape{csc}
+
+\ifx\bigger\relax
+\let\mainmagstep=\magstep1
+\setfont\textrm\rmshape{12}{1000}
+\setfont\texttt\ttshape{12}{1000}
+\else
+\setfont\textrm\rmshape{10}{\mainmagstep}
+\setfont\texttt\ttshape{10}{\mainmagstep}
+\fi
+% Instead of cmb10, you many want to use cmbx10.
+% cmbx10 is a prettier font on its own, but cmb10
+% looks better when embedded in a line with cmr10.
+\setfont\textbf\bfshape{10}{\mainmagstep}
+\setfont\textit\itshape{10}{\mainmagstep}
+\setfont\textsl\slshape{10}{\mainmagstep}
+\setfont\textsf\sfshape{10}{\mainmagstep}
+\setfont\textsc\scshape{10}{\mainmagstep}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+
+% A few fonts for @defun, etc.
+\setfont\defbf\bxshape{10}{\magstep1} %was 1314
+\setfont\deftt\ttshape{10}{\magstep1}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
+
+% Fonts for indices and small examples (9pt).
+% We actually use the slanted font rather than the italic,
+% because texinfo normally uses the slanted fonts for that.
+% Do not make many font distinctions in general in the index, since they
+% aren't very useful.
+\setfont\ninett\ttshape{9}{1000}
+\setfont\indrm\rmshape{9}{1000}
+\setfont\indit\slshape{9}{1000}
+\let\indsl=\indit
+\let\indtt=\ninett
+\let\indttsl=\ninett
+\let\indsf=\indrm
+\let\indbf=\indrm
+\setfont\indsc\scshape{10}{900}
+\font\indi=cmmi9
+\font\indsy=cmsy9
+
+% Fonts for title page:
+\setfont\titlerm\rmbshape{12}{\magstep3}
+\setfont\titleit\itbshape{10}{\magstep4}
+\setfont\titlesl\slbshape{10}{\magstep4}
+\setfont\titlett\ttbshape{12}{\magstep3}
+\setfont\titlettsl\ttslshape{10}{\magstep4}
+\setfont\titlesf\sfbshape{17}{\magstep1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\authorrm{\secrm}
+
+% Chapter (and unnumbered) fonts (17.28pt).
+\setfont\chaprm\rmbshape{12}{\magstep2}
+\setfont\chapit\itbshape{10}{\magstep3}
+\setfont\chapsl\slbshape{10}{\magstep3}
+\setfont\chaptt\ttbshape{12}{\magstep2}
+\setfont\chapttsl\ttslshape{10}{\magstep3}
+\setfont\chapsf\sfbshape{17}{1000}
+\let\chapbf=\chaprm
+\setfont\chapsc\scbshape{10}{\magstep3}
+\font\chapi=cmmi12 scaled \magstep2
+\font\chapsy=cmsy10 scaled \magstep3
+
+% Section fonts (14.4pt).
+\setfont\secrm\rmbshape{12}{\magstep1}
+\setfont\secit\itbshape{10}{\magstep2}
+\setfont\secsl\slbshape{10}{\magstep2}
+\setfont\sectt\ttbshape{12}{\magstep1}
+\setfont\secttsl\ttslshape{10}{\magstep2}
+\setfont\secsf\sfbshape{12}{\magstep1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep2}
+\font\seci=cmmi12 scaled \magstep1
+\font\secsy=cmsy10 scaled \magstep2
+
+% \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.
+% \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.
+% \setfont\ssecsl\slshape{10}{\magstep1}
+% \setfont\ssectt\ttshape{10}{\magstep1}
+% \setfont\ssecsf\sfshape{10}{\magstep1}
+
+%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
+%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
+%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
+%\setfont\ssectt\ttshape{10}{1315}
+%\setfont\ssecsf\sfshape{10}{1315}
+
+%\let\ssecbf=\ssecrm
+
+% Subsection fonts (13.15pt).
+\setfont\ssecrm\rmbshape{12}{\magstephalf}
+\setfont\ssecit\itbshape{10}{1315}
+\setfont\ssecsl\slbshape{10}{1315}
+\setfont\ssectt\ttbshape{12}{\magstephalf}
+\setfont\ssecttsl\ttslshape{10}{1315}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{\magstep1}
+\font\sseci=cmmi12 scaled \magstephalf
+\font\ssecsy=cmsy10 scaled 1315
+% The smallcaps and symbol fonts should actually be scaled \magstep1.5,
+% but that is not a standard magnification.
+
+% In order for the font changes to affect most math symbols and letters,
+% we have to define the \textfont of the standard families. Since
+% texinfo doesn't allow for producing subscripts and superscripts, we
+% don't bother to reset \scriptfont and \scriptscriptfont (which would
+% also require loading a lot more fonts).
+%
+\def\resetmathfonts{%
+ \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
+ \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
+ \textfont\ttfam = \tentt \textfont\sffam = \tensf
+}
+
+
+% The font-changing commands redefine the meanings of \tenSTYLE, instead
+% of just \STYLE. We do this so that font changes will continue to work
+% in math mode, where it is the current \fam that is relevant in most
+% cases, not the current font. Plain TeX does \def\bf{\fam=\bffam
+% \tenbf}, for example. By redefining \tenbf, we obviate the need to
+% redefine \bf itself.
+\def\textfonts{%
+ \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
+ \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
+ \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
+ \resetmathfonts}
+\def\titlefonts{%
+ \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
+ \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
+ \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
+ \let\tenttsl=\titlettsl
+ \resetmathfonts \setleading{25pt}}
+\def\titlefont#1{{\titlefonts\rm #1}}
+\def\chapfonts{%
+ \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
+ \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
+ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
+ \resetmathfonts \setleading{19pt}}
+\def\secfonts{%
+ \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
+ \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
+ \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl
+ \resetmathfonts \setleading{16pt}}
+\def\subsecfonts{%
+ \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
+ \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
+ \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
+ \resetmathfonts \setleading{15pt}}
+\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
+\def\indexfonts{%
+ \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
+ \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
+ \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
+ \resetmathfonts \setleading{12pt}}
+
+% Set up the default fonts, so we can use them for creating boxes.
+%
+\textfonts
+
+% Define these so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
+% Count depth in font-changes, for error checks
+\newcount\fontdepth \fontdepth=0
+
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}
+\setfont\shortcontbf\bxshape{12}{1000}
+\setfont\shortcontsl\slshape{12}{1000}
+
+%% Add scribe-like font environments, plus @l for inline lisp (usually sans
+%% serif) and @ii for TeX italic
+
+% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
+% unless the following character is such as not to need one.
+\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
+\def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx}
+
+\let\i=\smartitalic
+\let\var=\smartitalic
+\let\dfn=\smartitalic
+\let\emph=\smartitalic
+\let\cite=\smartitalic
+
+\def\b#1{{\bf #1}}
+\let\strong=\b
+
+% We can't just use \exhyphenpenalty, because that only has effect at
+% the end of a paragraph. Restore normal hyphenation at the end of the
+% group within which \nohyphenation is presumably called.
+%
+\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
+\def\restorehyphenation{\hyphenchar\font = `- }
+
+\def\t#1{%
+ {\tt \rawbackslash \frenchspacing #1}%
+ \null
+}
+\let\ttfont=\t
+\def\samp#1{`\tclose{#1}'\null}
+\setfont\smallrm\rmshape{8}{1000}
+\font\smallsy=cmsy9
+\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
+ \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+ \vbox{\hrule\kern-0.4pt
+ \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+ \kern-0.4pt\hrule}%
+ \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+% The old definition, with no lozenge:
+%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+\let\file=\samp
+
+% @code is a modification of @t,
+% which makes spaces the same size as normal in the surrounding text.
+\def\tclose#1{%
+ {%
+ % Change normal interword space to be same as for the current font.
+ \spaceskip = \fontdimen2\font
+ %
+ % Switch to typewriter.
+ \tt
+ %
+ % But `\ ' produces the large typewriter interword space.
+ \def\ {{\spaceskip = 0pt{} }}%
+ %
+ % Turn off hyphenation.
+ \nohyphenation
+ %
+ \rawbackslash
+ \frenchspacing
+ #1%
+ }%
+ \null
+}
+
+% We *must* turn on hyphenation at `-' and `_' in \code.
+% Otherwise, it is too hard to avoid overfull hboxes
+% in the Emacs manual, the Library manual, etc.
+
+% Unfortunately, TeX uses one parameter (\hyphenchar) to control
+% both hyphenation at - and hyphenation within words.
+% We must therefore turn them both off (\tclose does that)
+% and arrange explicitly to hyphenate at a dash.
+% -- rms.
+{
+\catcode`\-=\active
+\catcode`\_=\active
+\catcode`\|=\active
+\global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex}
+% The following is used by \doprintindex to insure that long function names
+% wrap around. It is necessary for - and _ to be active before the index is
+% read from the file, as \entry parses the arguments long before \code is
+% ever called. -- mycroft
+% _ is always active; and it shouldn't be \let = to an _ that is a
+% subscript character anyway. Then, @cindex @samp{_} (for example)
+% fails. --karl
+\global\def\indexbreaks{%
+ \catcode`\-=\active \let-\realdash
+}
+}
+
+\def\realdash{-}
+\def\codedash{-\discretionary{}{}{}}
+\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
+\def\codex #1{\tclose{#1}\endgroup}
+
+%\let\exp=\tclose %Was temporary
+
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+
+% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
+% `example' (@kbd uses ttsl only inside of @example and friends),
+% or `code' (@kbd uses normal tty font always).
+\def\kbdinputstyle{\parsearg\kbdinputstylexxx}
+\def\kbdinputstylexxx#1{%
+ \def\arg{#1}%
+ \ifx\arg\worddistinct
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+ \else\ifx\arg\wordexample
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+ \else\ifx\arg\wordcode
+ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+ \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% Default is kbdinputdistinct. (Too much of a hassle to call the macro,
+% the catcodes are wrong for parsearg to work.)
+\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}
+
+\def\xkey{\key}
+\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
+\ifx\one\xkey\ifx\threex\three \key{#2}%
+\else{\tclose{\kbdfont\look}}\fi
+\else{\tclose{\kbdfont\look}}\fi}
+
+% @url. Quotes do not seem necessary, so use \code.
+\let\url=\code
+
+% @uref (abbreviation for `urlref') takes an optional second argument
+% specifying the text to display. First (mandatory) arg is the url.
+% Perhaps eventually put in a hypertex \special here.
+%
+\def\uref#1{\urefxxx #1,,\finish}
+\def\urefxxx#1,#2,#3\finish{%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \unhbox0\ (\code{#1})%
+ \else
+ \code{#1}%
+ \fi
+}
+
+% rms does not like the angle brackets --karl, 17may97.
+% So now @email is just like @uref.
+%\def\email#1{\angleleft{\tt #1}\angleright}
+\let\email=\uref
+
+% Check if we are currently using a typewriter font. Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
+% argument is to make the input look right: @dmn{pt} instead of
+% @dmn{}pt.
+%
+\def\dmn#1{\thinspace #1}
+
+\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
+
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find. We need it for
+% Polish suppressed-l. --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
+
+\def\r#1{{\rm #1}} % roman font
+% Use of \lowercase was suggested.
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @pounds{} is a sterling sign.
+\def\pounds{{\it\$}}
+
+
+\message{page headings,}
+
+\newskip\titlepagetopglue \titlepagetopglue = 1.5in
+\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
+
+% First the title page. Must do @settitle before @titlepage.
+\newif\ifseenauthor
+\newif\iffinishedtitlepage
+
+\def\shorttitlepage{\parsearg\shorttitlepagezzz}
+\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}
+
+\def\titlepage{\begingroup \parindent=0pt \textfonts
+ \let\subtitlerm=\tenrm
+% I deinstalled the following change because \cmr12 is undefined.
+% This change was not in the ChangeLog anyway. --rms.
+% \let\subtitlerm=\cmr12
+ \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
+ %
+ \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
+ %
+ % Leave some space at the very top of the page.
+ \vglue\titlepagetopglue
+ %
+ % Now you can print the title using @title.
+ \def\title{\parsearg\titlezzz}%
+ \def\titlezzz##1{\leftline{\titlefonts\rm ##1}
+ % print a rule at the page bottom also.
+ \finishedtitlepagefalse
+ \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
+ % No rule at page bottom unless we print one at the top with @title.
+ \finishedtitlepagetrue
+ %
+ % Now you can put text using @subtitle.
+ \def\subtitle{\parsearg\subtitlezzz}%
+ \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}%
+ %
+ % @author should come last, but may come many times.
+ \def\author{\parsearg\authorzzz}%
+ \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi
+ {\authorfont \leftline{##1}}}%
+ %
+ % Most title ``pages'' are actually two pages long, with space
+ % at the top of the second. We don't want the ragged left on the second.
+ \let\oldpage = \page
+ \def\page{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ \oldpage
+ \let\page = \oldpage
+ \hbox{}}%
+% \def\page{\oldpage \hbox{}}
+}
+
+\def\Etitlepage{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ % It is important to do the page break before ending the group,
+ % because the headline and footline are only empty inside the group.
+ % If we use the new definition of \page, we always get a blank page
+ % after the title page, which we certainly don't want.
+ \oldpage
+ \endgroup
+ \HEADINGSon
+}
+
+\def\finishtitlepage{%
+ \vskip4pt \hrule height 2pt width \hsize
+ \vskip\titlepagebottomglue
+ \finishedtitlepagetrue
+}
+
+%%% Set up page headings and footings.
+
+\let\thispage=\folio
+
+\newtoks \evenheadline % Token sequence for heading line of even pages
+\newtoks \oddheadline % Token sequence for heading line of odd pages
+\newtoks \evenfootline % Token sequence for footing line of even pages
+\newtoks \oddfootline % Token sequence for footing line of odd pages
+
+% Now make Tex use those variables
+\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
+ \else \the\evenheadline \fi}}
+\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
+ \else \the\evenfootline \fi}\HEADINGShook}
+\let\HEADINGShook=\relax
+
+% Commands to set those variables.
+% For example, this is what @headings on does
+% @evenheading @thistitle|@thispage|@thischapter
+% @oddheading @thischapter|@thispage|@thistitle
+% @evenfooting @thisfile||
+% @oddfooting ||@thisfile
+
+\def\evenheading{\parsearg\evenheadingxxx}
+\def\oddheading{\parsearg\oddheadingxxx}
+\def\everyheading{\parsearg\everyheadingxxx}
+
+\def\evenfooting{\parsearg\evenfootingxxx}
+\def\oddfooting{\parsearg\oddfootingxxx}
+\def\everyfooting{\parsearg\everyfootingxxx}
+
+{\catcode`\@=0 %
+
+\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
+\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
+\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
+
+\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
+\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
+\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
+ \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
+ %
+ % Leave some space for the footline. Hopefully ok to assume
+ % @evenfooting will not be used by itself.
+ \global\advance\pageheight by -\baselineskip
+ \global\advance\vsize by -\baselineskip
+}
+
+\gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}}
+%
+}% unbind the catcode of @.
+
+% @headings double turns headings on for double-sided printing.
+% @headings single turns headings on for single-sided printing.
+% @headings off turns them off.
+% @headings on same as @headings double, retained for compatibility.
+% @headings after turns on double-sided headings after this page.
+% @headings doubleafter turns on double-sided headings after this page.
+% @headings singleafter turns on single-sided headings after this page.
+% By default, they are off at the start of a document,
+% and turned `on' after @end titlepage.
+
+\def\headings #1 {\csname HEADINGS#1\endcsname}
+
+\def\HEADINGSoff{
+\global\evenheadline={\hfil} \global\evenfootline={\hfil}
+\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
+\HEADINGSoff
+% When we turn headings on, set the page number to 1.
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSdouble{
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+\let\contentsalignmacro = \chappager
+
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingle{
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+\def\HEADINGSon{\HEADINGSdouble}
+
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+\let\HEADINGSdoubleafter=\HEADINGSafter
+\def\HEADINGSdoublex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
+\def\HEADINGSsinglex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+
+% Subroutines used in generating headings
+% Produces Day Month Year style of output.
+\def\today{\number\day\space
+\ifcase\month\or
+January\or February\or March\or April\or May\or June\or
+July\or August\or September\or October\or November\or December\fi
+\space\number\year}
+
+% Use this if you want the Month Day, Year style of output.
+%\def\today{\ifcase\month\or
+%January\or February\or March\or April\or May\or June\or
+%July\or August\or September\or October\or November\or December\fi
+%\space\number\day, \number\year}
+
+% @settitle line... specifies the title of the document, for headings
+% It generates no output of its own
+
+\def\thistitle{No Title}
+\def\settitle{\parsearg\settitlezzz}
+\def\settitlezzz #1{\gdef\thistitle{#1}}
+
+
+\message{tables,}
+% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
+
+% default indentation of table text
+\newdimen\tableindent \tableindent=.8in
+% default indentation of @itemize and @enumerate text
+\newdimen\itemindent \itemindent=.3in
+% margin between end of table item and start of table text.
+\newdimen\itemmargin \itemmargin=.1in
+
+% used internally for \itemindent minus \itemmargin
+\newdimen\itemmax
+
+% Note @table, @vtable, and @vtable define @item, @itemx, etc., with
+% these defs.
+% They also define \itemindex
+% to index the item name in whatever manner is desired (perhaps none).
+
+\newif\ifitemxneedsnegativevskip
+
+\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
+
+\def\internalBitem{\smallbreak \parsearg\itemzzz}
+\def\internalBitemx{\itemxpar \parsearg\itemzzz}
+
+\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
+\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz}
+
+\def\internalBkitem{\smallbreak \parsearg\kitemzzz}
+\def\internalBkitemx{\itemxpar \parsearg\kitemzzz}
+
+\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}%
+ \itemzzz {#1}}
+
+\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}%
+ \itemzzz {#1}}
+
+\def\itemzzz #1{\begingroup %
+ \advance\hsize by -\rightskip
+ \advance\hsize by -\tableindent
+ \setbox0=\hbox{\itemfont{#1}}%
+ \itemindex{#1}%
+ \nobreak % This prevents a break before @itemx.
+ %
+ % Be sure we are not still in the middle of a paragraph.
+ %{\parskip = 0in
+ %\par
+ %}%
+ %
+ % If the item text does not fit in the space we have, put it on a line
+ % by itself, and do not allow a page break either before or after that
+ % line. We do not start a paragraph here because then if the next
+ % command is, e.g., @kindex, the whatsit would get put into the
+ % horizontal list on a line by itself, resulting in extra blank space.
+ \ifdim \wd0>\itemmax
+ %
+ % Make this a paragraph so we get the \parskip glue and wrapping,
+ % but leave it ragged-right.
+ \begingroup
+ \advance\leftskip by-\tableindent
+ \advance\hsize by\tableindent
+ \advance\rightskip by0pt plus1fil
+ \leavevmode\unhbox0\par
+ \endgroup
+ %
+ % We're going to be starting a paragraph, but we don't want the
+ % \parskip glue -- logically it's part of the @item we just started.
+ \nobreak \vskip-\parskip
+ %
+ % Stop a page break at the \parskip glue coming up. Unfortunately
+ % we can't prevent a possible page break at the following
+ % \baselineskip glue.
+ \nobreak
+ \endgroup
+ \itemxneedsnegativevskipfalse
+ \else
+ % The item text fits into the space. Start a paragraph, so that the
+ % following text (if any) will end up on the same line. Since that
+ % text will be indented by \tableindent, we make the item text be in
+ % a zero-width box.
+ \noindent
+ \rlap{\hskip -\tableindent\box0}\ignorespaces%
+ \endgroup%
+ \itemxneedsnegativevskiptrue%
+ \fi
+}
+
+\def\item{\errmessage{@item while not in a table}}
+\def\itemx{\errmessage{@itemx while not in a table}}
+\def\kitem{\errmessage{@kitem while not in a table}}
+\def\kitemx{\errmessage{@kitemx while not in a table}}
+\def\xitem{\errmessage{@xitem while not in a table}}
+\def\xitemx{\errmessage{@xitemx while not in a table}}
+
+%% Contains a kludge to get @end[description] to work
+\def\description{\tablez{\dontindex}{1}{}{}{}{}}
+
+\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
+{\obeylines\obeyspaces%
+\gdef\tablex #1^^M{%
+\tabley\dontindex#1 \endtabley}}
+
+\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
+{\obeylines\obeyspaces%
+\gdef\ftablex #1^^M{%
+\tabley\fnitemindex#1 \endtabley
+\def\Eftable{\endgraf\afterenvbreak\endgroup}%
+\let\Etable=\relax}}
+
+\def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex}
+{\obeylines\obeyspaces%
+\gdef\vtablex #1^^M{%
+\tabley\vritemindex#1 \endtabley
+\def\Evtable{\endgraf\afterenvbreak\endgroup}%
+\let\Etable=\relax}}
+
+\def\dontindex #1{}
+\def\fnitemindex #1{\doind {fn}{\code{#1}}}%
+\def\vritemindex #1{\doind {vr}{\code{#1}}}%
+
+{\obeyspaces %
+\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
+\tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
+
+\def\tablez #1#2#3#4#5#6{%
+\aboveenvbreak %
+\begingroup %
+\def\Edescription{\Etable}% Necessary kludge.
+\let\itemindex=#1%
+\ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
+\ifnum 0#4>0 \tableindent=#4\mil \fi %
+\ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
+\def\itemfont{#2}%
+\itemmax=\tableindent %
+\advance \itemmax by -\itemmargin %
+\advance \leftskip by \tableindent %
+\exdentamount=\tableindent
+\parindent = 0pt
+\parskip = \smallskipamount
+\ifdim \parskip=0pt \parskip=2pt \fi%
+\def\Etable{\endgraf\afterenvbreak\endgroup}%
+\let\item = \internalBitem %
+\let\itemx = \internalBitemx %
+\let\kitem = \internalBkitem %
+\let\kitemx = \internalBkitemx %
+\let\xitem = \internalBxitem %
+\let\xitemx = \internalBxitemx %
+}
+
+% This is the counter used by @enumerate, which is really @itemize
+
+\newcount \itemno
+
+\def\itemize{\parsearg\itemizezzz}
+
+\def\itemizezzz #1{%
+ \begingroup % ended by the @end itemize
+ \itemizey {#1}{\Eitemize}
+}
+
+\def\itemizey #1#2{%
+\aboveenvbreak %
+\itemmax=\itemindent %
+\advance \itemmax by -\itemmargin %
+\advance \leftskip by \itemindent %
+\exdentamount=\itemindent
+\parindent = 0pt %
+\parskip = \smallskipamount %
+\ifdim \parskip=0pt \parskip=2pt \fi%
+\def#2{\endgraf\afterenvbreak\endgroup}%
+\def\itemcontents{#1}%
+\let\item=\itemizeitem}
+
+% Set sfcode to normal for the chars that usually have another value.
+% These are `.?!:;,'
+\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000
+ \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }
+
+% \splitoff TOKENS\endmark defines \first to be the first token in
+% TOKENS, and \rest to be the remainder.
+%
+\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
+
+% Allow an optional argument of an uppercase letter, lowercase letter,
+% or number, to specify the first label in the enumerated list. No
+% argument is the same as `1'.
+%
+\def\enumerate{\parsearg\enumeratezzz}
+\def\enumeratezzz #1{\enumeratey #1 \endenumeratey}
+\def\enumeratey #1 #2\endenumeratey{%
+ \begingroup % ended by the @end enumerate
+ %
+ % If we were given no argument, pretend we were given `1'.
+ \def\thearg{#1}%
+ \ifx\thearg\empty \def\thearg{1}\fi
+ %
+ % Detect if the argument is a single token. If so, it might be a
+ % letter. Otherwise, the only valid thing it can be is a number.
+ % (We will always have one token, because of the test we just made.
+ % This is a good thing, since \splitoff doesn't work given nothing at
+ % all -- the first parameter is undelimited.)
+ \expandafter\splitoff\thearg\endmark
+ \ifx\rest\empty
+ % Only one token in the argument. It could still be anything.
+ % A ``lowercase letter'' is one whose \lccode is nonzero.
+ % An ``uppercase letter'' is one whose \lccode is both nonzero, and
+ % not equal to itself.
+ % Otherwise, we assume it's a number.
+ %
+ % We need the \relax at the end of the \ifnum lines to stop TeX from
+ % continuing to look for a <number>.
+ %
+ \ifnum\lccode\expandafter`\thearg=0\relax
+ \numericenumerate % a number (we hope)
+ \else
+ % It's a letter.
+ \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
+ \lowercaseenumerate % lowercase letter
+ \else
+ \uppercaseenumerate % uppercase letter
+ \fi
+ \fi
+ \else
+ % Multiple tokens in the argument. We hope it's a number.
+ \numericenumerate
+ \fi
+}
+
+% An @enumerate whose labels are integers. The starting integer is
+% given in \thearg.
+%
+\def\numericenumerate{%
+ \itemno = \thearg
+ \startenumeration{\the\itemno}%
+}
+
+% The starting (lowercase) letter is in \thearg.
+\def\lowercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more lowercase letters in @enumerate; get a bigger
+ alphabet}%
+ \fi
+ \char\lccode\itemno
+ }%
+}
+
+% The starting (uppercase) letter is in \thearg.
+\def\uppercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more uppercase letters in @enumerate; get a bigger
+ alphabet}
+ \fi
+ \char\uccode\itemno
+ }%
+}
+
+% Call itemizey, adding a period to the first argument and supplying the
+% common last two arguments. Also subtract one from the initial value in
+% \itemno, since @item increments \itemno.
+%
+\def\startenumeration#1{%
+ \advance\itemno by -1
+ \itemizey{#1.}\Eenumerate\flushcr
+}
+
+% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
+% to @enumerate.
+%
+\def\alphaenumerate{\enumerate{a}}
+\def\capsenumerate{\enumerate{A}}
+\def\Ealphaenumerate{\Eenumerate}
+\def\Ecapsenumerate{\Eenumerate}
+
+% Definition of @item while inside @itemize.
+
+\def\itemizeitem{%
+\advance\itemno by 1
+{\let\par=\endgraf \smallbreak}%
+\ifhmode \errmessage{In hmode at itemizeitem}\fi
+{\parskip=0in \hskip 0pt
+\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
+\vadjust{\penalty 1200}}%
+\flushcr}
+
+% @multitable macros
+% Amy Hendrickson, 8/18/94, 3/6/96
+%
+% @multitable ... @end multitable will make as many columns as desired.
+% Contents of each column will wrap at width given in preamble. Width
+% can be specified either with sample text given in a template line,
+% or in percent of \hsize, the current width of text on page.
+
+% Table can continue over pages but will only break between lines.
+
+% To make preamble:
+%
+% Either define widths of columns in terms of percent of \hsize:
+% @multitable @columnfractions .25 .3 .45
+% @item ...
+%
+% Numbers following @columnfractions are the percent of the total
+% current hsize to be used for each column. You may use as many
+% columns as desired.
+
+
+% Or use a template:
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item ...
+% using the widest term desired in each column.
+%
+% For those who want to use more than one line's worth of words in
+% the preamble, break the line within one argument and it
+% will parse correctly, i.e.,
+%
+% @multitable {Column 1 template} {Column 2 template} {Column 3
+% template}
+% Not:
+% @multitable {Column 1 template} {Column 2 template}
+% {Column 3 template}
+
+% Each new table line starts with @item, each subsequent new column
+% starts with @tab. Empty columns may be produced by supplying @tab's
+% with nothing between them for as many times as empty columns are needed,
+% ie, @tab@tab@tab will produce two empty columns.
+
+% @item, @tab, @multitable or @end multitable do not need to be on their
+% own lines, but it will not hurt if they are.
+
+% Sample multitable:
+
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item first col stuff @tab second col stuff @tab third col
+% @item
+% first col stuff
+% @tab
+% second col stuff
+% @tab
+% third col
+% @item first col stuff @tab second col stuff
+% @tab Many paragraphs of text may be used in any column.
+%
+% They will wrap at the width determined by the template.
+% @item@tab@tab This will be in third column.
+% @end multitable
+
+% Default dimensions may be reset by user.
+% @multitableparskip is vertical space between paragraphs in table.
+% @multitableparindent is paragraph indent in table.
+% @multitablecolmargin is horizontal space to be left between columns.
+% @multitablelinespace is space to leave between table items, baseline
+% to baseline.
+% 0pt means it depends on current normal line spacing.
+%
+\newskip\multitableparskip
+\newskip\multitableparindent
+\newdimen\multitablecolspace
+\newskip\multitablelinespace
+\multitableparskip=0pt
+\multitableparindent=6pt
+\multitablecolspace=12pt
+\multitablelinespace=0pt
+
+% Macros used to set up halign preamble:
+%
+\let\endsetuptable\relax
+\def\xendsetuptable{\endsetuptable}
+\let\columnfractions\relax
+\def\xcolumnfractions{\columnfractions}
+\newif\ifsetpercent
+
+% 2/1/96, to allow fractions to be given with more than one digit.
+\def\pickupwholefraction#1 {\global\advance\colcount by1 %
+\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
+\setuptable}
+
+\newcount\colcount
+\def\setuptable#1{\def\firstarg{#1}%
+\ifx\firstarg\xendsetuptable\let\go\relax%
+\else
+ \ifx\firstarg\xcolumnfractions\global\setpercenttrue%
+ \else
+ \ifsetpercent
+ \let\go\pickupwholefraction % In this case arg of setuptable
+ % is the decimal point before the
+ % number given in percent of hsize.
+ % We don't need this so we don't use it.
+ \else
+ \global\advance\colcount by1
+ \setbox0=\hbox{#1 }% Add a normal word space as a separator;
+ % typically that is always in the input, anyway.
+ \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
+ \fi%
+ \fi%
+\ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
+\fi\go}
+
+% multitable syntax
+\def\tab{&\hskip1sp\relax} % 2/2/96
+ % tiny skip here makes sure this column space is
+ % maintained, even if it is never used.
+
+% @multitable ... @end multitable definitions:
+
+\def\multitable{\parsearg\dotable}
+\def\dotable#1{\bgroup
+ \vskip\parskip
+ \let\item\crcr
+ \tolerance=9500
+ \hbadness=9500
+ \setmultitablespacing
+ \parskip=\multitableparskip
+ \parindent=\multitableparindent
+ \overfullrule=0pt
+ \global\colcount=0
+ \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
+ %
+ % To parse everything between @multitable and @item:
+ \setuptable#1 \endsetuptable
+ %
+ % \everycr will reset column counter, \colcount, at the end of
+ % each line. Every column entry will cause \colcount to advance by one.
+ % The table preamble
+ % looks at the current \colcount to find the correct column width.
+ \everycr{\noalign{%
+ %
+ % \filbreak%% keeps underfull box messages off when table breaks over pages.
+ % Maybe so, but it also creates really weird page breaks when the table
+ % breaks over pages. Wouldn't \vfil be better? Wait until the problem
+ % manifests itself, so it can be fixed for real --karl.
+ \global\colcount=0\relax}}%
+ %
+ % This preamble sets up a generic column definition, which will
+ % be used as many times as user calls for columns.
+ % \vtop will set a single line and will also let text wrap and
+ % continue for many paragraphs if desired.
+ \halign\bgroup&\global\advance\colcount by 1\relax
+ \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
+ %
+ % In order to keep entries from bumping into each other
+ % we will add a \leftskip of \multitablecolspace to all columns after
+ % the first one.
+ %
+ % If a template has been used, we will add \multitablecolspace
+ % to the width of each template entry.
+ %
+ % If the user has set preamble in terms of percent of \hsize we will
+ % use that dimension as the width of the column, and the \leftskip
+ % will keep entries from bumping into each other. Table will start at
+ % left margin and final column will justify at right margin.
+ %
+ % Make sure we don't inherit \rightskip from the outer environment.
+ \rightskip=0pt
+ \ifnum\colcount=1
+ % The first column will be indented with the surrounding text.
+ \advance\hsize by\leftskip
+ \else
+ \ifsetpercent \else
+ % If user has not set preamble in terms of percent of \hsize
+ % we will advance \hsize by \multitablecolspace.
+ \advance\hsize by \multitablecolspace
+ \fi
+ % In either case we will make \leftskip=\multitablecolspace:
+ \leftskip=\multitablecolspace
+ \fi
+ % Ignoring space at the beginning and end avoids an occasional spurious
+ % blank line, when TeX decides to break the line at the space before the
+ % box from the multistrut, so the strut ends up on a line by itself.
+ % For example:
+ % @multitable @columnfractions .11 .89
+ % @item @code{#}
+ % @tab Legal holiday which is valid in major parts of the whole country.
+ % Is automatically provided with highlighting sequences respectively marking
+ % characters.
+ \noindent\ignorespaces##\unskip\multistrut}\cr
+}
+
+\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
+% If so, do nothing. If not, give it an appropriate dimension based on
+% current baselineskip.
+\ifdim\multitablelinespace=0pt
+%% strut to put in table in case some entry doesn't have descenders,
+%% to keep lines equally spaced
+\let\multistrut = \strut
+%% Test to see if parskip is larger than space between lines of
+%% table. If not, do nothing.
+%% If so, set to same dimension as multitablelinespace.
+\else
+\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
+width0pt\relax} \fi
+\ifdim\multitableparskip>\multitablelinespace
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi%
+\ifdim\multitableparskip=0pt
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi}
+
+
+\message{indexing,}
+% Index generation facilities
+
+% Define \newwrite to be identical to plain tex's \newwrite
+% except not \outer, so it can be used within \newindex.
+{\catcode`\@=11
+\gdef\newwrite{\alloc@7\write\chardef\sixt@@n}}
+
+% \newindex {foo} defines an index named foo.
+% It automatically defines \fooindex such that
+% \fooindex ...rest of line... puts an entry in the index foo.
+% It also defines \fooindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is foo.
+% The name of an index should be no more than 2 characters long
+% for the sake of vms.
+%
+\def\newindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
+ \noexpand\doindex{#1}}
+}
+
+% @defindex foo == \newindex{foo}
+
+\def\defindex{\parsearg\newindex}
+
+% Define @defcodeindex, like @defindex except put all entries in @code.
+
+\def\newcodeindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{%
+ \noexpand\docodeindex{#1}}
+}
+
+\def\defcodeindex{\parsearg\newcodeindex}
+
+% @synindex foo bar makes index foo feed into index bar.
+% Do this instead of @defindex foo if you don't want it as a separate index.
+% The \closeout helps reduce unnecessary open files; the limit on the
+% Acorn RISC OS is a mere 16 files.
+\def\synindex#1 #2 {%
+ \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
+ \expandafter\closeout\csname#1indfile\endcsname
+ \expandafter\let\csname#1indfile\endcsname=\synindexfoo
+ \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
+ \noexpand\doindex{#2}}%
+}
+
+% @syncodeindex foo bar similar, but put all entries made for index foo
+% inside @code.
+\def\syncodeindex#1 #2 {%
+ \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
+ \expandafter\closeout\csname#1indfile\endcsname
+ \expandafter\let\csname#1indfile\endcsname=\synindexfoo
+ \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
+ \noexpand\docodeindex{#2}}%
+}
+
+% Define \doindex, the driver for all \fooindex macros.
+% Argument #1 is generated by the calling \fooindex macro,
+% and it is "foo", the name of the index.
+
+% \doindex just uses \parsearg; it calls \doind for the actual work.
+% This is because \doind is more useful to call from other macros.
+
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+
+\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
+\def\singleindexer #1{\doind{\indexname}{#1}}
+
+% like the previous two, but they put @code around the argument.
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
+\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+
+\def\indexdummies{%
+\def\ { }%
+% Take care of the plain tex accent commands.
+\def\"{\realbackslash "}%
+\def\`{\realbackslash `}%
+\def\'{\realbackslash '}%
+\def\^{\realbackslash ^}%
+\def\~{\realbackslash ~}%
+\def\={\realbackslash =}%
+\def\b{\realbackslash b}%
+\def\c{\realbackslash c}%
+\def\d{\realbackslash d}%
+\def\u{\realbackslash u}%
+\def\v{\realbackslash v}%
+\def\H{\realbackslash H}%
+% Take care of the plain tex special European modified letters.
+\def\oe{\realbackslash oe}%
+\def\ae{\realbackslash ae}%
+\def\aa{\realbackslash aa}%
+\def\OE{\realbackslash OE}%
+\def\AE{\realbackslash AE}%
+\def\AA{\realbackslash AA}%
+\def\o{\realbackslash o}%
+\def\O{\realbackslash O}%
+\def\l{\realbackslash l}%
+\def\L{\realbackslash L}%
+\def\ss{\realbackslash ss}%
+% Take care of texinfo commands likely to appear in an index entry.
+% (Must be a way to avoid doing expansion at all, and thus not have to
+% laboriously list every single command here.)
+\def\@{@}% will be @@ when we switch to @ as escape char.
+%\let\{ = \lbracecmd
+%\let\} = \rbracecmd
+\def\_{{\realbackslash _}}%
+\def\w{\realbackslash w }%
+\def\bf{\realbackslash bf }%
+%\def\rm{\realbackslash rm }%
+\def\sl{\realbackslash sl }%
+\def\sf{\realbackslash sf}%
+\def\tt{\realbackslash tt}%
+\def\gtr{\realbackslash gtr}%
+\def\less{\realbackslash less}%
+\def\hat{\realbackslash hat}%
+\def\TeX{\realbackslash TeX}%
+\def\dots{\realbackslash dots }%
+\def\result{\realbackslash result}%
+\def\equiv{\realbackslash equiv}%
+\def\expansion{\realbackslash expansion}%
+\def\print{\realbackslash print}%
+\def\error{\realbackslash error}%
+\def\point{\realbackslash point}%
+\def\copyright{\realbackslash copyright}%
+\def\tclose##1{\realbackslash tclose {##1}}%
+\def\code##1{\realbackslash code {##1}}%
+\def\dotless##1{\realbackslash dotless {##1}}%
+\def\samp##1{\realbackslash samp {##1}}%
+\def\,##1{\realbackslash ,{##1}}%
+\def\t##1{\realbackslash t {##1}}%
+\def\r##1{\realbackslash r {##1}}%
+\def\i##1{\realbackslash i {##1}}%
+\def\b##1{\realbackslash b {##1}}%
+\def\sc##1{\realbackslash sc {##1}}%
+\def\cite##1{\realbackslash cite {##1}}%
+\def\key##1{\realbackslash key {##1}}%
+\def\file##1{\realbackslash file {##1}}%
+\def\var##1{\realbackslash var {##1}}%
+\def\kbd##1{\realbackslash kbd {##1}}%
+\def\dfn##1{\realbackslash dfn {##1}}%
+\def\emph##1{\realbackslash emph {##1}}%
+%
+% Handle some cases of @value -- where the variable name does not
+% contain - or _, and the value does not contain any
+% (non-fully-expandable) commands.
+\let\value = \expandablevalue
+%
+\unsepspaces
+}
+
+% If an index command is used in an @example environment, any spaces
+% therein should become regular spaces in the raw index file, not the
+% expansion of \tie (\\leavevmode \penalty \@M \ ).
+{\obeyspaces
+ \gdef\unsepspaces{\obeyspaces\let =\space}}
+
+% \indexnofonts no-ops all font-change commands.
+% This is used when outputting the strings to sort the index by.
+\def\indexdummyfont#1{#1}
+\def\indexdummytex{TeX}
+\def\indexdummydots{...}
+
+\def\indexnofonts{%
+% Just ignore accents.
+\let\,=\indexdummyfont
+\let\"=\indexdummyfont
+\let\`=\indexdummyfont
+\let\'=\indexdummyfont
+\let\^=\indexdummyfont
+\let\~=\indexdummyfont
+\let\==\indexdummyfont
+\let\b=\indexdummyfont
+\let\c=\indexdummyfont
+\let\d=\indexdummyfont
+\let\u=\indexdummyfont
+\let\v=\indexdummyfont
+\let\H=\indexdummyfont
+\let\dotless=\indexdummyfont
+% Take care of the plain tex special European modified letters.
+\def\oe{oe}%
+\def\ae{ae}%
+\def\aa{aa}%
+\def\OE{OE}%
+\def\AE{AE}%
+\def\AA{AA}%
+\def\o{o}%
+\def\O{O}%
+\def\l{l}%
+\def\L{L}%
+\def\ss{ss}%
+\let\w=\indexdummyfont
+\let\t=\indexdummyfont
+\let\r=\indexdummyfont
+\let\i=\indexdummyfont
+\let\b=\indexdummyfont
+\let\emph=\indexdummyfont
+\let\strong=\indexdummyfont
+\let\cite=\indexdummyfont
+\let\sc=\indexdummyfont
+%Don't no-op \tt, since it isn't a user-level command
+% and is used in the definitions of the active chars like <, >, |...
+%\let\tt=\indexdummyfont
+\let\tclose=\indexdummyfont
+\let\code=\indexdummyfont
+\let\file=\indexdummyfont
+\let\samp=\indexdummyfont
+\let\kbd=\indexdummyfont
+\let\key=\indexdummyfont
+\let\var=\indexdummyfont
+\let\TeX=\indexdummytex
+\let\dots=\indexdummydots
+\def\@{@}%
+}
+
+% To define \realbackslash, we must make \ not be an escape.
+% We must first make another character (@) an escape
+% so we do not become unable to do a definition.
+
+{\catcode`\@=0 \catcode`\\=\other
+ @gdef@realbackslash{\}}
+
+\let\indexbackslash=0 %overridden during \printindex.
+\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
+
+% For \ifx comparisons.
+\def\emptymacro{\empty}
+
+% Most index entries go through here, but \dosubind is the general case.
+%
+\def\doind#1#2{\dosubind{#1}{#2}\empty}
+
+% Workhorse for all \fooindexes.
+% #1 is name of index, #2 is stuff to put there, #3 is subentry --
+% \empty if called from \doind, as we usually are. The main exception
+% is with defuns, which call us directly.
+%
+\def\dosubind#1#2#3{%
+ % Put the index entry in the margin if desired.
+ \ifx\SETmarginindex\relax\else
+ \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
+ \fi
+ {%
+ \count255=\lastpenalty
+ {%
+ \indexdummies % Must do this here, since \bf, etc expand at this stage
+ \escapechar=`\\
+ {%
+ \let\folio = 0% We will expand all macros now EXCEPT \folio.
+ \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
+ % so it will be output as is; and it will print as backslash.
+ %
+ \def\thirdarg{#3}%
+ %
+ % If third arg is present, precede it with space in sort key.
+ \ifx\thirdarg\emptymacro
+ \let\subentry = \empty
+ \else
+ \def\subentry{ #3}%
+ \fi
+ %
+ % First process the index-string with all font commands turned off
+ % to get the string to sort by.
+ {\indexnofonts \xdef\indexsorttmp{#2\subentry}}%
+ %
+ % Now produce the complete index entry, with both the sort key and the
+ % original text, including any font commands.
+ \toks0 = {#2}%
+ \edef\temp{%
+ \write\csname#1indfile\endcsname{%
+ \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
+ }%
+ %
+ % If third (subentry) arg is present, add it to the index string.
+ \ifx\thirdarg\emptymacro \else
+ \toks0 = {#3}%
+ \edef\temp{\temp{\the\toks0}}%
+ \fi
+ %
+ % If a skip is the last thing on the list now, preserve it
+ % by backing up by \lastskip, doing the \write, then inserting
+ % the skip again. Otherwise, the whatsit generated by the
+ % \write will make \lastskip zero. The result is that sequences
+ % like this:
+ % @end defun
+ % @tindex whatever
+ % @defun ...
+ % will have extra space inserted, because the \medbreak in the
+ % start of the @defun won't see the skip inserted by the @end of
+ % the previous defun.
+ \iflinks
+ \skip0 = \lastskip \ifdim\lastskip = 0pt \else \vskip-\lastskip \fi
+ \temp
+ \ifdim\skip0 = 0pt \else \vskip\skip0 \fi
+ \fi
+ }%
+ }%
+ \penalty\count255
+ }%
+}
+
+% The index entry written in the file actually looks like
+% \entry {sortstring}{page}{topic}
+% or
+% \entry {sortstring}{page}{topic}{subtopic}
+% The texindex program reads in these files and writes files
+% containing these kinds of lines:
+% \initial {c}
+% before the first topic whose initial is c
+% \entry {topic}{pagelist}
+% for a topic that is used without subtopics
+% \primary {topic}
+% for the beginning of a topic that is used with subtopics
+% \secondary {subtopic}{pagelist}
+% for each subtopic.
+
+% Define the user-accessible indexing commands
+% @findex, @vindex, @kindex, @cindex.
+
+\def\findex {\fnindex}
+\def\kindex {\kyindex}
+\def\cindex {\cpindex}
+\def\vindex {\vrindex}
+\def\tindex {\tpindex}
+\def\pindex {\pgindex}
+
+\def\cindexsub {\begingroup\obeylines\cindexsub}
+{\obeylines %
+\gdef\cindexsub "#1" #2^^M{\endgroup %
+\dosubind{cp}{#2}{#1}}}
+
+% Define the macros used in formatting output of the sorted index material.
+
+% @printindex causes a particular index (the ??s file) to get printed.
+% It does not print any chapter heading (usually an @unnumbered).
+%
+\def\printindex{\parsearg\doprintindex}
+\def\doprintindex#1{\begingroup
+ \dobreak \chapheadingskip{10000}%
+ %
+ \indexfonts \rm
+ \tolerance = 9500
+ \indexbreaks
+ %
+ % See if the index file exists and is nonempty.
+ % Change catcode of @ here so that if the index file contains
+ % \initial {@}
+ % as its first line, TeX doesn't complain about mismatched braces
+ % (because it thinks @} is a control sequence).
+ \catcode`\@ = 11
+ \openin 1 \jobname.#1s
+ \ifeof 1
+ % \enddoublecolumns gets confused if there is no text in the index,
+ % and it loses the chapter title and the aux file entries for the
+ % index. The easiest way to prevent this problem is to make sure
+ % there is some text.
+ (Index is nonexistent)
+ \else
+ %
+ % If the index file exists but is empty, then \openin leaves \ifeof
+ % false. We have to make TeX try to read something from the file, so
+ % it can discover if there is anything in it.
+ \read 1 to \temp
+ \ifeof 1
+ (Index is empty)
+ \else
+ % Index files are almost Texinfo source, but we use \ as the escape
+ % character. It would be better to use @, but that's too big a change
+ % to make right now.
+ \def\indexbackslash{\rawbackslashxx}%
+ \catcode`\\ = 0
+ \escapechar = `\\
+ \begindoublecolumns
+ \input \jobname.#1s
+ \enddoublecolumns
+ \fi
+ \fi
+ \closein 1
+\endgroup}
+
+% These macros are used by the sorted index file itself.
+% Change them to control the appearance of the index.
+
+% Same as \bigskipamount except no shrink.
+% \balancecolumns gets confused if there is any shrink.
+\newskip\initialskipamount \initialskipamount 12pt plus4pt
+
+\def\initial #1{%
+{\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
+\ifdim\lastskip<\initialskipamount
+\removelastskip \penalty-200 \vskip \initialskipamount\fi
+\line{\secbf#1\hfill}\kern 2pt\penalty10000}}
+
+% This typesets a paragraph consisting of #1, dot leaders, and then #2
+% flush to the right margin. It is used for index and table of contents
+% entries. The paragraph is indented by \leftskip.
+%
+\def\entry #1#2{\begingroup
+ %
+ % Start a new paragraph if necessary, so our assignments below can't
+ % affect previous text.
+ \par
+ %
+ % Do not fill out the last line with white space.
+ \parfillskip = 0in
+ %
+ % No extra space above this paragraph.
+ \parskip = 0in
+ %
+ % Do not prefer a separate line ending with a hyphen to fewer lines.
+ \finalhyphendemerits = 0
+ %
+ % \hangindent is only relevant when the entry text and page number
+ % don't both fit on one line. In that case, bob suggests starting the
+ % dots pretty far over on the line. Unfortunately, a large
+ % indentation looks wrong when the entry text itself is broken across
+ % lines. So we use a small indentation and put up with long leaders.
+ %
+ % \hangafter is reset to 1 (which is the value we want) at the start
+ % of each paragraph, so we need not do anything with that.
+ \hangindent=2em
+ %
+ % When the entry text needs to be broken, just fill out the first line
+ % with blank space.
+ \rightskip = 0pt plus1fil
+ %
+ % Start a ``paragraph'' for the index entry so the line breaking
+ % parameters we've set above will have an effect.
+ \noindent
+ %
+ % Insert the text of the index entry. TeX will do line-breaking on it.
+ #1%
+ % The following is kludged to not output a line of dots in the index if
+ % there are no page numbers. The next person who breaks this will be
+ % cursed by a Unix daemon.
+ \def\tempa{{\rm }}%
+ \def\tempb{#2}%
+ \edef\tempc{\tempa}%
+ \edef\tempd{\tempb}%
+ \ifx\tempc\tempd\ \else%
+ %
+ % If we must, put the page number on a line of its own, and fill out
+ % this line with blank space. (The \hfil is overwhelmed with the
+ % fill leaders glue in \indexdotfill if the page number does fit.)
+ \hfil\penalty50
+ \null\nobreak\indexdotfill % Have leaders before the page number.
+ %
+ % The `\ ' here is removed by the implicit \unskip that TeX does as
+ % part of (the primitive) \par. Without it, a spurious underfull
+ % \hbox ensues.
+ \ #2% The page number ends the paragraph.
+ \fi%
+ \par
+\endgroup}
+
+% Like \dotfill except takes at least 1 em.
+\def\indexdotfill{\cleaders
+ \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
+
+\def\primary #1{\line{#1\hfil}}
+
+\newskip\secondaryindent \secondaryindent=0.5cm
+
+\def\secondary #1#2{
+{\parfillskip=0in \parskip=0in
+\hangindent =1in \hangafter=1
+\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
+}}
+
+% Define two-column mode, which we use to typeset indexes.
+% Adapted from the TeXbook, page 416, which is to say,
+% the manmac.tex format used to print the TeXbook itself.
+\catcode`\@=11
+
+\newbox\partialpage
+\newdimen\doublecolumnhsize
+
+\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
+ % Grab any single-column material above us.
+ \output = {\global\setbox\partialpage = \vbox{%
+ %
+ % Here is a possibility not foreseen in manmac: if we accumulate a
+ % whole lot of material, we might end up calling this \output
+ % routine twice in a row (see the doublecol-lose test, which is
+ % essentially a couple of indexes with @setchapternewpage off). In
+ % that case, we must prevent the second \partialpage from
+ % simply overwriting the first, causing us to lose the page.
+ % This will preserve it until a real output routine can ship it
+ % out. Generally, \partialpage will be empty when this runs and
+ % this will be a no-op.
+ \unvbox\partialpage
+ %
+ % Unvbox the main output page.
+ \unvbox255
+ \kern-\topskip \kern\baselineskip
+ }}%
+ \eject
+ %
+ % Use the double-column output routine for subsequent pages.
+ \output = {\doublecolumnout}%
+ %
+ % Change the page size parameters. We could do this once outside this
+ % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
+ % format, but then we repeat the same computation. Repeating a couple
+ % of assignments once per index is clearly meaningless for the
+ % execution time, so we may as well do it in one place.
+ %
+ % First we halve the line length, less a little for the gutter between
+ % the columns. We compute the gutter based on the line length, so it
+ % changes automatically with the paper format. The magic constant
+ % below is chosen so that the gutter has the same value (well, +-<1pt)
+ % as it did when we hard-coded it.
+ %
+ % We put the result in a separate register, \doublecolumhsize, so we
+ % can restore it in \pagesofar, after \hsize itself has (potentially)
+ % been clobbered.
+ %
+ \doublecolumnhsize = \hsize
+ \advance\doublecolumnhsize by -.04154\hsize
+ \divide\doublecolumnhsize by 2
+ \hsize = \doublecolumnhsize
+ %
+ % Double the \vsize as well. (We don't need a separate register here,
+ % since nobody clobbers \vsize.)
+ \vsize = 2\vsize
+}
+\def\doublecolumnout{%
+ \splittopskip=\topskip \splitmaxdepth=\maxdepth
+ % Get the available space for the double columns -- the normal
+ % (undoubled) page height minus any material left over from the
+ % previous page.
+ \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
+ % box0 will be the left-hand column, box2 the right.
+ \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \onepageout\pagesofar
+ \unvbox255
+ \penalty\outputpenalty
+}
+\def\pagesofar{%
+ % Re-output the contents of the output page -- any previous material,
+ % followed by the two boxes we just split.
+ \unvbox\partialpage
+ \hsize = \doublecolumnhsize
+ \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}%
+}
+\def\enddoublecolumns{%
+ \output = {\balancecolumns}\eject % split what we have
+ \endgroup % started in \begindoublecolumns
+ %
+ % Back to normal single-column typesetting, but take account of the
+ % fact that we just accumulated some stuff on the output page.
+ \pagegoal = \vsize
+}
+\def\balancecolumns{%
+ % Called at the end of the double column material.
+ \setbox0 = \vbox{\unvbox255}%
+ \dimen@ = \ht0
+ \advance\dimen@ by \topskip
+ \advance\dimen@ by-\baselineskip
+ \divide\dimen@ by 2
+ \splittopskip = \topskip
+ % Loop until we get a decent breakpoint.
+ {\vbadness=10000 \loop
+ \global\setbox3=\copy0
+ \global\setbox1=\vsplit3 to\dimen@
+ \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt
+ \repeat}%
+ \setbox0=\vbox to\dimen@{\unvbox1}%
+ \setbox2=\vbox to\dimen@{\unvbox3}%
+ \pagesofar
+}
+\catcode`\@ = \other
+
+
+\message{sectioning,}
+% Define chapters, sections, etc.
+
+\newcount\chapno
+\newcount\secno \secno=0
+\newcount\subsecno \subsecno=0
+\newcount\subsubsecno \subsubsecno=0
+
+% This counter is funny since it counts through charcodes of letters A, B, ...
+\newcount\appendixno \appendixno = `\@
+\def\appendixletter{\char\the\appendixno}
+
+\newwrite\contentsfile
+% This is called from \setfilename.
+\def\opencontents{\openout\contentsfile = \jobname.toc }
+
+% Each @chapter defines this as the name of the chapter.
+% page headings and footings can use it. @section does likewise
+
+\def\thischapter{} \def\thissection{}
+\def\seccheck#1{\ifnum \pageno<0
+ \errmessage{@#1 not allowed after generating table of contents}%
+\fi}
+
+\def\chapternofonts{%
+ \let\rawbackslash=\relax
+ \let\frenchspacing=\relax
+ \def\result{\realbackslash result}%
+ \def\equiv{\realbackslash equiv}%
+ \def\expansion{\realbackslash expansion}%
+ \def\print{\realbackslash print}%
+ \def\TeX{\realbackslash TeX}%
+ \def\dots{\realbackslash dots}%
+ \def\result{\realbackslash result}%
+ \def\equiv{\realbackslash equiv}%
+ \def\expansion{\realbackslash expansion}%
+ \def\print{\realbackslash print}%
+ \def\error{\realbackslash error}%
+ \def\point{\realbackslash point}%
+ \def\copyright{\realbackslash copyright}%
+ \def\tt{\realbackslash tt}%
+ \def\bf{\realbackslash bf}%
+ \def\w{\realbackslash w}%
+ \def\less{\realbackslash less}%
+ \def\gtr{\realbackslash gtr}%
+ \def\hat{\realbackslash hat}%
+ \def\char{\realbackslash char}%
+ \def\tclose##1{\realbackslash tclose{##1}}%
+ \def\code##1{\realbackslash code{##1}}%
+ \def\samp##1{\realbackslash samp{##1}}%
+ \def\r##1{\realbackslash r{##1}}%
+ \def\b##1{\realbackslash b{##1}}%
+ \def\key##1{\realbackslash key{##1}}%
+ \def\file##1{\realbackslash file{##1}}%
+ \def\kbd##1{\realbackslash kbd{##1}}%
+ % These are redefined because @smartitalic wouldn't work inside xdef.
+ \def\i##1{\realbackslash i{##1}}%
+ \def\cite##1{\realbackslash cite{##1}}%
+ \def\var##1{\realbackslash var{##1}}%
+ \def\emph##1{\realbackslash emph{##1}}%
+ \def\dfn##1{\realbackslash dfn{##1}}%
+}
+
+\newcount\absseclevel % used to calculate proper heading level
+\newcount\secbase\secbase=0 % @raise/lowersections modify this count
+
+% @raisesections: treat @section as chapter, @subsection as section, etc.
+\def\raisesections{\global\advance\secbase by -1}
+\let\up=\raisesections % original BFox name
+
+% @lowersections: treat @chapter as section, @section as subsection, etc.
+\def\lowersections{\global\advance\secbase by 1}
+\let\down=\lowersections % original BFox name
+
+% Choose a numbered-heading macro
+% #1 is heading level if unmodified by @raisesections or @lowersections
+% #2 is text for heading
+\def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
+\ifcase\absseclevel
+ \chapterzzz{#2}
+\or
+ \seczzz{#2}
+\or
+ \numberedsubseczzz{#2}
+\or
+ \numberedsubsubseczzz{#2}
+\else
+ \ifnum \absseclevel<0
+ \chapterzzz{#2}
+ \else
+ \numberedsubsubseczzz{#2}
+ \fi
+\fi
+}
+
+% like \numhead, but chooses appendix heading levels
+\def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
+\ifcase\absseclevel
+ \appendixzzz{#2}
+\or
+ \appendixsectionzzz{#2}
+\or
+ \appendixsubseczzz{#2}
+\or
+ \appendixsubsubseczzz{#2}
+\else
+ \ifnum \absseclevel<0
+ \appendixzzz{#2}
+ \else
+ \appendixsubsubseczzz{#2}
+ \fi
+\fi
+}
+
+% like \numhead, but chooses numberless heading levels
+\def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
+\ifcase\absseclevel
+ \unnumberedzzz{#2}
+\or
+ \unnumberedseczzz{#2}
+\or
+ \unnumberedsubseczzz{#2}
+\or
+ \unnumberedsubsubseczzz{#2}
+\else
+ \ifnum \absseclevel<0
+ \unnumberedzzz{#2}
+ \else
+ \unnumberedsubsubseczzz{#2}
+ \fi
+\fi
+}
+
+
+\def\thischaptername{No Chapter Title}
+\outer\def\chapter{\parsearg\chapteryyy}
+\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
+\def\chapterzzz #1{\seccheck{chapter}%
+\secno=0 \subsecno=0 \subsubsecno=0
+\global\advance \chapno by 1 \message{\putwordChapter \the\chapno}%
+\chapmacro {#1}{\the\chapno}%
+\gdef\thissection{#1}%
+\gdef\thischaptername{#1}%
+% We don't substitute the actual chapter name into \thischapter
+% because we don't want its macros evaluated now.
+\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\donoderef %
+\global\let\section = \numberedsec
+\global\let\subsection = \numberedsubsec
+\global\let\subsubsection = \numberedsubsubsec
+}}
+
+\outer\def\appendix{\parsearg\appendixyyy}
+\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\def\appendixzzz #1{\seccheck{appendix}%
+\secno=0 \subsecno=0 \subsubsecno=0
+\global\advance \appendixno by 1 \message{Appendix \appendixletter}%
+\chapmacro {#1}{\putwordAppendix{} \appendixletter}%
+\gdef\thissection{#1}%
+\gdef\thischaptername{#1}%
+\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash chapentry{\the\toks0}%
+ {\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\appendixnoderef %
+\global\let\section = \appendixsec
+\global\let\subsection = \appendixsubsec
+\global\let\subsubsection = \appendixsubsubsec
+}}
+
+% @centerchap is like @unnumbered, but the heading is centered.
+\outer\def\centerchap{\parsearg\centerchapyyy}
+\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}}
+
+\outer\def\top{\parsearg\unnumberedyyy}
+\outer\def\unnumbered{\parsearg\unnumberedyyy}
+\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
+\def\unnumberedzzz #1{\seccheck{unnumbered}%
+\secno=0 \subsecno=0 \subsubsecno=0
+%
+% This used to be simply \message{#1}, but TeX fully expands the
+% argument to \message. Therefore, if #1 contained @-commands, TeX
+% expanded them. For example, in `@unnumbered The @cite{Book}', TeX
+% expanded @cite (which turns out to cause errors because \cite is meant
+% to be executed, not expanded).
+%
+% Anyway, we don't want the fully-expanded definition of @cite to appear
+% as a result of the \message, we just want `@cite' itself. We use
+% \the<toks register> to achieve this: TeX expands \the<toks> only once,
+% simply yielding the contents of the <toks register>.
+\toks0 = {#1}\message{(\the\toks0)}%
+%
+\unnumbchapmacro {#1}%
+\gdef\thischapter{#1}\gdef\thissection{#1}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\unnumbnoderef %
+\global\let\section = \unnumberedsec
+\global\let\subsection = \unnumberedsubsec
+\global\let\subsubsection = \unnumberedsubsubsec
+}}
+
+\outer\def\numberedsec{\parsearg\secyyy}
+\def\secyyy #1{\numhead1{#1}} % normally calls seczzz
+\def\seczzz #1{\seccheck{section}%
+\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
+\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash secentry %
+{\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\donoderef %
+\penalty 10000 %
+}}
+
+\outer\def\appendixsection{\parsearg\appendixsecyyy}
+\outer\def\appendixsec{\parsearg\appendixsecyyy}
+\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
+\def\appendixsectionzzz #1{\seccheck{appendixsection}%
+\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
+\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash secentry %
+{\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\appendixnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
+\def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
+\def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
+\plainsecheading {#1}\gdef\thissection{#1}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\unnumbnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
+\def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
+\def\numberedsubseczzz #1{\seccheck{subsection}%
+\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
+\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash subsecentry %
+{\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\donoderef %
+\penalty 10000 %
+}}
+
+\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
+\def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
+\def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
+\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
+\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash subsecentry %
+{\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\appendixnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
+\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
+\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
+\plainsubsecheading {#1}\gdef\thissection{#1}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\unnumbnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
+\def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
+\def\numberedsubsubseczzz #1{\seccheck{subsubsection}%
+\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
+\subsubsecheading {#1}
+ {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash subsubsecentry{\the\toks0}
+ {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
+ {\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\donoderef %
+\penalty 10000 %
+}}
+
+\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
+\def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
+\def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
+\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
+\subsubsecheading {#1}
+ {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash subsubsecentry{\the\toks0}%
+ {\appendixletter}
+ {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\appendixnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
+\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
+\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
+\plainsubsubsecheading {#1}\gdef\thissection{#1}%
+{\chapternofonts%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}%
+\escapechar=`\\%
+\iflinks \write\contentsfile\temp \fi
+\unnumbnoderef %
+\penalty 10000 %
+}}
+
+% These are variants which are not "outer", so they can appear in @ifinfo.
+% Actually, they should now be obsolete; ordinary section commands should work.
+\def\infotop{\parsearg\unnumberedzzz}
+\def\infounnumbered{\parsearg\unnumberedzzz}
+\def\infounnumberedsec{\parsearg\unnumberedseczzz}
+\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz}
+\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
+
+\def\infoappendix{\parsearg\appendixzzz}
+\def\infoappendixsec{\parsearg\appendixseczzz}
+\def\infoappendixsubsec{\parsearg\appendixsubseczzz}
+\def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz}
+
+\def\infochapter{\parsearg\chapterzzz}
+\def\infosection{\parsearg\sectionzzz}
+\def\infosubsection{\parsearg\subsectionzzz}
+\def\infosubsubsection{\parsearg\subsubsectionzzz}
+
+% These macros control what the section commands do, according
+% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
+% Define them by default for a numbered chapter.
+\global\let\section = \numberedsec
+\global\let\subsection = \numberedsubsec
+\global\let\subsubsection = \numberedsubsubsec
+
+% Define @majorheading, @heading and @subheading
+
+% NOTE on use of \vbox for chapter headings, section headings, and
+% such:
+% 1) We use \vbox rather than the earlier \line to permit
+% overlong headings to fold.
+% 2) \hyphenpenalty is set to 10000 because hyphenation in a
+% heading is obnoxious; this forbids it.
+% 3) Likewise, headings look best if no \parindent is used, and
+% if justification is not attempted. Hence \raggedright.
+
+
+\def\majorheading{\parsearg\majorheadingzzz}
+\def\majorheadingzzz #1{%
+{\advance\chapheadingskip by 10pt \chapbreak }%
+{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}\bigskip \par\penalty 200}
+
+\def\chapheading{\parsearg\chapheadingzzz}
+\def\chapheadingzzz #1{\chapbreak %
+{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}\bigskip \par\penalty 200}
+
+% @heading, @subheading, @subsubheading.
+\def\heading{\parsearg\plainsecheading}
+\def\subheading{\parsearg\plainsubsecheading}
+\def\subsubheading{\parsearg\plainsubsubsecheading}
+
+% These macros generate a chapter, section, etc. heading only
+% (including whitespace, linebreaking, etc. around it),
+% given all the information in convenient, parsed form.
+
+%%% Args are the skip and penalty (usually negative)
+\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
+
+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
+
+%%% Define plain chapter starts, and page on/off switching for it
+% Parameter controlling skip before chapter headings (if needed)
+
+\newskip\chapheadingskip
+
+\def\chapbreak{\dobreak \chapheadingskip {-4000}}
+\def\chappager{\par\vfill\supereject}
+\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
+
+\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+
+\def\CHAPPAGoff{
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chapbreak
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGon{
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chappager
+\global\let\pagealignmacro=\chappager
+\global\def\HEADINGSon{\HEADINGSsingle}}
+
+\def\CHAPPAGodd{
+\global\let\contentsalignmacro = \chapoddpage
+\global\let\pchapsepmacro=\chapoddpage
+\global\let\pagealignmacro=\chapoddpage
+\global\def\HEADINGSon{\HEADINGSdouble}}
+
+\CHAPPAGon
+
+\def\CHAPFplain{
+\global\let\chapmacro=\chfplain
+\global\let\unnumbchapmacro=\unnchfplain
+\global\let\centerchapmacro=\centerchfplain}
+
+% Plain chapter opening.
+% #1 is the text, #2 the chapter number or empty if unnumbered.
+\def\chfplain#1#2{%
+ \pchapsepmacro
+ {%
+ \chapfonts \rm
+ \def\chapnum{#2}%
+ \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}%
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent = \wd0 \centerparametersmaybe
+ \unhbox0 #1\par}%
+ }%
+ \nobreak\bigskip % no page break after a chapter title
+ \nobreak
+}
+
+% Plain opening for unnumbered.
+\def\unnchfplain#1{\chfplain{#1}{}}
+
+% @centerchap -- centered and unnumbered.
+\let\centerparametersmaybe = \relax
+\def\centerchfplain#1{{%
+ \def\centerparametersmaybe{%
+ \advance\rightskip by 3\rightskip
+ \leftskip = \rightskip
+ \parfillskip = 0pt
+ }%
+ \chfplain{#1}{}%
+}}
+
+\CHAPFplain % The default
+
+\def\unnchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}\bigskip \par\penalty 10000 %
+}
+
+\def\chfopen #1#2{\chapoddpage {\chapfonts
+\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
+\par\penalty 5000 %
+}
+
+\def\centerchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt
+ \hfill {\rm #1}\hfill}}\bigskip \par\penalty 10000 %
+}
+
+\def\CHAPFopen{
+\global\let\chapmacro=\chfopen
+\global\let\unnumbchapmacro=\unnchfopen
+\global\let\centerchapmacro=\centerchfopen}
+
+
+% Section titles.
+\newskip\secheadingskip
+\def\secheadingbreak{\dobreak \secheadingskip {-1000}}
+\def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}}
+\def\plainsecheading#1{\sectionheading{sec}{}{#1}}
+
+% Subsection titles.
+\newskip \subsecheadingskip
+\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
+\def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}}
+\def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}}
+
+% Subsubsection titles.
+\let\subsubsecheadingskip = \subsecheadingskip
+\let\subsubsecheadingbreak = \subsecheadingbreak
+\def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}}
+\def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}}
+
+
+% Print any size section title.
+%
+% #1 is the section type (sec/subsec/subsubsec), #2 is the section
+% number (maybe empty), #3 the text.
+\def\sectionheading#1#2#3{%
+ {%
+ \expandafter\advance\csname #1headingskip\endcsname by \parskip
+ \csname #1headingbreak\endcsname
+ }%
+ {%
+ % Switch to the right set of fonts.
+ \csname #1fonts\endcsname \rm
+ %
+ % Only insert the separating space if we have a section number.
+ \def\secnum{#2}%
+ \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}%
+ %
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent = \wd0 % zero if no section number
+ \unhbox0 #3}%
+ }%
+ \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
+}
+
+
+\message{toc printing,}
+% Finish up the main text and prepare to read what we've written
+% to \contentsfile.
+
+\newskip\contentsrightmargin \contentsrightmargin=1in
+\def\startcontents#1{%
+ % If @setchapternewpage on, and @headings double, the contents should
+ % start on an odd page, unlike chapters. Thus, we maintain
+ % \contentsalignmacro in parallel with \pagealignmacro.
+ % From: Torbjorn Granlund <tege@matematik.su.se>
+ \contentsalignmacro
+ \immediate\closeout \contentsfile
+ \ifnum \pageno>0
+ \pageno = -1 % Request roman numbered pages.
+ \fi
+ % Don't need to put `Contents' or `Short Contents' in the headline.
+ % It is abundantly clear what they are.
+ \unnumbchapmacro{#1}\def\thischapter{}%
+ \begingroup % Set up to handle contents files properly.
+ \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
+ % We can't do this, because then an actual ^ in a section
+ % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
+ %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
+ \raggedbottom % Worry more about breakpoints than the bottom.
+ \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+}
+
+
+% Normal (long) toc.
+\outer\def\contents{%
+ \startcontents{\putwordTableofContents}%
+ \input \jobname.toc
+ \endgroup
+ \vfill \eject
+}
+
+% And just the chapters.
+\outer\def\summarycontents{%
+ \startcontents{\putwordShortContents}%
+ %
+ \let\chapentry = \shortchapentry
+ \let\unnumbchapentry = \shortunnumberedentry
+ % We want a true roman here for the page numbers.
+ \secfonts
+ \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
+ \rm
+ \hyphenpenalty = 10000
+ \advance\baselineskip by 1pt % Open it up a little.
+ \def\secentry ##1##2##3##4{}
+ \def\unnumbsecentry ##1##2{}
+ \def\subsecentry ##1##2##3##4##5{}
+ \def\unnumbsubsecentry ##1##2{}
+ \def\subsubsecentry ##1##2##3##4##5##6{}
+ \def\unnumbsubsubsecentry ##1##2{}
+ \input \jobname.toc
+ \endgroup
+ \vfill \eject
+}
+\let\shortcontents = \summarycontents
+
+% These macros generate individual entries in the table of contents.
+% The first argument is the chapter or section name.
+% The last argument is the page number.
+% The arguments in between are the chapter number, section number, ...
+
+% Chapter-level things, for both the long and short contents.
+\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
+
+% See comments in \dochapentry re vbox and related settings
+\def\shortchapentry#1#2#3{%
+ \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}%
+}
+
+% Typeset the label for a chapter or appendix for the short contents.
+% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.
+% We could simplify the code here by writing out an \appendixentry
+% command in the toc file for appendices, instead of using \chapentry
+% for both, but it doesn't seem worth it.
+\setbox0 = \hbox{\shortcontrm \putwordAppendix }
+\newdimen\shortappendixwidth \shortappendixwidth = \wd0
+
+\def\shortchaplabel#1{%
+ % We typeset #1 in a box of constant width, regardless of the text of
+ % #1, so the chapter titles will come out aligned.
+ \setbox0 = \hbox{#1}%
+ \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi
+ %
+ % This space should be plenty, since a single number is .5em, and the
+ % widest letter (M) is 1em, at least in the Computer Modern fonts.
+ % (This space doesn't include the extra space that gets added after
+ % the label; that gets put in by \shortchapentry above.)
+ \advance\dimen0 by 1.1em
+ \hbox to \dimen0{#1\hfil}%
+}
+
+\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
+\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}}
+
+% Sections.
+\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
+\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
+
+% Subsections.
+\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
+\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
+
+% And subsubsections.
+\def\subsubsecentry#1#2#3#4#5#6{%
+ \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
+\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
+
+% This parameter controls the indentation of the various levels.
+\newdimen\tocindent \tocindent = 3pc
+
+% Now for the actual typesetting. In all these, #1 is the text and #2 is the
+% page number.
+%
+% If the toc has to be broken over pages, we want it to be at chapters
+% if at all possible; hence the \penalty.
+\def\dochapentry#1#2{%
+ \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
+ \begingroup
+ \chapentryfonts
+ \tocentry{#1}{\dopageno{#2}}%
+ \endgroup
+ \nobreak\vskip .25\baselineskip plus.1\baselineskip
+}
+
+\def\dosecentry#1#2{\begingroup
+ \secentryfonts \leftskip=\tocindent
+ \tocentry{#1}{\dopageno{#2}}%
+\endgroup}
+
+\def\dosubsecentry#1#2{\begingroup
+ \subsecentryfonts \leftskip=2\tocindent
+ \tocentry{#1}{\dopageno{#2}}%
+\endgroup}
+
+\def\dosubsubsecentry#1#2{\begingroup
+ \subsubsecentryfonts \leftskip=3\tocindent
+ \tocentry{#1}{\dopageno{#2}}%
+\endgroup}
+
+% Final typesetting of a toc entry; we use the same \entry macro as for
+% the index entries, but we want to suppress hyphenation here. (We
+% can't do that in the \entry macro, since index entries might consist
+% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
+\def\tocentry#1#2{\begingroup
+ \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
+ % Do not use \turnoffactive in these arguments. Since the toc is
+ % typeset in cmr, so characters such as _ would come out wrong; we
+ % have to do the usual translation tricks.
+ \entry{#1}{#2}%
+\endgroup}
+
+% Space between chapter (or whatever) number and the title.
+\def\labelspace{\hskip1em \relax}
+
+\def\dopageno#1{{\rm #1}}
+\def\doshortpageno#1{{\rm #1}}
+
+\def\chapentryfonts{\secfonts \rm}
+\def\secentryfonts{\textfonts}
+\let\subsecentryfonts = \textfonts
+\let\subsubsecentryfonts = \textfonts
+
+
+\message{environments,}
+
+% Since these characters are used in examples, it should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+% Furthermore, these definitions must come after we define our fonts.
+\newbox\dblarrowbox \newbox\longdblarrowbox
+\newbox\pushcharbox \newbox\bullbox
+\newbox\equivbox \newbox\errorbox
+
+%{\tentt
+%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
+%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
+%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
+%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
+% Adapted from the manmac format (p.420 of TeXbook)
+%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
+% depth .1ex\hfil}
+%}
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+\def\point{$\star$}
+\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% Adapted from the TeXbook's \boxit.
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
+
+\global\setbox\errorbox=\hbox to \dimen0{\hfil
+ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+ \advance\hsize by -2\dimen2 % Rules.
+ \vbox{
+ \hrule height\dimen2
+ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
+ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+ \kern3pt\vrule width\dimen2}% Space to right.
+ \hrule height\dimen2}
+ \hfil}
+
+% The @error{} command.
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
+% @tex ... @end tex escapes into raw Tex temporarily.
+% One exception: @ is still an escape character, so that @end tex works.
+% But \@ or @@ will get a plain tex @ character.
+
+\def\tex{\begingroup
+ \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+ \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+ \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
+ \catcode `\%=14
+ \catcode 43=12 % plus
+ \catcode`\"=12
+ \catcode`\==12
+ \catcode`\|=12
+ \catcode`\<=12
+ \catcode`\>=12
+ \escapechar=`\\
+ %
+ \let\b=\ptexb
+ \let\bullet=\ptexbullet
+ \let\c=\ptexc
+ \let\,=\ptexcomma
+ \let\.=\ptexdot
+ \let\dots=\ptexdots
+ \let\equiv=\ptexequiv
+ \let\!=\ptexexclam
+ \let\i=\ptexi
+ \let\{=\ptexlbrace
+ \let\+=\tabalign
+ \let\}=\ptexrbrace
+ \let\*=\ptexstar
+ \let\t=\ptext
+ %
+ \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
+ \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
+ \def\@{@}%
+\let\Etex=\endgroup}
+
+% Define @lisp ... @endlisp.
+% @lisp does a \begingroup so it can rebind things,
+% including the definition of @endlisp (which normally is erroneous).
+
+% Amount to narrow the margins by for @lisp.
+\newskip\lispnarrowing \lispnarrowing=0.4in
+
+% This is the definition that ^^M gets inside @lisp, @example, and other
+% such environments. \null is better than a space, since it doesn't
+% have any width.
+\def\lisppar{\null\endgraf}
+
+% Make each space character in the input produce a normal interword
+% space in the output. Don't allow a line break at this space, as this
+% is used only in environments like @example, where each line of input
+% should produce a line of output anyway.
+%
+{\obeyspaces %
+\gdef\sepspaces{\obeyspaces\let =\tie}}
+
+% Define \obeyedspace to be our active space, whatever it is. This is
+% for use in \parsearg.
+{\sepspaces%
+\global\let\obeyedspace= }
+
+% This space is always present above and below environments.
+\newskip\envskipamount \envskipamount = 0pt
+
+% Make spacing and below environment symmetrical. We use \parskip here
+% to help in doing that, since in @example-like environments \parskip
+% is reset to zero; thus the \afterenvbreak inserts no space -- but the
+% start of the next paragraph will insert \parskip
+%
+\def\aboveenvbreak{{\advance\envskipamount by \parskip
+\endgraf \ifdim\lastskip<\envskipamount
+\removelastskip \penalty-50 \vskip\envskipamount \fi}}
+
+\let\afterenvbreak = \aboveenvbreak
+
+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
+\let\nonarrowing=\relax
+
+% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
+% environment contents.
+\font\circle=lcircle10
+\newdimen\circthick
+\newdimen\cartouter\newdimen\cartinner
+\newskip\normbskip\newskip\normpskip\newskip\normlskip
+\circthick=\fontdimen8\circle
+%
+\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
+\def\ctr{{\hskip 6pt\circle\char'010}}
+\def\cbl{{\circle\char'012\hskip -6pt}}
+\def\cbr{{\hskip 6pt\circle\char'011}}
+\def\carttop{\hbox to \cartouter{\hskip\lskip
+ \ctl\leaders\hrule height\circthick\hfil\ctr
+ \hskip\rskip}}
+\def\cartbot{\hbox to \cartouter{\hskip\lskip
+ \cbl\leaders\hrule height\circthick\hfil\cbr
+ \hskip\rskip}}
+%
+\newskip\lskip\newskip\rskip
+
+\long\def\cartouche{%
+\begingroup
+ \lskip=\leftskip \rskip=\rightskip
+ \leftskip=0pt\rightskip=0pt %we want these *outside*.
+ \cartinner=\hsize \advance\cartinner by-\lskip
+ \advance\cartinner by-\rskip
+ \cartouter=\hsize
+ \advance\cartouter by 18.4pt % allow for 3pt kerns on either
+% side, and for 6pt waste from
+% each corner char, and rule thickness
+ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
+ % Flag to tell @lisp, etc., not to narrow margin.
+ \let\nonarrowing=\comment
+ \vbox\bgroup
+ \baselineskip=0pt\parskip=0pt\lineskip=0pt
+ \carttop
+ \hbox\bgroup
+ \hskip\lskip
+ \vrule\kern3pt
+ \vbox\bgroup
+ \hsize=\cartinner
+ \kern3pt
+ \begingroup
+ \baselineskip=\normbskip
+ \lineskip=\normlskip
+ \parskip=\normpskip
+ \vskip -\parskip
+\def\Ecartouche{%
+ \endgroup
+ \kern3pt
+ \egroup
+ \kern3pt\vrule
+ \hskip\rskip
+ \egroup
+ \cartbot
+ \egroup
+\endgroup
+}}
+
+
+% This macro is called at the beginning of all the @example variants,
+% inside a group.
+\def\nonfillstart{%
+ \aboveenvbreak
+ \inENV % This group ends at the end of the body
+ \hfuzz = 12pt % Don't be fussy
+ \sepspaces % Make spaces be word-separators rather than space tokens.
+ \singlespace
+ \let\par = \lisppar % don't ignore blank lines
+ \obeylines % each line of input is a line of output
+ \parskip = 0pt
+ \parindent = 0pt
+ \emergencystretch = 0pt % don't try to avoid overfull boxes
+ % @cartouche defines \nonarrowing to inhibit narrowing
+ % at next level down.
+ \ifx\nonarrowing\relax
+ \advance \leftskip by \lispnarrowing
+ \exdentamount=\lispnarrowing
+ \let\exdent=\nofillexdent
+ \let\nonarrowing=\relax
+ \fi
+}
+
+% To ending an @example-like environment, we first end the paragraph
+% (via \afterenvbreak's vertical glue), and then the group. That way we
+% keep the zero \parskip that the environments set -- \parskip glue
+% will be inserted at the beginning of the next paragraph in the
+% document, after the environment.
+%
+\def\nonfillfinish{\afterenvbreak\endgroup}%
+
+\def\lisp{\begingroup
+ \nonfillstart
+ \let\Elisp = \nonfillfinish
+ \tt
+ % Make @kbd do something special, if requested.
+ \let\kbdfont\kbdexamplefont
+ \rawbackslash % have \ input char produce \ char from current font
+ \gobble
+}
+
+% Define the \E... control sequence only if we are inside the
+% environment, so the error checking in \end will work.
+%
+% We must call \lisp last in the definition, since it reads the
+% return following the @example (or whatever) command.
+%
+\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}
+\def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp}
+\def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp}
+
+% @smallexample and @smalllisp. This is not used unless the @smallbook
+% command is given. Originally contributed by Pavel@xerox.
+%
+\def\smalllispx{\begingroup
+ \nonfillstart
+ \let\Esmalllisp = \nonfillfinish
+ \let\Esmallexample = \nonfillfinish
+ %
+ % Smaller fonts for small examples.
+ \indexfonts \tt
+ \rawbackslash % make \ output the \ character from the current font (tt)
+ \gobble
+}
+
+% This is @display; same as @lisp except use roman font.
+%
+\def\display{\begingroup
+ \nonfillstart
+ \let\Edisplay = \nonfillfinish
+ \gobble
+}
+
+% This is @format; same as @display except don't narrow margins.
+%
+\def\format{\begingroup
+ \let\nonarrowing = t
+ \nonfillstart
+ \let\Eformat = \nonfillfinish
+ \gobble
+}
+
+% @flushleft (same as @format) and @flushright.
+%
+\def\flushleft{\begingroup
+ \let\nonarrowing = t
+ \nonfillstart
+ \let\Eflushleft = \nonfillfinish
+ \gobble
+}
+\def\flushright{\begingroup
+ \let\nonarrowing = t
+ \nonfillstart
+ \let\Eflushright = \nonfillfinish
+ \advance\leftskip by 0pt plus 1fill
+ \gobble}
+
+% @quotation does normal linebreaking (hence we can't use \nonfillstart)
+% and narrows the margins.
+%
+\def\quotation{%
+ \begingroup\inENV %This group ends at the end of the @quotation body
+ {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+ \singlespace
+ \parindent=0pt
+ % We have retained a nonzero parskip for the environment, since we're
+ % doing normal filling. So to avoid extra space below the environment...
+ \def\Equotation{\parskip = 0pt \nonfillfinish}%
+ %
+ % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \ifx\nonarrowing\relax
+ \advance\leftskip by \lispnarrowing
+ \advance\rightskip by \lispnarrowing
+ \exdentamount = \lispnarrowing
+ \let\nonarrowing = \relax
+ \fi
+}
+
+\message{defuns,}
+% Define formatter for defuns
+% First, allow user to change definition object font (\df) internally
+\def\setdeffont #1 {\csname DEF#1\endcsname}
+
+\newskip\defbodyindent \defbodyindent=.4in
+\newskip\defargsindent \defargsindent=50pt
+\newskip\deftypemargin \deftypemargin=12pt
+\newskip\deflastargmargin \deflastargmargin=18pt
+
+\newcount\parencount
+% define \functionparens, which makes ( and ) and & do special things.
+% \functionparens affects the group it is contained in.
+\def\activeparens{%
+\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
+\catcode`\[=\active \catcode`\]=\active}
+
+% Make control sequences which act like normal parenthesis chars.
+\let\lparen = ( \let\rparen = )
+
+{\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
+
+% Be sure that we always have a definition for `(', etc. For example,
+% if the fn name has parens in it, \boldbrax will not be in effect yet,
+% so TeX would otherwise complain about undefined control sequence.
+\global\let(=\lparen \global\let)=\rparen
+\global\let[=\lbrack \global\let]=\rbrack
+
+\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
+\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+% This is used to turn on special parens
+% but make & act ordinary (given that it's active).
+\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr}
+
+% Definitions of (, ) and & used in args for functions.
+% This is the definition of ( outside of all parentheses.
+\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested
+ \global\advance\parencount by 1
+}
+%
+% This is the definition of ( when already inside a level of parens.
+\gdef\opnested{\char`\(\global\advance\parencount by 1 }
+%
+\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
+ % also in that case restore the outer-level definition of (.
+ \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
+ \global\advance \parencount by -1 }
+% If we encounter &foo, then turn on ()-hacking afterwards
+\gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }
+%
+\gdef\normalparens{\boldbrax\let&=\ampnr}
+} % End of definition inside \activeparens
+%% These parens (in \boldbrax) actually are a little bolder than the
+%% contained text. This is especially needed for [ and ]
+\def\opnr{{\sf\char`\(}\global\advance\parencount by 1 }
+\def\clnr{{\sf\char`\)}\global\advance\parencount by -1 }
+\def\ampnr{\&}
+\def\lbrb{{\bf\char`\[}}
+\def\rbrb{{\bf\char`\]}}
+
+% First, defname, which formats the header line itself.
+% #1 should be the function name.
+% #2 should be the type of definition, such as "Function".
+
+\def\defname #1#2{%
+% Get the values of \leftskip and \rightskip as they were
+% outside the @def...
+\dimen2=\leftskip
+\advance\dimen2 by -\defbodyindent
+\dimen3=\rightskip
+\advance\dimen3 by -\defbodyindent
+\noindent %
+\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
+\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
+\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
+\parshape 2 0in \dimen0 \defargsindent \dimen1 %
+% Now output arg 2 ("Function" or some such)
+% ending at \deftypemargin from the right margin,
+% but stuck inside a box of width 0 so it does not interfere with linebreaking
+{% Adjust \hsize to exclude the ambient margins,
+% so that \rightline will obey them.
+\advance \hsize by -\dimen2 \advance \hsize by -\dimen3
+\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}%
+% Make all lines underfull and no complaints:
+\tolerance=10000 \hbadness=10000
+\advance\leftskip by -\defbodyindent
+\exdentamount=\defbodyindent
+{\df #1}\enskip % Generate function name
+}
+
+% Actually process the body of a definition
+% #1 should be the terminating control sequence, such as \Edefun.
+% #2 should be the "another name" control sequence, such as \defunx.
+% #3 should be the control sequence that actually processes the header,
+% such as \defunheader.
+
+\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup %
+\catcode 61=\active % 61 is `='
+\obeylines\activeparens\spacesplit#3}
+
+% #1 is the \E... control sequence to end the definition (which we define).
+% #2 is the \...x control sequence for consecutive fns (which we define).
+% #3 is the control sequence to call to resume processing.
+% #4, delimited by the space, is the class name.
+%
+\def\defmethparsebody#1#2#3#4 {\begingroup\inENV %
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
+
+% @deftypemethod has an extra argument that nothing else does. Sigh.
+% #1 is the \E... control sequence to end the definition (which we define).
+% #2 is the \...x control sequence for consecutive fns (which we define).
+% #3 is the control sequence to call to resume processing.
+% #4, delimited by the space, is the class name.
+% #5 is the method's return type.
+%
+\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV %
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
+
+\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2##1 ##2 {\def#4{##1}%
+\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
+
+% These parsing functions are similar to the preceding ones
+% except that they do not make parens into active characters.
+% These are used for "variables" since they have no arguments.
+
+\def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2{\begingroup\obeylines\spacesplit#3}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup %
+\catcode 61=\active %
+\obeylines\spacesplit#3}
+
+% This is used for \def{tp,vr}parsebody. It could probably be used for
+% some of the others, too, with some judicious conditionals.
+%
+\def\parsebodycommon#1#2#3{%
+ \begingroup\inENV %
+ \medbreak %
+ % Define the end token that this defining construct specifies
+ % so that it will exit this group.
+ \def#1{\endgraf\endgroup\medbreak}%
+ \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
+ \parindent=0in
+ \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+ \exdentamount=\defbodyindent
+ \begingroup\obeylines
+}
+
+\def\defvrparsebody#1#2#3#4 {%
+ \parsebodycommon{#1}{#2}{#3}%
+ \spacesplit{#3{#4}}%
+}
+
+% This loses on `@deftp {Data Type} {struct termios}' -- it thinks the
+% type is just `struct', because we lose the braces in `{struct
+% termios}' when \spacesplit reads its undelimited argument. Sigh.
+% \let\deftpparsebody=\defvrparsebody
+%
+% So, to get around this, we put \empty in with the type name. That
+% way, TeX won't find exactly `{...}' as an undelimited argument, and
+% won't strip off the braces.
+%
+\def\deftpparsebody #1#2#3#4 {%
+ \parsebodycommon{#1}{#2}{#3}%
+ \spacesplit{\parsetpheaderline{#3{#4}}}\empty
+}
+
+% Fine, but then we have to eventually remove the \empty *and* the
+% braces (if any). That's what this does.
+%
+\def\removeemptybraces\empty#1\relax{#1}
+
+% After \spacesplit has done its work, this is called -- #1 is the final
+% thing to call, #2 the type name (which starts with \empty), and #3
+% (which might be empty) the arguments.
+%
+\def\parsetpheaderline#1#2#3{%
+ #1{\removeemptybraces#2\relax}{#3}%
+}%
+
+\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2##1 ##2 {\def#4{##1}%
+\begingroup\obeylines\spacesplit{#3{##2}}}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup\obeylines\spacesplit{#3{#5}}}
+
+% Split up #2 at the first space token.
+% call #1 with two arguments:
+% the first is all of #2 before the space token,
+% the second is all of #2 after that space token.
+% If #2 contains no space token, all of it is passed as the first arg
+% and the second is passed as empty.
+
+{\obeylines
+\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
+\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
+\ifx\relax #3%
+#1{#2}{}\else #1{#2}{#3#4}\fi}}
+
+% So much for the things common to all kinds of definitions.
+
+% Define @defun.
+
+% First, define the processing that is wanted for arguments of \defun
+% Use this to expand the args and terminate the paragraph they make up
+
+\def\defunargs #1{\functionparens \sl
+% Expand, preventing hyphenation at `-' chars.
+% Note that groups don't affect changes in \hyphenchar.
+\hyphenchar\tensl=0
+#1%
+\hyphenchar\tensl=45
+\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
+\interlinepenalty=10000
+\advance\rightskip by 0pt plus 1fil
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000%
+}
+
+\def\deftypefunargs #1{%
+% Expand, preventing hyphenation at `-' chars.
+% Note that groups don't affect changes in \hyphenchar.
+% Use \boldbraxnoamp, not \functionparens, so that & is not special.
+\boldbraxnoamp
+\tclose{#1}% avoid \code because of side effects on active chars
+\interlinepenalty=10000
+\advance\rightskip by 0pt plus 1fil
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000%
+}
+
+% Do complete processing of one @defun or @defunx line already parsed.
+
+% @deffn Command forward-char nchars
+
+\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
+
+\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
+\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @defun == @deffn Function
+
+\def\defun{\defparsebody\Edefun\defunx\defunheader}
+
+\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Function}%
+\defunargs {#2}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @deftypefun int foobar (int @var{foo}, float @var{bar})
+
+\def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader}
+
+% #1 is the data type. #2 is the name and args.
+\def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax}
+% #1 is the data type, #2 the name, #3 the args.
+\def\deftypefunheaderx #1#2 #3\relax{%
+\doind {fn}{\code{#2}}% Make entry in function index
+\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Function}%
+\deftypefunargs {#3}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
+
+\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
+
+% \defheaderxcond#1\relax$$$
+% puts #1 in @code, followed by a space, but does nothing if #1 is null.
+\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi}
+
+% #1 is the classification. #2 is the data type. #3 is the name and args.
+\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
+% #1 is the classification, #2 the data type, #3 the name, #4 the args.
+\def\deftypefnheaderx #1#2#3 #4\relax{%
+\doind {fn}{\code{#3}}% Make entry in function index
+\begingroup
+\normalparens % notably, turn off `&' magic, which prevents
+% at least some C++ text from working
+\defname {\defheaderxcond#2\relax$$$#3}{#1}%
+\deftypefunargs {#4}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @defmac == @deffn Macro
+
+\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
+
+\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Macro}%
+\defunargs {#2}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @defspec == @deffn Special Form
+
+\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
+
+\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Special Form}%
+\defunargs {#2}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% This definition is run if you use @defunx
+% anywhere other than immediately after a @defun or @defunx.
+
+\def\deffnx #1 {\errmessage{@deffnx in invalid context}}
+\def\defunx #1 {\errmessage{@defunx in invalid context}}
+\def\defmacx #1 {\errmessage{@defmacx in invalid context}}
+\def\defspecx #1 {\errmessage{@defspecx in invalid context}}
+\def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
+\def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}}
+\def\deftypefunx #1 {\errmessage{@deftypeunx in invalid context}}
+
+% @defmethod, and so on
+
+% @defop CATEGORY CLASS OPERATION ARG...
+
+\def\defop #1 {\def\defoptype{#1}%
+\defopparsebody\Edefop\defopx\defopheader\defoptype}
+
+\def\defopheader #1#2#3{%
+\dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index
+\begingroup\defname {#2}{\defoptype{} on #1}%
+\defunargs {#3}\endgroup %
+}
+
+% @deftypemethod CLASS RETURN-TYPE METHOD ARG...
+%
+\def\deftypemethod{%
+ \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
+%
+% #1 is the class name, #2 the data type, #3 the method name, #4 the args.
+\def\deftypemethodheader#1#2#3#4{%
+ \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
+ \begingroup
+ \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}%
+ \deftypefunargs{#4}%
+ \endgroup
+}
+
+% @defmethod == @defop Method
+%
+\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
+%
+% #1 is the class name, #2 the method name, #3 the args.
+\def\defmethodheader#1#2#3{%
+ \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index
+ \begingroup
+ \defname{#2}{\putwordMethodon\ \code{#1}}%
+ \defunargs{#3}%
+ \endgroup
+}
+
+% @defcv {Class Option} foo-class foo-flag
+
+\def\defcv #1 {\def\defcvtype{#1}%
+\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
+
+\def\defcvarheader #1#2#3{%
+\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
+\begingroup\defname {#2}{\defcvtype{} of #1}%
+\defvarargs {#3}\endgroup %
+}
+
+% @defivar == @defcv {Instance Variable}
+
+\def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}
+
+\def\defivarheader #1#2#3{%
+\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
+\begingroup\defname {#2}{Instance Variable of #1}%
+\defvarargs {#3}\endgroup %
+}
+
+% These definitions are run if you use @defmethodx, etc.,
+% anywhere other than immediately after a @defmethod, etc.
+
+\def\defopx #1 {\errmessage{@defopx in invalid context}}
+\def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
+\def\defcvx #1 {\errmessage{@defcvx in invalid context}}
+\def\defivarx #1 {\errmessage{@defivarx in invalid context}}
+
+% Now @defvar
+
+% First, define the processing that is wanted for arguments of @defvar.
+% This is actually simple: just print them in roman.
+% This must expand the args and terminate the paragraph they make up
+\def\defvarargs #1{\normalparens #1%
+\interlinepenalty=10000
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000}
+
+% @defvr Counter foo-count
+
+\def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader}
+
+\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
+\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
+
+% @defvar == @defvr Variable
+
+\def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader}
+
+\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
+\begingroup\defname {#1}{Variable}%
+\defvarargs {#2}\endgroup %
+}
+
+% @defopt == @defvr {User Option}
+
+\def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader}
+
+\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
+\begingroup\defname {#1}{User Option}%
+\defvarargs {#2}\endgroup %
+}
+
+% @deftypevar int foobar
+
+\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
+
+% #1 is the data type. #2 is the name, perhaps followed by text that
+% is actually part of the data type, which should not be put into the index.
+\def\deftypevarheader #1#2{%
+\dovarind#2 \relax% Make entry in variables index
+\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
+\interlinepenalty=10000
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000
+\endgroup}
+\def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
+
+% @deftypevr {Global Flag} int enable
+
+\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
+
+\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
+\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
+\interlinepenalty=10000
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000
+\endgroup}
+
+% This definition is run if you use @defvarx
+% anywhere other than immediately after a @defvar or @defvarx.
+
+\def\defvrx #1 {\errmessage{@defvrx in invalid context}}
+\def\defvarx #1 {\errmessage{@defvarx in invalid context}}
+\def\defoptx #1 {\errmessage{@defoptx in invalid context}}
+\def\deftypevarx #1 {\errmessage{@deftypevarx in invalid context}}
+\def\deftypevrx #1 {\errmessage{@deftypevrx in invalid context}}
+
+% Now define @deftp
+% Args are printed in bold, a slight difference from @defvar.
+
+\def\deftpargs #1{\bf \defvarargs{#1}}
+
+% @deftp Class window height width ...
+
+\def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader}
+
+\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
+\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
+
+% This definition is run if you use @deftpx, etc
+% anywhere other than immediately after a @deftp, etc.
+
+\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
+
+
+\message{macros,}
+% @macro.
+% The basic scheme is as follows:
+% We read the first line and split it up into macro name and parameter
+% list. We then walk the parameter list defining control sequences
+% named \MAC@<macro name><parameter name>. Each expands to another
+% control sequence named \MAC@<macro name>.<parameter number>. Those
+% control sequences will be defined at macro runtime to be the
+% parameter expansion text.
+%
+% The body is then read in as a single argument in a context where \
+% is an active character, and the cs \MACb.<macro name> is defined as
+% the macro body. The active character \ takes one argument delimited
+% by another \, and uses it to index the table of macro arguments
+% described above.
+%
+% Finally, we define a control sequence \<macro name> which calls one
+% of the six (!) macro execution commands. These six commands
+% correspond to recursive and nonrecursive macros with no, one, and
+% many arguments. They all take one argument, <macro name>, set up
+% the environment appropriately, and call the real macro.
+%
+% \macsave@<macro name> holds the old definition of \<macro name>.
+
+\newcount\paramno
+\newtoks\macname
+
+% This does \let #1 = #2, except with \csnames.
+\def\cslet#1#2{%
+\expandafter\expandafter\expandafter
+\let
+\expandafter\expandafter
+\csname#1\endcsname
+\csname#2\endcsname}
+
+% We have to play lots of games with the catcodes. Initially { and }
+% are made `other' so that \splitarg (below) can use them as argument
+% delimiters. Then - is made a letter so that \iimacro can recognize
+% @allow-recursion.
+\def\macro{\bgroup\catcode`\{=\other\catcode`\}=\other\parsearg\imacro}
+\def\imacro#1{\egroup % started in \macro
+ \splitarg{#1}% now \macname is the macname and \toks0 the arglist
+ \paramno=0%
+ \edef\tmp{\the\toks0}%
+ \ifx\tmp\empty % no arguments
+ \else
+ \expandafter\parsemargdef \the\toks0;%
+ \fi
+ \bgroup\catcode`\-=11\global\futurelet\nxt\iimacro}
+
+% \imacro has noted whether the macro takes one, two, or many
+% arguments (in \paramno). \iimacro figures out whether it's
+% recursive, and then uses the argument count and the recursivity to
+% select one of the six macro execution sequences. Then we save the
+% original definition of @foo in \macsave@foo, and define @foo to call
+% the selected execution sequence. \edef conveniently just expands
+% the token registers, not the deep structure.
+\def\iimacro{%
+ \egroup % started in \imacro
+ \ifx\nxt\allowrecur
+ \let\next\parserbody
+ \toks0=\expandafter{\csname dormacro\ifcase\paramno na\or oa\fi\endcsname}%
+ \else
+ \let\next\parsebody
+ \toks0=\expandafter{\csname domacro\ifcase\paramno na\or oa\fi\endcsname}%
+ \fi
+ \expandafter\ifx \csname macsave@\the\macname\endcsname \relax
+ \cslet{macsave@\the\macname}{\the\macname}%
+ \else
+ \errmessage{warning: redefining macro \the\macname}%
+ \fi
+ \expandafter\edef\csname\the\macname\endcsname{\the\toks0{\the\macname}}%
+\next}
+
+% @allow-recursion is noticed and handled by \iimacro. It should
+% never actually be executed. It has two names so we don't need
+% strange catcodes while defining \iimacro.
+\def\allowrecur{\errmessage{Internal error: \noexpand\allowrecur executed}}
+{\catcode`\-=11\global\let\allow-recursion\allowrecur}
+
+% unmacro just restores the old meaning; the MAC@<macname> macros
+% remain defined. (Memory leak!) \norecurse is defined below, near
+% the execution commands.
+\def\unmacro{\parsearg\iunmacro}
+\def\iunmacro#1{\macname={#1} \norecurse}
+
+% We need {} to be ordinary inside these commands. [] are temporary
+% grouping symbols.
+\begingroup
+\catcode`\{=\other \catcode`\}=\other
+\catcode`\[=1 \catcode`\]=2
+
+% @macro can be called with or without a brace-surrounded macro
+% argument list. These three sequences extract the macro name and arg
+% list in hopefully all cases. *Note, anything on the line after the
+% first pair of braces will be thrown out.
+\gdef\splitarg#1[\isplitarg|#1 {}|]
+\gdef\isplitarg|#1 {#2}#3|[%
+ \toks0=[#2]%
+ \edef\tmp[\the\toks0]%
+ \ifx\tmp\empty
+ \isplitargnospaces|#1{}|%
+ \else
+ \macname=[#1]%
+ \fi]
+\gdef\isplitargnospaces|#1{#2}#3|[\macname=[#1] \toks0=[#2]]
+
+% \parsebrace gets around the situation produced by \braceorline
+% (below) where the { has the wrong catcode because of \futurelet.
+% The \egroup matches a \bgroup in \braceorline.
+\gdef\parsebrace#1{#2}[\egroup\let\next=#1\next[#2]]
+
+\global\let\brace={ % used by \braceorline, below
+
+\endgroup
+
+
+% Argument parsing.
+% These routines iterate over a comma-separated list defining
+% tokens that map macro formal to actual parameters.
+% \parsemargdef sets the formal -> positional correspondence at macro
+% definition time; \parsemarg sets positional -> actual at runtime.
+%
+% The definitions are not symmetric because the callers have the
+% argument list in different places (token register and #arg)
+\def\parsemargdef#1;{\paramno=0\iparsemargdef#1,;,}
+\def\iparsemargdef#1,{%
+ \if#1;\let\next=\relax
+ \else \let\next=\iparsemargdef
+ \advance\paramno by 1%
+ \expandafter\edef\csname MAC@\the\macname#1\endcsname
+ {\csname MAC@\the\macname.\the\paramno\endcsname}%
+ \fi\next}
+
+\def\parsemarg#1{\paramno=1\iparsemarg#1,;,}
+\def\iparsemarg#1,{%
+ \if#1;\let\next=\relax
+ \else \let\next=\iparsemarg
+ \expandafter\def\csname MAC@\the\macname.\the\paramno\endcsname{#1}%
+ \advance\paramno by 1%
+ \fi\next}
+
+% Argument substitution.
+% \ is active when the body is read and tokenized; it converts its
+% argument to a macro-argument name and expands it. We use | as a
+% temporary escape character.
+{
+\catcode`\|=0 |catcode`|\=|active
+|gdef\#1\{|csname MAC@|the|macname#1|endcsname}
+}
+
+% These sequences read and save the macro body. \parserbody absorbs
+% the @allow-recursion in its argument, and then falls through to
+% \parsebody.
+\def\parsebody{\begingroup\catcode`\\=\active\iparsebody}
+\def\parserbody#1{\parsebody}
+
+% \iparsebody reads the entire macro in as an argument. \ was made
+% active by \parsebody while the reading occurs.
+\long\def\iparsebody#1 \end macro% The space eats the final CR.
+{\endgroup % started in \parsebody
+\expandafter\def\csname MACb.\the\macname \endcsname{#1}}
+
+% These six sequences execute recursive and nonrecursive macros of no,
+% one, and many arguments. We need to distinguish one arg from many
+% args because a one-argument macro invoked with no arguments gets the
+% rest of the line as its argument.
+%
+% Please note that all macros are executed inside a group, so any
+% changes made by a macro (@set, etc.) won't stick.
+\def\dormacrona#1{\begingroup\macname={#1}\idomacro{}}
+\def\dormacrooa#1{\begingroup\macname={#1}\braceorline}
+\def\dormacro#1{\begingroup\macname={#1}\idomacro}
+
+\def\domacrona#1{\begingroup\macname={#1}\norecurse\idomacro{}}
+\def\domacrooa#1{\begingroup\macname={#1}\norecurse\braceorline}
+\def\domacro#1{\begingroup\macname={#1}\norecurse\idomacro}
+
+% some helpers:
+\def\norecurse{\cslet{\the\macname}{macsave@\the\macname}}
+\def\idomacro#1{\parsemarg{#1}\csname MACb.\the\macname\endcsname\endgroup}
+
+% \braceorline decides whether the next nonwhitespace character is a
+% {. If so it reads up to the closing }, if not, it reads the whole
+% line. Whatever was read is then fed to \idomacro. \parsebrace is
+% defined above, near \splitarg, in a strange catcode environment;
+% this is necessary because \futurelet freezes the catcode of the
+% peeked-at character.
+\def\braceorline{\bgroup
+\catcode`\{=\other\catcode`\}=\other \futurelet\nxt\ibraceorline}
+\def\ibraceorline{%
+\ifx\nxt\brace
+ \expandafter\parsebrace
+ \else
+ \egroup \expandafter\parsearg
+ \fi \idomacro}
+
+
+\message{cross references,}
+\newwrite\auxfile
+
+\newif\ifhavexrefs % True if xref values are known.
+\newif\ifwarnedxrefs % True if we warned once that they aren't known.
+
+% @inforef is relatively simple.
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+ node \samp{\ignorespaces#1{}}}
+
+% @setref{foo} defines a cross-reference point named foo.
+
+\def\setref#1{%
+\dosetq{#1-title}{Ytitle}%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Ysectionnumberandtype}}
+
+\def\unnumbsetref#1{%
+\dosetq{#1-title}{Ytitle}%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Ynothing}}
+
+\def\appendixsetref#1{%
+\dosetq{#1-title}{Ytitle}%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Yappendixletterandtype}}
+
+% \xref, \pxref, and \ref generate cross-references to specified points.
+% For \xrefX, #1 is the node name, #2 the name of the Info
+% cross-reference, #3 the printed node name, #4 the name of the Info
+% file, #5 the name of the printed manual. All but the node name can be
+% omitted.
+%
+\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
+\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
+\def\ref#1{\xrefX[#1,,,,,,,]}
+\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
+ \def\printedmanual{\ignorespaces #5}%
+ \def\printednodename{\ignorespaces #3}%
+ \setbox1=\hbox{\printedmanual}%
+ \setbox0=\hbox{\printednodename}%
+ \ifdim \wd0 = 0pt
+ % No printed node name was explicitly given.
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
+ % Use the node name inside the square brackets.
+ \def\printednodename{\ignorespaces #1}%
+ \else
+ % Use the actual chapter/section title appear inside
+ % the square brackets. Use the real section title if we have it.
+ \ifdim \wd1>0pt%
+ % It is in another manual, so we don't have it.
+ \def\printednodename{\ignorespaces #1}%
+ \else
+ \ifhavexrefs
+ % We know the real title if we have the xref values.
+ \def\printednodename{\refx{#1-title}{}}%
+ \else
+ % Otherwise just copy the Info node name.
+ \def\printednodename{\ignorespaces #1}%
+ \fi%
+ \fi
+ \fi
+ \fi
+ %
+ % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
+ % insert empty discretionaries after hyphens, which means that it will
+ % not find a line break at a hyphen in a node names. Since some manuals
+ % are best written with fairly long node names, containing hyphens, this
+ % is a loss. Therefore, we give the text of the node name again, so it
+ % is as if TeX is seeing it for the first time.
+ \ifdim \wd1 > 0pt
+ \putwordsection{} ``\printednodename'' in \cite{\printedmanual}%
+ \else
+ % _ (for example) has to be the character _ for the purposes of the
+ % control sequence corresponding to the node, but it has to expand
+ % into the usual \leavevmode...\vrule stuff for purposes of
+ % printing. So we \turnoffactive for the \refx-snt, back on for the
+ % printing, back off for the \refx-pg.
+ {\normalturnoffactive \refx{#1-snt}{}}%
+ \space [\printednodename],\space
+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+ \fi
+\endgroup}
+
+% \dosetq is the interface for calls from other macros
+
+% Use \normalturnoffactive so that punctuation chars such as underscore
+% and backslash work in node names. (\turnoffactive doesn't do \.)
+\def\dosetq#1#2{%
+ {\let\folio=0
+ \normalturnoffactive
+ \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%
+ \iflinks
+ \next
+ \fi
+ }%
+}
+
+% \internalsetq {foo}{page} expands into
+% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
+% When the aux file is read, ' is the escape character
+
+\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
+
+% Things to be expanded by \internalsetq
+
+\def\Ypagenumber{\folio}
+
+\def\Ytitle{\thissection}
+
+\def\Ynothing{}
+
+\def\Ysectionnumberandtype{%
+\ifnum\secno=0 \putwordChapter\xreftie\the\chapno %
+\else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno %
+\else \ifnum \subsubsecno=0 %
+\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno %
+\else %
+\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
+\fi \fi \fi }
+
+\def\Yappendixletterandtype{%
+\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}%
+\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno %
+\else \ifnum \subsubsecno=0 %
+\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno %
+\else %
+\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno %
+\fi \fi \fi }
+
+\gdef\xreftie{'tie}
+
+% Use TeX 3.0's \inputlineno to get the line number, for better error
+% messages, but if we're using an old version of TeX, don't do anything.
+%
+\ifx\inputlineno\thisisundefined
+ \let\linenumber = \empty % Non-3.0.
+\else
+ \def\linenumber{\the\inputlineno:\space}
+\fi
+
+% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
+% If its value is nonempty, SUFFIX is output afterward.
+
+\def\refx#1#2{%
+ \expandafter\ifx\csname X#1\endcsname\relax
+ % If not defined, say something at least.
+ \angleleft un\-de\-fined\angleright
+ \iflinks
+ \ifhavexrefs
+ \message{\linenumber Undefined cross reference `#1'.}%
+ \else
+ \ifwarnedxrefs\else
+ \global\warnedxrefstrue
+ \message{Cross reference values unknown; you must run TeX again.}%
+ \fi
+ \fi
+ \fi
+ \else
+ % It's defined, so just use it.
+ \csname X#1\endcsname
+ \fi
+ #2% Output the suffix in any case.
+}
+
+% This is the macro invoked by entries in the aux file.
+%
+\def\xrdef#1{\begingroup
+ % Reenable \ as an escape while reading the second argument.
+ \catcode`\\ = 0
+ \afterassignment\endgroup
+ \expandafter\gdef\csname X#1\endcsname
+}
+
+% Read the last existing aux file, if any. No error if none exists.
+\def\readauxfile{\begingroup
+ \catcode`\^^@=\other
+ \catcode`\^^A=\other
+ \catcode`\^^B=\other
+ \catcode`\^^C=\other
+ \catcode`\^^D=\other
+ \catcode`\^^E=\other
+ \catcode`\^^F=\other
+ \catcode`\^^G=\other
+ \catcode`\^^H=\other
+ \catcode`\^^K=\other
+ \catcode`\^^L=\other
+ \catcode`\^^N=\other
+ \catcode`\^^P=\other
+ \catcode`\^^Q=\other
+ \catcode`\^^R=\other
+ \catcode`\^^S=\other
+ \catcode`\^^T=\other
+ \catcode`\^^U=\other
+ \catcode`\^^V=\other
+ \catcode`\^^W=\other
+ \catcode`\^^X=\other
+ \catcode`\^^Z=\other
+ \catcode`\^^[=\other
+ \catcode`\^^\=\other
+ \catcode`\^^]=\other
+ \catcode`\^^^=\other
+ \catcode`\^^_=\other
+ \catcode`\@=\other
+ \catcode`\^=\other
+ % It was suggested to define this as 7, which would allow ^^e4 etc.
+ % in xref tags, i.e., node names. But since ^^e4 notation isn't
+ % supported in the main text, it doesn't seem desirable. Furthermore,
+ % that is not enough: for node names that actually contain a ^
+ % character, we would end up writing a line like this: 'xrdef {'hat
+ % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
+ % argument, and \hat is not an expandable control sequence. It could
+ % all be worked out, but why? Either we support ^^ or we don't.
+ %
+ % The other change necessary for this was to define \auxhat:
+ % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
+ % and then to call \auxhat in \setq.
+ %
+ \catcode`\~=\other
+ \catcode`\[=\other
+ \catcode`\]=\other
+ \catcode`\"=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\$=\other
+ \catcode`\#=\other
+ \catcode`\&=\other
+ \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
+ % Make the characters 128-255 be printing characters
+ {%
+ \count 1=128
+ \def\loop{%
+ \catcode\count 1=\other
+ \advance\count 1 by 1
+ \ifnum \count 1<256 \loop \fi
+ }%
+ }%
+ % The aux file uses ' as the escape (for now).
+ % Turn off \ as an escape so we do not lose on
+ % entries which were dumped with control sequences in their names.
+ % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
+ % Reference to such entries still does not work the way one would wish,
+ % but at least they do not bomb out when the aux file is read in.
+ \catcode`\{=1
+ \catcode`\}=2
+ \catcode`\%=\other
+ \catcode`\'=0
+ \catcode`\\=\other
+ %
+ \openin 1 \jobname.aux
+ \ifeof 1 \else
+ \closein 1
+ \input \jobname.aux
+ \global\havexrefstrue
+ \global\warnedobstrue
+ \fi
+ % Open the new aux file. TeX will close it automatically at exit.
+ \openout\auxfile=\jobname.aux
+\endgroup}
+
+
+% Footnotes.
+
+\newcount \footnoteno
+
+% The trailing space in the following definition for supereject is
+% vital for proper filling; pages come out unaligned when you do a
+% pagealignmacro call if that space before the closing brace is
+% removed. (Generally, numeric constants should always be followed by a
+% space to prevent strange expansion errors.)
+\def\supereject{\par\penalty -20000\footnoteno =0 }
+
+% @footnotestyle is meaningful for info output only.
+\let\footnotestyle=\comment
+
+\let\ptexfootnote=\footnote
+
+{\catcode `\@=11
+%
+% Auto-number footnotes. Otherwise like plain.
+\gdef\footnote{%
+ \global\advance\footnoteno by \@ne
+ \edef\thisfootno{$^{\the\footnoteno}$}%
+ %
+ % In case the footnote comes at the end of a sentence, preserve the
+ % extra spacing after we do the footnote number.
+ \let\@sf\empty
+ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
+ %
+ % Remove inadvertent blank space before typesetting the footnote number.
+ \unskip
+ \thisfootno\@sf
+ \footnotezzz
+}%
+
+% Don't bother with the trickery in plain.tex to not require the
+% footnote text as a parameter. Our footnotes don't need to be so general.
+%
+% Oh yes, they do; otherwise, @ifset and anything else that uses
+% \parseargline fail inside footnotes because the tokens are fixed when
+% the footnote is read. --karl, 16nov96.
+%
+\long\gdef\footnotezzz{\insert\footins\bgroup
+ % We want to typeset this text as a normal paragraph, even if the
+ % footnote reference occurs in (for example) a display environment.
+ % So reset some parameters.
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\ht\strutbox % top baseline for broken footnotes
+ \splitmaxdepth\dp\strutbox
+ \floatingpenalty\@MM
+ \leftskip\z@skip
+ \rightskip\z@skip
+ \spaceskip\z@skip
+ \xspaceskip\z@skip
+ \parindent\defaultparindent
+ %
+ % Hang the footnote text off the number.
+ \hang
+ \textindent{\thisfootno}%
+ %
+ % Don't crash into the line above the footnote text. Since this
+ % expands into a box, it must come within the paragraph, lest it
+ % provide a place where TeX can split the footnote.
+ \footstrut
+ \futurelet\next\fo@t
+}
+\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
+ \else\let\next\f@t\fi \next}
+\def\f@@t{\bgroup\aftergroup\@foot\let\next}
+\def\f@t#1{#1\@foot}
+\def\@foot{\strut\egroup}
+
+}%end \catcode `\@=11
+
+% Set the baselineskip to #1, and the lineskip and strut size
+% correspondingly. There is no deep meaning behind these magic numbers
+% used as factors; they just match (closely enough) what Knuth defined.
+%
+\def\lineskipfactor{.08333}
+\def\strutheightpercent{.70833}
+\def\strutdepthpercent {.29167}
+%
+\def\setleading#1{%
+ \normalbaselineskip = #1\relax
+ \normallineskip = \lineskipfactor\normalbaselineskip
+ \normalbaselines
+ \setbox\strutbox =\hbox{%
+ \vrule width0pt height\strutheightpercent\baselineskip
+ depth \strutdepthpercent \baselineskip
+ }%
+}
+
+% @| inserts a changebar to the left of the current line. It should
+% surround any changed text. This approach does *not* work if the
+% change spans more than two lines of output. To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change).
+%
+\def\|{%
+ % \vadjust can only be used in horizontal mode.
+ \leavevmode
+ %
+ % Append this vertical mode material after the current line in the output.
+ \vadjust{%
+ % We want to insert a rule with the height and depth of the current
+ % leading; that is exactly what \strutbox is supposed to record.
+ \vskip-\baselineskip
+ %
+ % \vadjust-items are inserted at the left edge of the type. So
+ % the \llap here moves out into the left-hand margin.
+ \llap{%
+ %
+ % For a thicker or thinner bar, change the `1pt'.
+ \vrule height\baselineskip width1pt
+ %
+ % This is the space between the bar and the text.
+ \hskip 12pt
+ }%
+ }%
+}
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt}
+
+% @image. We use the macros from epsf.tex to support this.
+% If epsf.tex is not installed and @image is used, we complain.
+%
+% Check for and read epsf.tex up front. If we read it only at @image
+% time, we might be inside a group, and then its definitions would get
+% undone and the next image would fail.
+\openin 1 = epsf.tex
+\ifeof 1 \else
+ \closein 1
+ % Do not bother showing banner with post-v2.7 epsf.tex (available in
+ % doc/epsf.tex until it shows up on ctan).
+ \def\epsfannounce{\toks0 = }%
+ \input epsf.tex
+\fi
+%
+\newif\ifwarnednoepsf
+\newhelp\noepsfhelp{epsf.tex must be installed for images to
+ work. It is also included in the Texinfo distribution, or you can get
+ it from ftp://ftp.tug.org/tex/epsf.tex.}
+%
+% Only complain once about lack of epsf.tex.
+\def\image#1{%
+ \ifx\epsfbox\undefined
+ \ifwarnednoepsf \else
+ \errhelp = \noepsfhelp
+ \errmessage{epsf.tex not found, images will be ignored}%
+ \global\warnednoepsftrue
+ \fi
+ \else
+ \imagexxx #1,,,\finish
+ \fi
+}
+%
+% Arguments to @image:
+% #1 is (mandatory) image filename; we tack on .eps extension.
+% #2 is (optional) width, #3 is (optional) height.
+% #4 is just the usual extra ignored arg for parsing this stuff.
+\def\imagexxx#1,#2,#3,#4\finish{%
+ % \epsfbox itself resets \epsf?size at each figure.
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+ \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+ % If the image is by itself, center it.
+ \ifvmode
+ \centerline{\epsfbox{#1.eps}}%
+ \else
+ \epsfbox{#1.eps}%
+ \fi
+}
+
+% End of control word definitions.
+
+
+\message{and turning on texinfo input format.}
+
+\def\openindices{%
+ \newindex{cp}%
+ \newcodeindex{fn}%
+ \newcodeindex{vr}%
+ \newcodeindex{tp}%
+ \newcodeindex{ky}%
+ \newcodeindex{pg}%
+}
+
+% Set some numeric style parameters, for 8.5 x 11 format.
+
+\hsize = 6in
+\hoffset = .25in
+\newdimen\defaultparindent \defaultparindent = 15pt
+\parindent = \defaultparindent
+\parskip 3pt plus 2pt minus 1pt
+\setleading{13.2pt}
+\advance\topskip by 1.2cm
+
+\chapheadingskip = 15pt plus 4pt minus 2pt
+\secheadingskip = 12pt plus 3pt minus 2pt
+\subsecheadingskip = 9pt plus 2pt minus 2pt
+
+% Prevent underfull vbox error messages.
+\vbadness=10000
+
+% Following George Bush, just get rid of widows and orphans.
+\widowpenalty=10000
+\clubpenalty=10000
+
+% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
+% using an old version of TeX, don't do anything. We want the amount of
+% stretch added to depend on the line length, hence the dependence on
+% \hsize. This makes it come to about 9pt for the 8.5x11 format.
+%
+\ifx\emergencystretch\thisisundefined
+ % Allow us to assign to \emergencystretch anyway.
+ \def\emergencystretch{\dimen0}%
+\else
+ \emergencystretch = \hsize
+ \divide\emergencystretch by 45
+\fi
+
+% Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25)
+\def\smallbook{
+ \global\chapheadingskip = 15pt plus 4pt minus 2pt
+ \global\secheadingskip = 12pt plus 3pt minus 2pt
+ \global\subsecheadingskip = 9pt plus 2pt minus 2pt
+ %
+ \global\lispnarrowing = 0.3in
+ \setleading{12pt}
+ \advance\topskip by -1cm
+ \global\parskip 2pt plus 1pt
+ \global\hsize = 5in
+ \global\vsize=7.5in
+ \global\tolerance=700
+ \global\hfuzz=1pt
+ \global\contentsrightmargin=0pt
+ \global\deftypemargin=0pt
+ \global\defbodyindent=.5cm
+ %
+ \global\pagewidth=\hsize
+ \global\pageheight=\vsize
+ %
+ \global\let\smalllisp=\smalllispx
+ \global\let\smallexample=\smalllispx
+ \global\def\Esmallexample{\Esmalllisp}
+}
+
+% Use @afourpaper to print on European A4 paper.
+\def\afourpaper{
+\global\tolerance=700
+\global\hfuzz=1pt
+\setleading{12pt}
+\global\parskip 15pt plus 1pt
+
+\global\vsize= 53\baselineskip
+\advance\vsize by \topskip
+%\global\hsize= 5.85in % A4 wide 10pt
+\global\hsize= 6.5in
+\global\outerhsize=\hsize
+\global\advance\outerhsize by 0.5in
+\global\outervsize=\vsize
+\global\advance\outervsize by 0.6in
+
+\global\pagewidth=\hsize
+\global\pageheight=\vsize
+}
+
+\bindingoffset=0pt
+\normaloffset=\hoffset
+\pagewidth=\hsize
+\pageheight=\vsize
+
+% Allow control of the text dimensions. Parameters in order: textheight;
+% textwidth; voffset; hoffset; binding offset; topskip.
+% All require a dimension;
+% header is additional; added length extends the bottom of the page.
+
+\def\changepagesizes#1#2#3#4#5#6{
+ \global\vsize= #1
+ \global\topskip= #6
+ \advance\vsize by \topskip
+ \global\voffset= #3
+ \global\hsize= #2
+ \global\outerhsize=\hsize
+ \global\advance\outerhsize by 0.5in
+ \global\outervsize=\vsize
+ \global\advance\outervsize by 0.6in
+ \global\pagewidth=\hsize
+ \global\pageheight=\vsize
+ \global\normaloffset= #4
+ \global\bindingoffset= #5}
+
+% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
+% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
+\def\afourlatex
+ {\global\tolerance=700
+ \global\hfuzz=1pt
+ \setleading{12pt}
+ \global\parskip 15pt plus 1pt
+ \advance\baselineskip by 1.6pt
+ \changepagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}
+ }
+
+% Use @afourwide to print on European A4 paper in wide format.
+\def\afourwide{\afourpaper
+\changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}}
+
+% Define macros to output various characters with catcode for normal text.
+\catcode`\"=\other
+\catcode`\~=\other
+\catcode`\^=\other
+\catcode`\_=\other
+\catcode`\|=\other
+\catcode`\<=\other
+\catcode`\>=\other
+\catcode`\+=\other
+\def\normaldoublequote{"}
+\def\normaltilde{~}
+\def\normalcaret{^}
+\def\normalunderscore{_}
+\def\normalverticalbar{|}
+\def\normalless{<}
+\def\normalgreater{>}
+\def\normalplus{+}
+
+% This macro is used to make a character print one way in ttfont
+% where it can probably just be output, and another way in other fonts,
+% where something hairier probably needs to be done.
+%
+% #1 is what to print if we are indeed using \tt; #2 is what to print
+% otherwise. Since all the Computer Modern typewriter fonts have zero
+% interword stretch (and shrink), and it is reasonable to expect all
+% typewriter fonts to have this, we can check that font parameter.
+%
+\def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi}
+
+% Turn off all special characters except @
+% (and those which the user can use as if they were ordinary).
+% Most of these we simply print from the \tt font, but for some, we can
+% use math or other variants that look better in normal text.
+
+\catcode`\"=\active
+\def\activedoublequote{{\tt\char34}}
+\let"=\activedoublequote
+\catcode`\~=\active
+\def~{{\tt\char126}}
+\chardef\hat=`\^
+\catcode`\^=\active
+\def^{{\tt \hat}}
+
+\catcode`\_=\active
+\def_{\ifusingtt\normalunderscore\_}
+% Subroutine for the previous macro.
+\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
+
+\catcode`\|=\active
+\def|{{\tt\char124}}
+\chardef \less=`\<
+\catcode`\<=\active
+\def<{{\tt \less}}
+\chardef \gtr=`\>
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+\catcode`\+=\active
+\def+{{\tt \char 43}}
+%\catcode 27=\active
+%\def^^[{$\diamondsuit$}
+
+% Set up an active definition for =, but don't enable it most of the time.
+{\catcode`\==\active
+\global\def={{\tt \char 61}}}
+
+\catcode`+=\active
+\catcode`\_=\active
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \everyjob (or @setfilename) turn them on.
+% \otherifyactive is called near the end of this file.
+\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
+\catcode`\@=0
+
+% \rawbackslashxx output one backslash character in current font
+\global\chardef\rawbackslashxx=`\\
+%{\catcode`\\=\other
+%@gdef@rawbackslashxx{\}}
+
+% \rawbackslash redefines \ as input to do \rawbackslashxx.
+{\catcode`\\=\active
+@gdef@rawbackslash{@let\=@rawbackslashxx }}
+
+% \normalbackslash outputs one backslash in fixed width font.
+\def\normalbackslash{{\tt\rawbackslashxx}}
+
+% Say @foo, not \foo, in error messages.
+\escapechar=`\@
+
+% \catcode 17=0 % Define control-q
+\catcode`\\=\active
+
+% Used sometimes to turn off (effectively) the active characters
+% even after parsing them.
+@def@turnoffactive{@let"=@normaldoublequote
+@let\=@realbackslash
+@let~=@normaltilde
+@let^=@normalcaret
+@let_=@normalunderscore
+@let|=@normalverticalbar
+@let<=@normalless
+@let>=@normalgreater
+@let+=@normalplus}
+
+@def@normalturnoffactive{@let"=@normaldoublequote
+@let\=@normalbackslash
+@let~=@normaltilde
+@let^=@normalcaret
+@let_=@normalunderscore
+@let|=@normalverticalbar
+@let<=@normalless
+@let>=@normalgreater
+@let+=@normalplus}
+
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+@otherifyactive
+
+% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
+% That is what \eatinput is for; after that, the `\' should revert to printing
+% a backslash.
+%
+@gdef@eatinput input texinfo{@fixbackslash}
+@global@let\ = @eatinput
+
+% On the other hand, perhaps the file did not have a `\input texinfo'. Then
+% the first `\{ in the file would cause an error. This macro tries to fix
+% that, assuming it is called before the first `\' could plausibly occur.
+% Also back turn on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
+%
+@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
+ @catcode`+=@active @catcode`@_=@active}
+
+% These look ok in all fonts, so just make them not special. The @rm below
+% makes sure that the current font starts out as the newly loaded cmr10
+@catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
+
+@textfonts
+@rm
+
+@c Local variables:
+@c page-delimiter: "^\\\\message"
+@c End:
diff --git a/doc/version.texi b/doc/version.texi
new file mode 100644
index 0000000..4e5b91a
--- /dev/null
+++ b/doc/version.texi
@@ -0,0 +1,3 @@
+@set UPDATED 6 May 2000
+@set EDITION 0.10.36
+@set VERSION 0.10.36
diff --git a/gettext.alias b/gettext.alias
new file mode 100644
index 0000000..c128e1a
--- /dev/null
+++ b/gettext.alias
@@ -0,0 +1,12 @@
+pinard@iro.umontreal.ca (=?ISO-8859-1?Q?Fran=E7ois_Pinard?=)
+pmiller@agso.gov.au (Peter Miller)
+marcus@sysc.pdx.edu (Marcus Daniels)
+ghazi@caip.rutgers.edu (Kaveh R. Ghazi)
+meyering@na-net.ornl.gov (Jim Meyering)
+tromey@cygnus.com (Tom Tromey)
+roland@gnu.ai.mit.edu (Roland McGrath)
+uwe@tirka.gun.de (Uwe Ohse)
+sanvila@ctv.es (Santiago Vila Doncel)
+fnf@ninemoons.com (Fred Fish)
+gufl0000@stud.uni-sb.de (Guido Flohr)
+esken@uni-muenster.de (Thomas Esken)
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..e9de238
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/intl/ChangeLog b/intl/ChangeLog
new file mode 100644
index 0000000..eee6387
--- /dev/null
+++ b/intl/ChangeLog
@@ -0,0 +1,1109 @@
+2000-05-06 Ulrich Drepper <drepper@redhat.com>
+
+ * dcigettext.c (DCIGETTEXT): Always define local variable `index'.
+ (mempcpy): Correct typo in parameter list.
+
+ * hash-string.h: Don't include <values.h>.
+
+ * loadmsgcat.c: Update from glibc version.
+
+1998-04-29 Paul Eggert <eggert@twinsun.com>
+
+ * Makefile.in (aliaspath): Don't put `.' at the end.
+
+1998-06-01 Ulrich Drepper <drepper@cygnus.com>
+
+ * localealias.c (read_alias_file): Undo last change.
+ * l10nflist.c (_nl_normalize_codeset): Likewise.
+ * loadinfo.h: Likewise.
+
+1998-05-23 Ulrich Drepper <drepper@cygnus.com>
+
+ * dcgettext.c: Don't use any alloca hack when C_ALLOCA is defined.
+
+1998-04-29 Ulrich Drepper <drepper@cygnus.com>
+
+ * intl/localealias.c (read_alias_file): Use unsigned char for
+ local variables. Remove unused variable tp.
+ * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char *
+ for type of codeset. For loosing Solaris systems.
+ * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset.
+ * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable
+ len if not needed.
+ Patches by Jim Meyering.
+
+1998-04-28 Ulrich Drepper <drepper@cygnus.com>
+
+ * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if
+ mmap is not supported.
+
+ * hash-string.h: Don't include <values.h>.
+
+1998-04-27 Ulrich Drepper <drepper@cygnus.com>
+
+ * textdomain.c: Use strdup is available.
+
+ * localealias.c: Define HAVE_MEMPCPY so that we can use this
+ function. Define and use semapahores to protect modfication of
+ global objects when compiling for glibc. Add code to allow
+ freeing alias table.
+
+ * l10nflist.c: Don't assume stpcpy not being a macro.
+
+ * gettextP.h: Define internal_function macri if not already done.
+ Use glibc byte-swap macros instead of defining SWAP when compiled
+ for glibc.
+ (struct loaded_domain): Add elements to allow unloading.
+
+ * Makefile.in (distclean): Don't remove libintl.h here.
+
+ * bindtextdomain.c: Carry over changes from glibc. Use strdup if
+ available.
+
+ * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal
+ functions. Add memory freeing code for glibc.
+
+ * dgettext.c: Update copyright.
+
+ * explodename.c: Include stdlib.h and string.h only if they exist.
+ Use strings.h eventually.
+
+ * finddomain.c: Mark internal functions. Use strdup if available.
+ Add memory freeing code for glibc.
+
+1997-10-10 20:00 Ulrich Drepper <drepper@cygnus.com>
+
+ * libgettext.h: Fix dummy textdomain and bindtextdomain macros.
+ They should return reasonable values.
+ Reported by Tom Tromey <tromey@cygnus.com>.
+
+1997-09-16 03:33 Ulrich Drepper <drepper@cygnus.com>
+
+ * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined.
+ * intlh.inst.in: Likewise.
+ Reported by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>.
+
+ * libintl.glibc: Update from current glibc version.
+
+1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com>
+
+ * intlh.inst.in: Reformat copyright.
+
+1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com>
+
+ * dcgettext.c (DCGETTEXT): Remove wrong comment.
+
+1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (install-data): Don't change directory to install.
+
+1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com>
+
+ * cat-compat.c: Fix copyright.
+
+ * localealias.c: Don't define strchr unless !HAVE_STRCHR.
+
+ * loadmsgcat.c: Update copyright. Fix typos.
+
+ * l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
+ (_nl_make_l10nflist): Handle sponsor and revision correctly.
+
+ * gettext.c: Update copyright.
+ * gettext.h: Likewise.
+ * hash-string.h: Likewise.
+
+ * finddomain.c: Remoave dead code. Define strchr only if
+ !HAVE_STRCHR.
+
+ * explodename.c: Include <sys/types.h>.
+
+ * explodename.c: Reformat copyright text.
+ (_nl_explode_name): Fix typo.
+
+ * dcgettext.c: Define and use __set_errno.
+ (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
+ not defined.
+
+ * bindtextdom.c: Pretty printing.
+
+1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com>
+
+ * dcgettext.c (guess_category_value): Don't depend on
+ HAVE_LC_MESSAGES. We don't need the macro here.
+ Patch by Bruno Haible <haible@ilog.fr>.
+
+ * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
+ macro. Instead use HAVE_LOCALE_NULL and define it when using
+ glibc, as in dcgettext.c.
+ Patch by Bruno Haible <haible@ilog.fr>.
+
+ * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois
+ Pinard.
+
+Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in: Implement handling of libtool.
+
+ * gettextP.h: Change data structures for use of generic lowlevel
+ i18n file handling.
+
+Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * textdomain.c: Put parentheses around arguments of memcpy macro
+ definition.
+ * localealias.c: Likewise.
+ * l10nflist.c: Likewise.
+ * finddomain.c: Likewise.
+ * bindtextdom.c: Likewise.
+ Reported by Thomas Esken.
+
+Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * textdomain.c: Move definition of `memcpy` macro to right
+ position.
+
+Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
+ bcopy if not already defined. Reported by Thomas Esken.
+ * bindtextdom.c: Likewise.
+ * l10nflist.c: Likewise.
+ * localealias.c: Likewise.
+ * textdomain.c: Likewise.
+
+Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (libdir): Change to use exec_prefix instead of
+ prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>.
+
+Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c (_nl_normalize_codeset): We convert to lower case,
+ so don't prepend uppercase `ISO' for only numeric arg.
+
+Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
+ definition of _GNU_SOURCE. Patch by Roland McGrath.
+
+ * Makefile.in (uninstall): Fix another bug with `for' loop and
+ empty arguments. Patch by Jim Meyering. Correct name os
+ uninstalled files: no intl- prefix anymore.
+
+ * Makefile.in (install-data): Again work around shells which
+ cannot handle mpty for list. Reported by Jim Meyering.
+
+Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (install): Split goal. Now depend on install-exec
+ and install-data.
+ (install-exec, install-data): New goals. Created from former
+ install goal.
+ Reported by Karl Berry.
+
+Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (MKINSTALLDIRS): New variable. Path to
+ mkinstalldirs script.
+ (install): use MKINSTALLDIRS variable or if the script is not present
+ try to find it in the $top_scrdir).
+
+Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c: Linux libc *partly* includes the argz_* functions.
+ Grr. Work around by renaming the static version and use macros
+ for renaming.
+
+Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c: Correct presence test macros of __argz_* functions.
+
+ * l10nflist.c: Include <argz.h> based on test of it instead when
+ __argz_* functions are available.
+ Reported by Andreas Schwab.
+
+Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * explodename.c, l10nflist.c: Define NULL for dumb systems.
+
+Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * intlh.inst.in, libgettext.h (dcgettext): Rename local variable
+ result to __result to prevent name clash.
+
+ * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
+ get prototype for stpcpy and strcasecmp.
+
+ * intlh.inst.in, libgettext.h: Move declaration of
+ `_nl_msg_cat_cntr' outside __extension__ block to prevent warning
+ from gcc's -Wnested-extern option.
+
+Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (install): Remove comment.
+
+Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (install): Work around for another Buglix stupidity.
+ Always use an `else' close for `if's. Reported by Nelson Beebe.
+
+ * Makefile.in (intlh.inst): Correct typo in phony rule.
+ Reported by Nelson Beebe.
+
+Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * dcgettext.c (read_alias_file): Rename variable alloca_list to
+ block_list as the macro calls assume.
+ Patch by Eric Backus.
+
+ * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
+ malloc.
+ (read_alias_file): Rename varriabe alloca_list to block_list as the
+ macro calls assume.
+ Patch by Eric Backus.
+
+ * l10nflist.c: Correct conditional for <argz.h> inclusion.
+ Reported by Roland McGrath.
+
+ * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not
+ all-@USE_NLS@.
+
+ * Makefile.in (install): intlh.inst comes from local dir, not
+ $(srcdir).
+
+ * Makefile.in (intlh.inst): Special handling of this goal. If
+ used in gettext, this is really a rul to construct this file. If
+ used in any other package it is defined as a .PHONY rule with
+ empty body.
+
+ * finddomain.c: Extract locale file information handling into
+ l10nfile.c. Rename local stpcpy__ function to stpcpy.
+
+ * dcgettext.c (stpcpy): Add local definition.
+
+ * l10nflist.c: Solve some portability problems. Patches partly by
+ Thomas Esken. Add local definition of stpcpy.
+
+Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * intlh.inst.in: Don't depend including <locale.h> on
+ HAVE_LOCALE_H. Instead configure must rewrite this fiile
+ depending on the result of the configure run.
+
+ * Makefile.in (install): libintl.inst is now called intlh.inst.
+ Add rules for updating intlh.inst from intlh.inst.in.
+
+ * libintl.inst: Renamed to intlh.inst.in.
+
+ * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
+ because gcc has __buitlin_alloca.
+ Reported by Roland McGrath.
+
+Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (installcheck): New goal to fulfill needs of
+ automake's distcheck.
+
+ * Makefile.in (install): Reorder commands so that VERSION is
+ found.
+
+ * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
+ @datadir@/gettext.
+ (COMSRCS): Add l10nfile.c.
+ (OBJECTS): Add l10nfile.o.
+ (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common).
+ (DISTFILE.gettext): Remove $(DISTFILES.common).
+ (all-gettext): Remove goal.
+ (install): If $(PACKAGE) = gettext install, otherwose do nothing. No
+ package but gettext itself should install libintl.h + headers.
+ (dist): Extend goal to work for gettext, too.
+ (dist-gettext): Remove goal.
+
+ * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
+
+Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * loadmsgcat.c (_nl_load_domain): Parameter is now comes from
+ find_l10nfile.
+
+Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c (__argz_next): Add definition.
+
+ * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
+ code. Use new l10nfile handling.
+
+ * localealias.c [!HAVE_ALLOCA]: Add code for handling missing
+ alloca code.
+
+ * l10nflist.c: Initial revision.
+
+Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all-gettext): New goal. Same as all-yes.
+
+Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de>
+
+ * Makefile.in (gettextsrcdir): Define using @datadir@.
+
+Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c: Include <ctype.h>. Reported by Roland McGrath.
+
+Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
+ with external declaration.
+
+Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all-no): Rename from all_no.
+
+Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware>
+
+ * gettextP.h [loaded_domain]: Array `successor' must now contain up
+ to 63 elements (because of codeset name normalization).
+
+ * finddomain.c: Implement codeset name normalization.
+
+Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all): Define to `all-@USE_NLS@'.
+ (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
+ is former all.
+
+Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com>
+
+ * localealias.c (alias_compare): Increment string pointers in loop
+ of strcasecmp replacement.
+
+Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): Who commented this goal out ? :-)
+
+Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware>
+
+ * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls
+ should not effect it because a missing catalog is no error.
+ Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>.
+
+Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (Makefile): Explicitly use $(SHELL) for running
+ shell scripts.
+
+Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * Makefile.in (install-src): Only install library and header when
+ we use the own implementation. Don't do it when using the
+ system's gettext or catgets functions.
+
+ * dcgettext.c (find_msg): Must not swap domain->hash_size here.
+
+Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c, libintl.inst, libgettext.h, hash-string.h,
+ gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
+ Use PARAMS instead of __P. Suggested by Roland McGrath.
+
+Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu>
+
+ * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
+ !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
+
+Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src):
+ Install libintl.inst instead of libintl.h.install.
+
+Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu>
+
+ * cat-compat.c (textdomain):
+ Reverse order in which files are tried you load. First
+ try local file, when this failed absolute path.
+
+Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
+
+ * cat-compat.c (bindtextdomain): Add missing { }.
+
+Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware>
+
+ * libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
+
+ * Makefile.in:
+ Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
+
+Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca>
+
+ * hash-string.h: Capitalize arguments of macros.
+
+Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Prevent files names longer than 13
+ characters. libintl.h.glibc->libintl.glibc,
+ libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
+
+Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com>
+
+ * dcgettext.c: Fix bug in preprocessor conditionals.
+
+Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
+
+ * libgettext.h: Solaris cc does not understand
+ #if !SYMBOL1 && !SYMBOL2. Sad but true.
+
+Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware>
+
+ * hash-string.h (hash_string):
+ Fix for machine with >32 bit `unsigned long's.
+
+ * dcgettext.c (DCGETTEXT):
+ Fix horrible bug in loop for alternative translation.
+
+Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware>
+
+ * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
+ Some further simplifications in message number generation.
+
+Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware>
+
+ * libintl.h.glibc: Use __const instead of const in prototypes.
+
+ * Makefile.in (install-src):
+ Install libintl.h.install instead of libintl.h. This
+ is a stripped-down version. Suggested by Peter Miller.
+
+ * libintl.h.install, libintl.h.glibc: Initial revision.
+
+ * localealias.c (_nl_expand_alias, read_alias_file):
+ Protect prototypes in type casts by __P.
+
+Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware>
+
+ * hash-string.h: Correct prototype for hash_string.
+
+Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware>
+
+ * hash-string.h (hash_string): Add prototype.
+
+ * gettextP.h: Fix copyright.
+ (SWAP): Add prototype.
+
+Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c (read_alias_file): Forgot sizeof.
+ Avoid calling *printf function. This introduces a big overhead.
+ Patch by Roland McGrath.
+
+Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
+
+ * finddomain.c (stpcpy):
+ Define substitution function local. The macro was to flaky.
+
+ * cat-compat.c: Fix typo.
+
+ * xopen-msg.sed, linux-msg.sed:
+ While bringing message number to right place only accept digits.
+
+ * linux-msg.sed, xopen-msg.sed: Now that the counter does not have
+ leading 0s we don't need to remove them. Reported by Marcus
+ Daniels.
+
+ * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
+ dependency. Reported by Marcus Daniels.
+
+ * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
+ Generally cleanup using #if instead of #ifndef.
+
+ * Makefile.in: Correct typos in comment. By Franc,ois Pinard.
+
+Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): Don't install libintl.h and libintl.a
+ if we use an available gettext implementation.
+
+Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware>
+
+ * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
+ by Franc,ois Pinard.
+
+ * libgettext.h: Use #if instead of #ifdef/#ifndef.
+
+ * finddomain.c:
+ Comments describing what has to be done should start with FIXME.
+
+Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
+ DISTFILES.common names the files common to both dist goals.
+ DISTFILES.gettext are the files only distributed in GNU gettext.
+
+Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware>
+
+ * dcgettext.c (DCGETTEXT): Correct searching in derived locales.
+ This was necessary since a change in _nl_find_msg several weeks
+ ago. I really don't know this is still not fixed.
+
+Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware>
+
+ * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
+ might mark a special condition.
+
+ * finddomain.c (make_entry_rec): Don't make illegal entry as decided.
+
+ * Makefile.in (dist): Suppress error message when ln failed.
+ Get files from $(srcdir) explicitly.
+
+ * libgettext.h (gettext_const): Rename to gettext_noop.
+
+Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (make_entry_rec):
+ Protect against wrong locale names by testing mask.
+
+ * libgettext.h (gettext_const): Add macro definition.
+ Capitalize macro arguments.
+
+Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (_nl_find_domain):
+ Test for pointer != NULL before accessing value.
+ Reported by Tom Tromey.
+
+ * gettext.c (NULL):
+ Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
+
+Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware>
+
+ * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
+
+Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware>
+
+ * libgettext.h: Disable dcgettext optimization for Solaris 2.3.
+
+ * localealias.c (alias_compare):
+ Peter Miller reported that tolower in some systems is
+ even dumber than I thought. Protect call by `isupper'.
+
+Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (libdir, includedir): New variables.
+ (install-src): Install libintl.a and libintl.h in correct dirs.
+
+Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
+
+ * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
+
+ * localealias.c:
+ Fix typo and superflous test. Reported by Christian von Roques.
+
+Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (_nl_find_domain):
+ Correct some remainder from the pre-CEN syntax. Now
+ we don't have a constant number of successors anymore.
+
+Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Add libintl.h.glibc.
+
+ * Makefile.in (dist-libc): Add goal for packing sources for glibc.
+ (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
+
+ * loadmsgcat.c: Forget to continue #if line.
+
+ * localealias.c:
+ [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
+ space clean.
+
+ * dcgettext.c, finddomain.c: Better comment to last change.
+
+ * loadmsgcat.c:
+ [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
+ __fstat, __open, __close, __read, __mmap, and __munmap resp
+ to keep ANSI C name space clean.
+
+ * finddomain.c:
+ [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
+
+ * dcgettext.c:
+ [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
+ keep ANSI C name space clean.
+
+ * libgettext.h:
+ Include sys/types.h for those old SysV systems out there.
+ Reported by Francesco Potorti`.
+
+ * loadmsgcat.c (use_mmap): Define if compiled for glibc.
+
+ * bindtextdom.c: Include all those standard headers
+ unconditionally if _LIBC is defined.
+
+ * finddomain.c: Fix 2 times defiend -> defined.
+
+ * textdomain.c: Include libintl.h instead of libgettext.h when
+ compiling for glibc. Include all those standard headers
+ unconditionally if _LIBC is defined.
+
+ * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
+
+ * gettext.c:
+ Include libintl.h instead of libgettext.h when compiling for glibc.
+ Get NULL from stddef.h if we compile for glibc.
+
+ * finddomain.c: Include libintl.h instead of libgettext.h when
+ compiling for glibc. Include all those standard headers
+ unconditionally if _LIBC is defined.
+
+ * dcgettext.c: Include all those standard headers unconditionally
+ if _LIBC is defined.
+
+ * dgettext.c: If compiled in glibc include libintl.h instead of
+ libgettext.h.
+ (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
+
+ * dcgettext.c: If compiled in glibc include libintl.h instead of
+ libgettext.h.
+ (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
+
+ * bindtextdom.c:
+ If compiled in glibc include libintl.h instead of libgettext.h.
+
+Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
+ Reported by Marcus Daniels.
+
+ * cat-compat.c (bindtextdomain):
+ String used in putenv must not be recycled.
+ Reported by Marcus Daniels.
+
+ * libgettext.h (__USE_GNU_GETTEXT):
+ Additional symbol to signal that we use GNU gettext
+ library.
+
+ * cat-compat.c (bindtextdomain):
+ Fix bug with the strange stpcpy replacement.
+ Reported by Nelson Beebe.
+
+Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware>
+
+ * cat-compat.c: Include <string.h> for stpcpy prototype.
+
+ * localealias.c (read_alias_file):
+ While expand strdup code temporary variable `cp' hided
+ higher level variable with same name. Rename to `tp'.
+
+ * textdomain.c (textdomain):
+ Avoid warning by using temporary variable in strdup code.
+
+ * finddomain.c (_nl_find_domain): Remove unused variable `application'.
+
+Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c (alias_compare):
+ Use strcasecmp() only if available. Else use
+ implementation in place.
+
+ * intl-compat.c:
+ Wrapper functions now call *__ functions instead of __*.
+
+ * libgettext.h: Declare prototypes for *__ functions instead for __*.
+
+ * cat-compat.c, loadmsgcat.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+
+ * bindtextdom.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+ Rename to bindtextdomain__ if not used in GNU C Library.
+
+ * dgettext.c:
+ Rename function to dgettext__ if not used in GNU C Library.
+
+ * gettext.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+ Functions now called gettext__ if not used in GNU C Library.
+
+ * dcgettext.c, localealias.c, textdomain.c, finddomain.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+
+Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c: Correct some bugs in handling of CEN standard
+ locale definitions.
+
+Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c: Implement CEN syntax.
+
+ * gettextP.h (loaded_domain): Extend number of successors to 31.
+
+Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (aliaspath): Remove path to X11 locale dir.
+
+ * Makefile.in: Make install-src depend on install. This helps
+ gettext to install the sources and other packages can use the
+ install goal.
+
+Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (uninstall): Remove stuff installed by install-src.
+
+Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware>
+
+ * VERSION.in: Initial revision.
+
+ * Makefile.in (DISTFILES):
+ Add VERSION file. This is not necessary for gettext, but
+ for other packages using this library.
+
+Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware>
+
+ * gettextP.h (_nl_find_domain):
+ New prototype after changing search strategy.
+
+ * finddomain.c (_nl_find_domain):
+ We now try only to find a specified catalog. Fall back to other
+ catalogs listed in the locale list is now done in __dcgettext.
+
+ * dcgettext.c (__dcgettext):
+ Now we provide message fall back even to different languages.
+ I.e. if a message is not available in one language all the other
+ in the locale list a tried. Formerly fall back was only possible
+ within one language. Implemented by moving one loop from
+ _nl_find_domain to here.
+
+Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (gettextsrcdir):
+ Directory where source of GNU gettext library are made
+ available.
+ (INSTALL, INSTALL_DATA): Programs used for installing sources.
+ (gettext-src): New. Rule to install GNU gettext sources for use in
+ gettextize shell script.
+
+Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware>
+
+ * loadmsgcat.c (_nl_load_domain):
+ Use mmap for loading only when munmap function is
+ also available.
+
+ * Makefile.in (install): Depend on `all' goal.
+
+Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c (read_alias_file):
+ Do not overwrite '\n' when terminating alias value string.
+
+ * localealias.c (read_alias_file):
+ Handle long lines. Ignore the rest not fitting in
+ the buffer after the initial `fgets' call.
+
+Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware>
+
+ * gettextP.h (_nl_load_domain):
+ Add prototype, replacing prototype for _nl_load_msg_cat.
+
+ * finddomain.c (_nl_find_domain):
+ Remove unneeded variable filename and filename_len.
+ (expand_alias): Remove prototype because functions does not
+ exist anymore.
+
+ * localealias.c (read_alias_file):
+ Change type of fname_len parameter to int.
+ (xmalloc): Add prototype.
+
+ * loadmsgcat.c: Better prototypes for xmalloc.
+
+Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (_nl_find_domain):
+ Allow alias name to be constructed from the four components.
+
+ * Makefile.in (aliaspath): New variable. Set to preliminary value.
+ (SOURCES): Add localealias.c.
+ (OBJECTS): Add localealias.o.
+
+ * gettextP.h: Add prototype for _nl_expand_alias.
+
+ * finddomain.c: Aliasing handled in intl/localealias.c.
+
+ * localealias.c: Aliasing for locale names.
+
+ * bindtextdom.c: Better prototypes for xmalloc and xstrdup.
+
+Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): gettext.perl is now found in misc/.
+
+ * cat-compat.c (bindtextdomain):
+ Correct implementation. dirname parameter was not used.
+ Reported by Marcus Daniels.
+
+ * gettextP.h (loaded_domain):
+ New fields `successor' and `decided' for oo, lazy
+ message handling implementation.
+
+ * dcgettext.c:
+ Adopt for oo, lazy message handliing.
+ Now we can inherit translations from less specific locales.
+ (find_msg): New function.
+
+ * loadmsgcat.c, finddomain.c:
+ Complete rewrite. Implement oo, lazy message handling :-).
+ We now have an additional environment variable `LANGUAGE' with
+ a higher priority than LC_ALL for the LC_MESSAGE locale.
+ Here we can set a colon separated list of specifications each
+ of the form `language[_territory[.codeset]][@modifier]'.
+
+Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (unistd.h):
+ Include to get _PC_PATH_MAX defined on system having it.
+
+Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (stpcpy): Include prototype.
+
+ * Makefile.in (dist): Remove `copying instead' message.
+
+Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (ID, TAGS): Do not use $^.
+
+Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (TAGS, ID): Use $^ as command argument.
+ (TAGS): Give etags -o option t write to current directory,
+ not $(srcdir).
+ (ID): Use $(srcdir) instead os $(top_srcdir)/src.
+ (distclean): Remove ID.
+
+Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (gnulocaledir):
+ New variable, always using share/ for data directory.
+ (DEFS): Add GNULOCALEDIR, used in finddomain.c.
+
+ * finddomain.c (_nl_default_dirname):
+ Set to GNULOCALEDIR, because it always has to point
+ to the directory where GNU gettext Library writes it to.
+
+ * intl-compat.c (textdomain, bindtextdomain):
+ Undefine macros before function definition.
+
+Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware>
+
+ * libgettext.h (_LIBINTL_H):
+ Protect definition in case where this file is included as
+ libgettext.h on Solaris machines. Add comment about this.
+
+Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware>
+
+ * intl-compat.c (textdomain): Correct typo.
+
+Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware>
+
+ * dcgettext.c (dcgettext): Function now called __dcgettext.
+
+ * dgettext.c (dgettext): Now called __dgettext and calls
+ __dcgettext.
+
+ * gettext.c (gettext):
+ Function now called __gettext and calls __dgettext.
+
+ * textdomain.c (textdomain): Function now called __textdomain.
+
+ * bindtextdom.c (bindtextdomain): Function now called
+ __bindtextdomain.
+
+ * intl-compat.c: Initial revision.
+
+ * Makefile.in (SOURCES): Add intl-compat.c.
+ (OBJECTS): We always compile the GNU gettext library functions.
+ OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
+ and intl-compat.o.
+ (GETTOBJS): Contains now only intl-compat.o.
+
+ * libgettext.h:
+ Re-include protection matches dualistic character of libgettext.h.
+ For all functions in GNU gettext library define __ counter part.
+
+ * finddomain.c (strchr): Define as index if not found in C library.
+ (_nl_find_domain): For relative paths paste / in between.
+
+Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware>
+
+ * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
+
+ * xopen-msg.sed: Fix bug with `msgstr ""' lines.
+ A little bit better comments.
+
+Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in:
+ po-mode.el, makelinks, combine-sh are now found in ../misc.
+
+ * po-mode.el, makelinks, combine-sh, elisp-comp:
+ Moved to ../misc/.
+
+ * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
+
+Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (INSTALL, INSTALL_DATA): New variables.
+ (install-data, uninstall): Install/uninstall .elc file.
+
+ * po-mode.el (Installation comment):
+ Add .pox as possible extension of .po files.
+
+Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware>
+
+ * elisp-comp: Complete new version by Franc,ois: This does not
+ fail when not compiling in the source directory.
+
+Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (../po/cat-id-tbl.o):
+ Use $(MAKE) instead of make for recursive make.
+
+ * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
+ (install-exec): Add missing dummy goal.
+ (install-data, uninstall): @ in multi-line shell command at
+ beginning, not in front of echo. Reported by Eric Backus.
+
+Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES):
+ Rename libgettext.perl to gettext.perl to fit in 14 chars
+ file systems.
+
+ * gettext.perl:
+ Rename to gettext.perl to fit in 14 chars file systems.
+
+Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware>
+
+ * cat-compat.c: If !STDC_HEADERS try to include malloc.h.
+
+Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware>
+
+ * po2tbl.sed.in: Pretty printing.
+
+ * linux-msg.sed, xopen-msg.sed:
+ Correct bugs with handling substitute flags in branches.
+
+ * hash-string.h (hash_string):
+ Old K&R compilers don't under stand `unsigned char'.
+
+ * gettext.h (nls_uint32):
+ Some old K&R compilers (eg HP) don't understand `unsigned int'.
+
+ * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
+
+Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (ELCFILES): New variable.
+ (DISTFILES): Add elisp-comp.
+ Add implicit rule for .el -> .elc compilation.
+ (install-data): install $ELCFILES
+ (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
+
+ * elisp-comp: Initial revision
+
+Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in:
+ cat-id-tbl.c is now found in po/. This enables us to use an identical
+ intl/ directory in all packages.
+
+ * dcgettext.c (dcgettext): hashing does not work for table size <= 2.
+
+ * textdomain.c: fix typo (#if def -> #if defined)
+
+Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (stamp-cat-id): use top_srcdir to address source files
+ (DISTFILES,distclean): move tupdate.perl to src/
+
+ * po-to-tbl.sed.in:
+ add additional jump to clear change flag to recognize multiline strings
+
+Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware>
+
+ * textdomain.c: Protect inclusion of stdlib.h and string.h.
+
+ * loadmsgcat.c: Protect inclusion of stdlib.h.
+
+ * libgettext.h: Protect inclusion of locale.h.
+ Allow use in C++ programs.
+ Define NULL is not happened already.
+
+ * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
+ po-to-tbl.sed.
+ (distclean): remove po-to-tbl.sed and tupdate.perl.
+
+ * tupdate.perl.in: Substitute Perl path even in exec line.
+ Don't include entries without translation from old .po file.
+
+Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware>
+
+ * tupdate.perl.in: use "Updated: " in msgid "".
+
+ * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
+ Define getenv if !__STDC__.
+
+ * bindtextdom.c: Protect stdlib.h and string.h inclusion.
+ Define free if !__STDC__.
+
+ * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
+ Define free if !__STDC__.
+
+ * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
+
+Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
+ Remove unneeded $(srcdir) from Makefile.in dependency.
+
+ * makelinks: Add copyright and short description.
+
+ * po-mode.el: Last version for 0.7.
+
+ * tupdate.perl.in: Fix die message.
+
+ * dcgettext.c: Protect include of string.h.
+
+ * gettext.c: Protect include of stdlib.h and further tries to get NULL.
+
+ * finddomain.c: Some corrections in includes.
+
+ * Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
+
+ * po-to-tbl.sed: Adopt for new .po file format.
+
+ * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
+
+Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware>
+
+ * tupdate.perl.in: Complete rewrite for new .po file format.
+
+Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware>
+
+ * First official release. This directory contains all the code
+ needed to internationalize own packages. It provides functions
+ which allow to use the X/Open catgets function with an interface
+ like the Uniforum gettext function. For system which does not
+ have neither of those a complete implementation is provided.
diff --git a/intl/Makefile.in b/intl/Makefile.in
new file mode 100644
index 0000000..8313aac
--- /dev/null
+++ b/intl/Makefile.in
@@ -0,0 +1,220 @@
+# Makefile for directory with message catalog handling in GNU NLS Utilities.
+# Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+transform = @program_transform_name@
+libdir = $(exec_prefix)/lib
+includedir = $(prefix)/include
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = @datadir@/gettext/intl
+aliaspath = $(localedir)
+subdir = intl
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+l = @l@
+
+AR = ar
+CC = @CC@
+LIBTOOL = @LIBTOOL@
+RANLIB = @RANLIB@
+YACC = @YACC@ -d
+YFLAGS = --name-prefix=__gettext
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
+-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+HEADERS = $(COMHDRS) libgettext.h loadinfo.h
+COMHDRS = gettext.h gettextP.h hash-string.h
+SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
+COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
+finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
+explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y
+OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
+finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
+explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
+plural.$lo
+CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
+GETTOBJS = intl-compat.$lo
+DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
+xopen-msg.sed $(HEADERS) $(SOURCES)
+DISTFILES.normal = VERSION
+DISTFILES.gettext = libintl.glibc intlh.inst.in plural.c
+
+.SUFFIXES:
+.SUFFIXES: .y .c .o .lo
+.c.o:
+ $(COMPILE) $<
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) $<
+
+.y.c:
+ $(YACC) $(YFLAGS) --output $@ $^
+
+INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
+
+all: all-@USE_INCLUDED_LIBINTL@
+
+all-yes: libintl.$la intlh.inst
+all-no:
+
+libintl.a: $(OBJECTS)
+ rm -f $@
+ $(AR) cru $@ $(OBJECTS)
+ $(RANLIB) $@
+
+libintl.la: $(OBJECTS)
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
+ -version-info 1:0 -rpath $(libdir)
+
+../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
+ cd ../po && $(MAKE) cat-id-tbl.$lo
+
+check: all
+
+# This installation goal is only used in GNU gettext. Packages which
+# only use the library should use install instead.
+
+# We must not install the libintl.h/libintl.a files if we are on a
+# system which has the gettext() function in its C library or in a
+# separate library or use the catgets interface. A special case is
+# where configure found a previously installed GNU gettext library.
+# If you want to use the one which comes with this version of the
+# package, you have to use `configure --with-included-gettext'.
+install: install-exec install-data
+install-exec: all
+ if test "$(PACKAGE)" = "gettext" \
+ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(libdir) $(includedir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
+ fi; \
+ $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
+ $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
+ else \
+ : ; \
+ fi
+install-data: all
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
+ dists="$(DISTFILES.common)"; \
+ for file in $$dists; do \
+ $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ dists="$(DISTFILES.common)"; \
+ for file in $$dists; do \
+ rm -f $(gettextsrcdir)/$$file; \
+ done
+
+info dvi:
+
+$(OBJECTS): ../config.h libgettext.h
+bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
+dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
+
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+
+id: ID
+
+ID: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+
+
+mostlyclean:
+ rm -f *.a *.o *.lo core core.* plusral.h
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile ID TAGS po2msg.sed po2tbl.sed
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+
+# GNU gettext needs not contain the file `VERSION' but contains some
+# other files which should not be distributed in other packages.
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: Makefile $(DISTFILES)
+ if test "$(PACKAGE)" = gettext; then \
+ additional="$(DISTFILES.gettext)"; \
+ else \
+ additional="$(DISTFILES.normal)"; \
+ fi; \
+ for file in $(DISTFILES.common) $$additional; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+dist-libc:
+ tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
+
+Makefile: Makefile.in ../config.status
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# The dependency for intlh.inst is different in gettext and all other
+# packages. Because we cannot you GNU make features we have to solve
+# the problem while rewriting Makefile.in.
+@GT_YES@intlh.inst: intlh.inst.in ../config.status
+@GT_YES@ cd .. \
+@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
+@GT_YES@ $(SHELL) ./config.status
+@GT_NO@.PHONY: intlh.inst
+@GT_NO@intlh.inst:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
new file mode 100644
index 0000000..3d49344
--- /dev/null
+++ b/intl/bindtextdom.c
@@ -0,0 +1,363 @@
+/* Implementation of the bindtextdomain(3) function
+ Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+#include "gettext.h"
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications. */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Contains the default location of the message catalogs. */
+extern const char _nl_default_dirname[];
+
+/* List with bindings of specific domains. */
+extern struct binding *_nl_domain_bindings;
+
+/* Lock variable to protect the global data in the gettext implementation. */
+__libc_rwlock_define (extern, _nl_state_lock)
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define BINDTEXTDOMAIN __bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
+# ifndef strdup
+# define strdup(str) __strdup (str)
+# endif
+#else
+# define BINDTEXTDOMAIN bindtextdomain__
+# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
+#endif
+
+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
+ to be used for the DOMAINNAME message catalog.
+ If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
+ modified, only the current value is returned.
+ If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
+ modified nor returned. */
+static void
+set_binding_values (domainname, dirnamep, codesetp)
+ const char *domainname;
+ const char **dirnamep;
+ const char **codesetp;
+{
+ struct binding *binding;
+ int modified;
+
+ /* Some sanity checks. */
+ if (domainname == NULL || domainname[0] == '\0')
+ {
+ if (dirnamep)
+ *dirnamep = NULL;
+ if (codesetp)
+ *codesetp = NULL;
+ return;
+ }
+
+ __libc_rwlock_wrlock (_nl_state_lock);
+
+ modified = 0;
+
+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+ {
+ int compare = strcmp (domainname, binding->domainname);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It is not in the list. */
+ binding = NULL;
+ break;
+ }
+ }
+
+ if (binding != NULL)
+ {
+ if (dirnamep)
+ {
+ const char *dirname = *dirnamep;
+
+ if (dirname == NULL)
+ /* The current binding has be to returned. */
+ *dirnamep = binding->dirname;
+ else
+ {
+ /* The domain is already bound. If the new value and the old
+ one are equal we simply do nothing. Otherwise replace the
+ old binding. */
+ char *result = binding->dirname;
+ if (strcmp (dirname, result) != 0)
+ {
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ result = (char *) _nl_default_dirname;
+ else
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (dirname);
+#else
+ size_t len = strlen (dirname) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result != NULL, 1))
+ memcpy (result, dirname, len);
+#endif
+ }
+
+ if (__builtin_expect (result != NULL, 1))
+ {
+ if (binding->dirname != _nl_default_dirname)
+ free (binding->dirname);
+
+ binding->dirname = result;
+ modified = 1;
+ }
+ }
+ *dirnamep = result;
+ }
+ }
+
+ if (codesetp)
+ {
+ const char *codeset = *codesetp;
+
+ if (codeset == NULL)
+ /* The current binding has be to returned. */
+ *codesetp = binding->codeset;
+ else
+ {
+ /* The domain is already bound. If the new value and the old
+ one are equal we simply do nothing. Otherwise replace the
+ old binding. */
+ char *result = binding->codeset;
+ if (result == NULL || strcmp (codeset, result) != 0)
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (codeset);
+#else
+ size_t len = strlen (codeset) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result != NULL, 1))
+ memcpy (result, codeset, len);
+#endif
+
+ if (__builtin_expect (result != NULL, 1))
+ {
+ if (binding->codeset != NULL)
+ free (binding->codeset);
+
+ binding->codeset = result;
+ modified = 1;
+ }
+ }
+ *codesetp = result;
+ }
+ }
+ }
+ else if ((dirnamep == NULL || *dirnamep == NULL)
+ && (codesetp == NULL || *codesetp == NULL))
+ {
+ /* Simply return the default values. */
+ if (dirnamep)
+ *dirnamep = _nl_default_dirname;
+ if (codesetp)
+ *codesetp = NULL;
+ }
+ else
+ {
+ /* We have to create a new binding. */
+ size_t len = strlen (domainname) + 1;
+ struct binding *new_binding =
+ (struct binding *) malloc (sizeof (*new_binding) + len);
+
+ if (__builtin_expect (new_binding == NULL, 0))
+ goto failed;
+
+ memcpy (new_binding->domainname, domainname, len);
+
+ if (dirnamep)
+ {
+ const char *dirname = *dirnamep;
+
+ if (dirname == NULL)
+ /* The default value. */
+ dirname = _nl_default_dirname;
+ else
+ {
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ dirname = _nl_default_dirname;
+ else
+ {
+ char *result;
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (dirname);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_dirname;
+#else
+ size_t len = strlen (dirname) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_dirname;
+ memcpy (result, dirname, len);
+#endif
+ dirname = result;
+ }
+ }
+ *dirnamep = dirname;
+ new_binding->dirname = (char *) dirname;
+ }
+ else
+ /* The default value. */
+ new_binding->dirname = (char *) _nl_default_dirname;
+
+ if (codesetp)
+ {
+ const char *codeset = *codesetp;
+
+ if (codeset != NULL)
+ {
+ char *result;
+
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (codeset);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_codeset;
+#else
+ size_t len = strlen (codeset) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_codeset;
+ memcpy (result, codeset, len);
+#endif
+ codeset = result;
+ }
+ *codesetp = codeset;
+ new_binding->codeset = (char *) codeset;
+ }
+ else
+ new_binding->codeset = NULL;
+
+ /* Now enqueue it. */
+ if (_nl_domain_bindings == NULL
+ || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
+ {
+ new_binding->next = _nl_domain_bindings;
+ _nl_domain_bindings = new_binding;
+ }
+ else
+ {
+ binding = _nl_domain_bindings;
+ while (binding->next != NULL
+ && strcmp (domainname, binding->next->domainname) > 0)
+ binding = binding->next;
+
+ new_binding->next = binding->next;
+ binding->next = new_binding;
+ }
+
+ modified = 1;
+
+ /* Here we deal with memory allocation failures. */
+ if (0)
+ {
+ failed_codeset:
+ if (new_binding->dirname != _nl_default_dirname)
+ free (new_binding->dirname);
+ failed_dirname:
+ free (new_binding);
+ failed:
+ if (dirnamep)
+ *dirnamep = NULL;
+ if (codesetp)
+ *codesetp = NULL;
+ }
+ }
+
+ /* If we modified any binding, we flush the caches. */
+ if (modified)
+ ++_nl_msg_cat_cntr;
+
+ __libc_rwlock_unlock (_nl_state_lock);
+}
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+char *
+BINDTEXTDOMAIN (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ set_binding_values (domainname, &dirname, NULL);
+ return (char *) dirname;
+}
+
+/* Specify the character encoding in which the messages from the
+ DOMAINNAME message catalog will be returned. */
+char *
+BIND_TEXTDOMAIN_CODESET (domainname, codeset)
+ const char *domainname;
+ const char *codeset;
+{
+ set_binding_values (domainname, NULL, &codeset);
+ return (char *) codeset;
+}
+
+#ifdef _LIBC
+/* Aliases for function names in GNU C Library. */
+weak_alias (__bindtextdomain, bindtextdomain);
+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
+#endif
diff --git a/intl/cat-compat.c b/intl/cat-compat.c
new file mode 100644
index 0000000..867d901
--- /dev/null
+++ b/intl/cat-compat.c
@@ -0,0 +1,262 @@
+/* Compatibility code for gettext-using-catgets interface.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# endif
+#endif
+
+#ifdef HAVE_NL_TYPES_H
+# include <nl_types.h>
+#endif
+
+#include "libgettext.h"
+
+/* @@ end of prolog @@ */
+
+/* XPG3 defines the result of `setlocale (category, NULL)' as:
+ ``Directs `setlocale()' to query `category' and return the current
+ setting of `local'.''
+ However it does not specify the exact format. And even worse: POSIX
+ defines this not at all. So we can use this feature only on selected
+ system (e.g. those using GNU C Library). */
+#ifdef _LIBC
+# define HAVE_LOCALE_NULL
+#endif
+
+/* The catalog descriptor. */
+static nl_catd catalog = (nl_catd) -1;
+
+/* Name of the default catalog. */
+static const char default_catalog_name[] = "messages";
+
+/* Name of currently used catalog. */
+static const char *catalog_name = default_catalog_name;
+
+/* Get ID for given string. If not found return -1. */
+static int msg_to_cat_id PARAMS ((const char *msg));
+
+/* Substitution for systems lacking this function in their C library. */
+#if !_LIBC && !HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+#endif
+
+
+/* Set currently used domain/catalog. */
+char *
+textdomain (domainname)
+ const char *domainname;
+{
+ nl_catd new_catalog;
+ char *new_name;
+ size_t new_name_len;
+ char *lang;
+
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
+ && defined HAVE_LOCALE_NULL
+ lang = setlocale (LC_MESSAGES, NULL);
+#else
+ lang = getenv ("LC_ALL");
+ if (lang == NULL || lang[0] == '\0')
+ {
+ lang = getenv ("LC_MESSAGES");
+ if (lang == NULL || lang[0] == '\0')
+ lang = getenv ("LANG");
+ }
+#endif
+ if (lang == NULL || lang[0] == '\0')
+ lang = "C";
+
+ /* See whether name of currently used domain is asked. */
+ if (domainname == NULL)
+ return (char *) catalog_name;
+
+ if (domainname[0] == '\0')
+ domainname = default_catalog_name;
+
+ /* Compute length of added path element. */
+ new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
+ + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
+ + sizeof (".cat");
+
+ new_name = (char *) malloc (new_name_len);
+ if (new_name == NULL)
+ return NULL;
+
+ strcpy (new_name, PACKAGE);
+ new_catalog = catopen (new_name, 0);
+
+ if (new_catalog == (nl_catd) -1)
+ {
+ /* NLSPATH search didn't work, try absolute path */
+ sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
+ PACKAGE);
+ new_catalog = catopen (new_name, 0);
+
+ if (new_catalog == (nl_catd) -1)
+ {
+ free (new_name);
+ return (char *) catalog_name;
+ }
+ }
+
+ /* Close old catalog. */
+ if (catalog != (nl_catd) -1)
+ catclose (catalog);
+ if (catalog_name != default_catalog_name)
+ free ((char *) catalog_name);
+
+ catalog = new_catalog;
+ catalog_name = new_name;
+
+ return (char *) catalog_name;
+}
+
+char *
+bindtextdomain (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+#if HAVE_SETENV || HAVE_PUTENV
+ char *old_val, *new_val, *cp;
+ size_t new_val_len;
+
+ /* This does not make much sense here but to be compatible do it. */
+ if (domainname == NULL)
+ return NULL;
+
+ /* Compute length of added path element. If we use setenv we don't need
+ the first byts for NLSPATH=, but why complicate the code for this
+ peanuts. */
+ new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
+ + sizeof ("/%L/LC_MESSAGES/%N.cat");
+
+ old_val = getenv ("NLSPATH");
+ if (old_val == NULL || old_val[0] == '\0')
+ {
+ old_val = NULL;
+ new_val_len += 1 + sizeof (LOCALEDIR) - 1
+ + sizeof ("/%L/LC_MESSAGES/%N.cat");
+ }
+ else
+ new_val_len += strlen (old_val);
+
+ new_val = (char *) malloc (new_val_len);
+ if (new_val == NULL)
+ return NULL;
+
+# if HAVE_SETENV
+ cp = new_val;
+# else
+ cp = stpcpy (new_val, "NLSPATH=");
+# endif
+
+ cp = stpcpy (cp, dirname);
+ cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
+
+ if (old_val == NULL)
+ {
+# if __STDC__
+ stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
+# else
+
+ cp = stpcpy (cp, LOCALEDIR);
+ stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
+# endif
+ }
+ else
+ stpcpy (cp, old_val);
+
+# if HAVE_SETENV
+ setenv ("NLSPATH", new_val, 1);
+ free (new_val);
+# else
+ putenv (new_val);
+ /* Do *not* free the environment entry we just entered. It is used
+ from now on. */
+# endif
+
+#endif
+
+ return (char *) domainname;
+}
+
+#undef gettext
+char *
+gettext (msg)
+ const char *msg;
+{
+ int msgid;
+
+ if (msg == NULL || catalog == (nl_catd) -1)
+ return (char *) msg;
+
+ /* Get the message from the catalog. We always use set number 1.
+ The message ID is computed by the function `msg_to_cat_id'
+ which works on the table generated by `po-to-tbl'. */
+ msgid = msg_to_cat_id (msg);
+ if (msgid == -1)
+ return (char *) msg;
+
+ return catgets (catalog, 1, msgid, (char *) msg);
+}
+
+/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
+ for the one equal to msg. If it is found return the ID. In case when
+ the string is not found return -1. */
+static int
+msg_to_cat_id (msg)
+ const char *msg;
+{
+ int cnt;
+
+ for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
+ if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
+ return _msg_tbl[cnt]._msg_number;
+
+ return -1;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
diff --git a/intl/cat-id-tbl.c b/intl/cat-id-tbl.c
new file mode 100644
index 0000000..0f918bf
--- /dev/null
+++ b/intl/cat-id-tbl.c
@@ -0,0 +1,113 @@
+/* Automatically generated by po-to-tbl from gettext.pot. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "libgettext.h"
+
+const struct _msg_ent _msg_tbl[] = {
+ {"", 1},
+ {"Unknown system error", 2},
+ {"%s: option `%s' is ambiguous\n", 3},
+ {"%s: option `--%s' doesn't allow an argument\n", 4},
+ {"%s: option `%c%s' doesn't allow an argument\n", 5},
+ {"%s: option `%s' requires an argument\n", 6},
+ {"%s: unrecognized option `--%s'\n", 7},
+ {"%s: unrecognized option `%c%s'\n", 8},
+ {"%s: illegal option -- %c\n", 9},
+ {"%s: invalid option -- %c\n", 10},
+ {"%s: option requires an argument -- %c\n", 11},
+ {"memory exhausted", 12},
+ {"missing arguments", 13},
+ {"too many arguments", 14},
+ {"Try `%s --help' for more information\n", 15},
+ {"\
+Usage: %s [-h | -v | [TEXTDOMAIN] MSGID]\n\
+ -h, --help display this help and exit\n\
+ -v, --version display version information and exit\n\
+ [TEXTDOMAIN] MSGID retrieve translated message corresponding\n\
+ to MSGID from TEXTDOMAIN\n\
+\n\
+If the TEXTDOMAIN parameter is not given, the domain is determined from the\n\
+environment variable TEXTDOMAIN. If the message catalog is not found in the\n\
+regular directory, another location can be specified with the environment\n\
+variable TEXTDOMAINDIR.\n\
+Standard search directory: %s\n", 16},
+ {"no input file given", 17},
+ {"error while opening \"%s\" for reading", 18},
+ {"error while opening \"%s\" for writing", 19},
+ {"\
+Usage: %s [OPTION] filename.po ...\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n\
+ -h, --help display this help and exit\n\
+ -I, --input-path=LIST list of directories searched for input files\n\
+ --no-hash binary file will not include the hash table\n\
+ -o, --output-file=FILE specify output file name as FILE\n\
+ -v, --verbose list input file anormalies\n\
+ -V, --version output version information and exit\n\
+\n\
+Search path is: %s\n\
+\n\
+If input file is -, standard input is read. If output file is -,\n\
+output is written to standard output.\n", 20},
+ {"while creating hash table", 21},
+ {"error while reading \"%s\"", 22},
+ {"incomplete `%s' directive at end of file", 23},
+ {"syntax error: value is no quoted string", 24},
+ {"end of file \"%s\" while reading string", 25},
+ {"illegal control sequence", 26},
+ {"end of file occured inside directive value", 27},
+ {"unterminated string constant", 28},
+ {"trailing garbage in line", 29},
+ {"previous `msgid' directive not matched by `msgstr'", 30},
+ {"domain name \"%s\" not suitable as file name: will use prefix", 31},
+ {"`msgid' directive expected", 32},
+ {"empty msgstr entry ignored", 33},
+ {"duplicate message ID", 34},
+ {"this is the location of the first definition", 35},
+ {"`msgstr' directive expected", 36},
+ {"syntax error: unknown directive", 37},
+ {"`msgid' and `msgstr' entry does not both begin with '\\n'", 38},
+ {"`msgid' and `msgstr' entry does not both end with '\\n'", 39},
+ {"number of format specifications in `msgid' and `msgstr' does not match", 40},
+ {"format specifications for argument %u are not the same", 41},
+ {"while preparing output", 42},
+ {"\
+Usage: %s [OPTION] INPUTFILE ...\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -a, --extract-all extract all strings\n\
+ -c, --add-comments[=TAG] place comment block with TAG (or those\n\
+ preceding keyword lines) in output file\n\
+ -C, --c++ recognize C++ style comments\n\
+ -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n\
+ -h, --help display this help and exit\n\
+ -I, --input-path=LIST list of directories searched for input files\n\
+ -j, --join-existing join messages with existing file\n\
+ -k, --keyword[=WORD] additonal keyword to be looked for (without\n\
+ WORD means not to use default keywords)\n\
+ -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n\
+ -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n\
+ --no-location do not write '#: filename:line' lines\n", 43},
+ {"\
+ -n, --add-location generate '#: filename:line' lines (default)\n\
+ --omit-header don't write header with `msgid \"\"' entry\n\
+ -p, --output-dir=DIR output files will be placed in directory DIR\n\
+ -s, --sort-output generate sorted output and remove duplicates\n\
+ --strict write out strict Uniforum conforming .po file\n\
+ -v, --version output version information and exit\n\
+ -x, --exclude-file=FILE entries from FILE are not extracted\n\
+\n\
+Search path for supplementary .po files is:\n\
+%s\n\
+\n\
+If INPUTFILE is -, standard input is read.\n", 44},
+ {"trailing garbage after string in call of keyword", 45},
+ {"syntax error: no value", 46},
+ {"string length might conflict with 1024 byte limit", 47},
+ {"cannot create output file \"%s\"", 48},
+ {"error while writing .po file", 49},
+};
+
+int _msg_tbl_length = 49;
diff --git a/intl/dcgettext.c b/intl/dcgettext.c
new file mode 100644
index 0000000..8115d5c
--- /dev/null
+++ b/intl/dcgettext.c
@@ -0,0 +1,59 @@
+/* Implementation of the dcgettext(3) function.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCGETTEXT __dcgettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCGETTEXT dcgettext__
+# define DCIGETTEXT dcigettext__
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+char *
+DCGETTEXT (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ int category;
+{
+ return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dcgettext, dcgettext);
+#endif
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
new file mode 100644
index 0000000..75f1707
--- /dev/null
+++ b/intl/dcigettext.c
@@ -0,0 +1,1093 @@
+/* Implementation of the internal dcigettext function.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#if defined __GNUC__ && !defined C_ALLOCA
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if (defined HAVE_ALLOCA_H || defined _LIBC) && !defined C_ALLOCA
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(val) errno = (val)
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#if defined HAVE_LOCALE_H || defined _LIBC
+# include <locale.h>
+#endif
+
+#if defined HAVE_SYS_PARAM_H || defined _LIBC
+# include <sys/param.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+#include "hash-string.h"
+
+/* Thread safetyness. */
+#ifdef _LIBC
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_lock_define_initialized(CLASS, NAME)
+# define __libc_lock_lock(NAME)
+# define __libc_lock_unlock(NAME)
+# define __libc_rwlock_define_initialized(CLASS, NAME)
+# define __libc_rwlock_rdlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define getcwd __getcwd
+# ifndef stpcpy
+# define stpcpy __stpcpy
+# endif
+#else
+# if !defined HAVE_GETCWD
+char *getwd ();
+# define getcwd(buf, max) getwd (buf)
+# else
+char *getcwd ();
+# endif
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+# ifndef HAVE_MEMPCPY
+static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
+# endif
+#endif
+
+/* Amount to increase buffer size by in each try. */
+#define PATH_INCR 32
+
+/* The following is from pathmax.h. */
+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
+ PATH_MAX but might cause redefinition warnings when sys/param.h is
+ later included (as on MORE/BSD 4.3). */
+#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
+# include <limits.h>
+#endif
+
+#ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 255
+#endif
+
+#if !defined PATH_MAX && defined _PC_PATH_MAX
+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+#endif
+
+/* Don't include sys/param.h if it already has been. */
+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+#endif
+
+#if !defined PATH_MAX && defined MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+#endif
+
+#ifndef PATH_MAX
+# define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+/* XPG3 defines the result of `setlocale (category, NULL)' as:
+ ``Directs `setlocale()' to query `category' and return the current
+ setting of `local'.''
+ However it does not specify the exact format. And even worse: POSIX
+ defines this not at all. So we can use this feature only on selected
+ system (e.g. those using GNU C Library). */
+#ifdef _LIBC
+# define HAVE_LOCALE_NULL
+#endif
+
+/* We want to allocate a string at the end of the struct. gcc makes
+ this easy. */
+#ifdef __GNUC__
+# define ZERO 0
+#else
+# define ZERO 1
+#endif
+
+/* This is the type used for the search tree where known translations
+ are stored. */
+struct known_translation_t
+{
+ /* Domain in which to search. */
+ char *domain;
+
+ /* Plural index. */
+ unsigned long int plindex;
+
+ /* The category. */
+ int category;
+
+ /* State of the catalog counter at the point the string was found. */
+ int counter;
+
+ /* And finally the translation. */
+ const char *translation;
+
+ /* Pointer to the string in question. */
+ char msgid[ZERO];
+};
+
+/* Root of the search tree with known translations. We can use this
+ only if the system provides the `tsearch' function family. */
+#if defined HAVE_TSEARCH || defined _LIBC
+# include <search.h>
+
+static void *root;
+
+# ifdef _LIBC
+# define tsearch __tsearch
+# endif
+
+/* Function to compare two entries in the table of known translations. */
+static int
+transcmp (const void *p1, const void *p2)
+{
+ struct known_translation_t *s1 = (struct known_translation_t *) p1;
+ struct known_translation_t *s2 = (struct known_translation_t *) p2;
+ int result;
+
+ result = strcmp (s1->msgid, s2->msgid);
+ if (result == 0)
+ {
+ result = strcmp (s1->domain, s2->domain);
+ if (result == 0)
+ {
+ result = s1->plindex - s2->plindex;
+ if (result == 0)
+ /* We compare the category last (though this is the cheapest
+ operation) since it is hopefully always the same (namely
+ LC_MESSAGES). */
+ result = s1->category - s2->category;
+ }
+ }
+
+ return result;
+}
+#endif
+
+/* Name of the default domain used for gettext(3) prior any call to
+ textdomain(3). The default value for this is "messages". */
+const char _nl_default_default_domain[] = "messages";
+
+/* Value used as the default domain for gettext(3). */
+const char *_nl_current_default_domain = _nl_default_default_domain;
+
+/* Contains the default location of the message catalogs. */
+const char _nl_default_dirname[] = GNULOCALEDIR;
+
+/* List with bindings of specific domains created by bindtextdomain()
+ calls. */
+struct binding *_nl_domain_bindings;
+
+/* Prototypes for local functions. */
+static unsigned long int plural_eval (struct expression *pexp,
+ unsigned long int n) internal_function;
+static const char *category_to_name PARAMS ((int category)) internal_function;
+static const char *guess_category_value PARAMS ((int category,
+ const char *categoryname))
+ internal_function;
+
+
+/* For those loosing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+/* Nothing has to be done. */
+# define ADD_BLOCK(list, address) /* nothing */
+# define FREE_BLOCKS(list) /* nothing */
+#else
+struct block_list
+{
+ void *address;
+ struct block_list *next;
+};
+# define ADD_BLOCK(list, addr) \
+ do { \
+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
+ /* If we cannot get a free block we cannot add the new element to \
+ the list. */ \
+ if (newp != NULL) { \
+ newp->address = (addr); \
+ newp->next = (list); \
+ (list) = newp; \
+ } \
+ } while (0)
+# define FREE_BLOCKS(list) \
+ do { \
+ while (list != NULL) { \
+ struct block_list *old = list; \
+ list = list->next; \
+ free (old); \
+ } \
+ } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+#endif /* have alloca */
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCIGETTEXT __dcigettext
+#else
+# define DCIGETTEXT dcigettext__
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation. */
+__libc_rwlock_define_initialized (, _nl_state_lock)
+
+/* Checking whether the binaries runs SUID must be done and glibc provides
+ easier methods therefore we make a difference here. */
+#ifdef _LIBC
+# define ENABLE_SECURE __libc_enable_secure
+# define DETERMINE_SECURE
+#else
+static int enable_secure;
+# define ENABLE_SECURE (enable_secure == 1)
+# define DETERMINE_SECURE \
+ if (enable_secure == 0) \
+ { \
+ if (getuid () != geteuid () || getgid () != getegid ()) \
+ enable_secure = 1; \
+ else \
+ enable_secure = -1; \
+ }
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+ CATEGORY locale and, if PLURAL is nonzero, search over string
+ depending on the plural form determined by N. */
+char *
+DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ int plural;
+ unsigned long int n;
+ int category;
+{
+#ifndef HAVE_ALLOCA
+ struct block_list *block_list = NULL;
+#endif
+ struct loaded_l10nfile *domain;
+ struct binding *binding;
+ const char *categoryname;
+ const char *categoryvalue;
+ char *dirname, *xdomainname;
+ char *single_locale;
+ char *retval;
+ int saved_errno;
+#if defined HAVE_TSEARCH || defined _LIBC
+ struct known_translation_t *search;
+ struct known_translation_t **foundp = NULL;
+ size_t msgid_len;
+#endif
+ size_t domainname_len;
+
+ /* If no real MSGID is given return NULL. */
+ if (msgid1 == NULL)
+ return NULL;
+
+ __libc_rwlock_rdlock (_nl_state_lock);
+
+ /* If DOMAINNAME is NULL, we are interested in the default domain. If
+ CATEGORY is not LC_MESSAGES this might not make much sense but the
+ definition left this undefined. */
+ if (domainname == NULL)
+ domainname = _nl_current_default_domain;
+
+#if defined HAVE_TSEARCH || defined _LIBC
+ msgid_len = strlen (msgid1) + 1;
+
+ if (plural == 0)
+ {
+ /* Try to find the translation among those which we found at
+ some time. */
+ search = (struct known_translation_t *) alloca (sizeof (*search)
+ + msgid_len);
+ memcpy (search->msgid, msgid1, msgid_len);
+ search->domain = (char *) domainname;
+ search->plindex = 0;
+ search->category = category;
+
+ foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
+ if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
+ {
+ __libc_rwlock_unlock (_nl_state_lock);
+ return (char *) (*foundp)->translation;
+ }
+ }
+#endif
+
+ /* Preserve the `errno' value. */
+ saved_errno = errno;
+
+ /* See whether this is a SUID binary or not. */
+ DETERMINE_SECURE;
+
+ /* First find matching binding. */
+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+ {
+ int compare = strcmp (domainname, binding->domainname);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It is not in the list. */
+ binding = NULL;
+ break;
+ }
+ }
+
+ if (binding == NULL)
+ dirname = (char *) _nl_default_dirname;
+ else if (binding->dirname[0] == '/')
+ dirname = binding->dirname;
+ else
+ {
+ /* We have a relative path. Make it absolute now. */
+ size_t dirname_len = strlen (binding->dirname) + 1;
+ size_t path_max;
+ char *ret;
+
+ path_max = (unsigned int) PATH_MAX;
+ path_max += 2; /* The getcwd docs say to do this. */
+
+ dirname = (char *) alloca (path_max + dirname_len);
+ ADD_BLOCK (block_list, dirname);
+
+ __set_errno (0);
+ while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
+ {
+ path_max += PATH_INCR;
+ dirname = (char *) alloca (path_max + dirname_len);
+ ADD_BLOCK (block_list, dirname);
+ __set_errno (0);
+ }
+
+ if (ret == NULL)
+ {
+ /* We cannot get the current working directory. Don't signal an
+ error but simply return the default string. */
+ FREE_BLOCKS (block_list);
+ __set_errno (saved_errno);
+ return (plural == 0
+ ? (char *) msgid1
+ /* Use the Germanic plural rule. */
+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
+ }
+
+ stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
+ }
+
+ /* Now determine the symbolic name of CATEGORY and its value. */
+ categoryname = category_to_name (category);
+ categoryvalue = guess_category_value (category, categoryname);
+
+ domainname_len = strlen (domainname);
+ xdomainname = (char *) alloca (strlen (categoryname)
+ + domainname_len + 5);
+ ADD_BLOCK (block_list, xdomainname);
+
+ stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+ domainname, domainname_len),
+ ".mo");
+
+ /* Creating working area. */
+ single_locale = (char *) alloca (strlen (categoryvalue) + 1);
+ ADD_BLOCK (block_list, single_locale);
+
+
+ /* Search for the given string. This is a loop because we perhaps
+ got an ordered list of languages to consider for the translation. */
+ while (1)
+ {
+ /* Make CATEGORYVALUE point to the next element of the list. */
+ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
+ ++categoryvalue;
+ if (categoryvalue[0] == '\0')
+ {
+ /* The whole contents of CATEGORYVALUE has been searched but
+ no valid entry has been found. We solve this situation
+ by implicitly appending a "C" entry, i.e. no translation
+ will take place. */
+ single_locale[0] = 'C';
+ single_locale[1] = '\0';
+ }
+ else
+ {
+ char *cp = single_locale;
+ while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
+ *cp++ = *categoryvalue++;
+ *cp = '\0';
+
+ /* When this is a SUID binary we must not allow accessing files
+ outside the dedicated directories. */
+ if (ENABLE_SECURE
+ && (memchr (single_locale, '/',
+ _nl_find_language (single_locale) - single_locale)
+ != NULL))
+ /* Ingore this entry. */
+ continue;
+ }
+
+ /* If the current locale value is C (or POSIX) we don't load a
+ domain. Return the MSGID. */
+ if (strcmp (single_locale, "C") == 0
+ || strcmp (single_locale, "POSIX") == 0)
+ {
+ FREE_BLOCKS (block_list);
+ __libc_rwlock_unlock (_nl_state_lock);
+ __set_errno (saved_errno);
+ return (plural == 0
+ ? (char *) msgid1
+ /* Use the Germanic plural rule. */
+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
+ }
+
+
+ /* Find structure describing the message catalog matching the
+ DOMAINNAME and CATEGORY. */
+ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
+
+ if (domain != NULL)
+ {
+ unsigned long int index = 0;
+#if defined HAVE_TSEARCH || defined _LIBC
+ struct loaded_domain *domaindata =
+ (struct loaded_domain *) domain->data;
+
+ if (plural != 0)
+ {
+ /* Try to find the translation among those which we
+ found at some time. */
+ search = (struct known_translation_t *) alloca (sizeof (*search)
+ + msgid_len);
+ memcpy (search->msgid, msgid1, msgid_len);
+ search->domain = (char *) domainname;
+ search->plindex = plural_eval (domaindata->plural, n);
+ if (search->plindex >= domaindata->nplurals)
+ /* This should never happen. It means the plural expression
+ and the given maximum value do not match. */
+ search->plindex = 0;
+ index = search->plindex;
+ search->category = category;
+
+ foundp = (struct known_translation_t **) tfind (search, &root,
+ transcmp);
+ if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
+ {
+ __libc_rwlock_unlock (_nl_state_lock);
+ return (char *) (*foundp)->translation;
+ }
+ }
+#endif
+
+ retval = _nl_find_msg (domain, msgid1, index);
+
+ if (retval == NULL)
+ {
+ int cnt;
+
+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
+ {
+ retval = _nl_find_msg (domain->successor[cnt], msgid1,
+ index);
+
+ if (retval != NULL)
+ break;
+ }
+ }
+
+ if (retval != NULL)
+ {
+ FREE_BLOCKS (block_list);
+ __set_errno (saved_errno);
+#if defined HAVE_TSEARCH || defined _LIBC
+ if (foundp == NULL)
+ {
+ /* Create a new entry and add it to the search tree. */
+ struct known_translation_t *newp;
+
+ newp = (struct known_translation_t *)
+ malloc (sizeof (*newp) + msgid_len
+ + domainname_len + 1 - ZERO);
+ if (newp != NULL)
+ {
+ newp->domain = mempcpy (newp->msgid, msgid1, msgid_len);
+ memcpy (newp->domain, domainname, domainname_len + 1);
+ newp->plindex = index;
+ newp->category = category;
+ newp->counter = _nl_msg_cat_cntr;
+ newp->translation = retval;
+
+ /* Insert the entry in the search tree. */
+ foundp = (struct known_translation_t **)
+ tsearch (newp, &root, transcmp);
+ if (__builtin_expect (&newp != foundp, 0))
+ /* The insert failed. */
+ free (newp);
+ }
+ }
+ else
+ {
+ /* We can update the existing entry. */
+ (*foundp)->counter = _nl_msg_cat_cntr;
+ (*foundp)->translation = retval;
+ }
+#endif
+ __libc_rwlock_unlock (_nl_state_lock);
+ return retval;
+ }
+ }
+ }
+ /* NOTREACHED */
+}
+
+
+char *
+internal_function
+_nl_find_msg (domain_file, msgid, index)
+ struct loaded_l10nfile *domain_file;
+ const char *msgid;
+ unsigned long int index;
+{
+ struct loaded_domain *domain;
+ size_t act;
+ char *result;
+
+ if (domain_file->decided == 0)
+ _nl_load_domain (domain_file);
+
+ if (domain_file->data == NULL)
+ return NULL;
+
+ domain = (struct loaded_domain *) domain_file->data;
+
+ /* Locate the MSGID and its translation. */
+ if (domain->hash_size > 2 && domain->hash_tab != NULL)
+ {
+ /* Use the hashing table. */
+ nls_uint32 len = strlen (msgid);
+ nls_uint32 hash_val = hash_string (msgid);
+ nls_uint32 idx = hash_val % domain->hash_size;
+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+ nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
+
+ if (nstr == 0)
+ /* Hash table entry is empty. */
+ return NULL;
+
+ if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
+ && strcmp (msgid,
+ domain->data + W (domain->must_swap,
+ domain->orig_tab[nstr - 1].offset)) == 0)
+ {
+ act = nstr - 1;
+ goto found;
+ }
+
+ while (1)
+ {
+ if (idx >= domain->hash_size - incr)
+ idx -= domain->hash_size - incr;
+ else
+ idx += incr;
+
+ nstr = W (domain->must_swap, domain->hash_tab[idx]);
+ if (nstr == 0)
+ /* Hash table entry is empty. */
+ return NULL;
+
+ if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
+ && (strcmp (msgid,
+ domain->data + W (domain->must_swap,
+ domain->orig_tab[nstr - 1].offset))
+ == 0))
+ {
+ act = nstr - 1;
+ goto found;
+ }
+ }
+ /* NOTREACHED */
+ }
+ else
+ {
+ /* Try the default method: binary search in the sorted array of
+ messages. */
+ size_t top, bottom;
+
+ bottom = 0;
+ top = domain->nstrings;
+ while (bottom < top)
+ {
+ int cmp_val;
+
+ act = (bottom + top) / 2;
+ cmp_val = strcmp (msgid, (domain->data
+ + W (domain->must_swap,
+ domain->orig_tab[act].offset)));
+ if (cmp_val < 0)
+ top = act;
+ else if (cmp_val > 0)
+ bottom = act + 1;
+ else
+ goto found;
+ }
+ /* No translation was found. */
+ return NULL;
+ }
+
+ found:
+ /* The translation was found at index ACT. If we have to convert the
+ string to use a different character set, this is the time. */
+ result = (char *) domain->data
+ + W (domain->must_swap, domain->trans_tab[act].offset);
+
+#if defined _LIBC || HAVE_ICONV
+ if (
+# ifdef _LIBC
+ domain->conv != (__gconv_t) -1
+# else
+# if HAVE_ICONV
+ domain->conv != (iconv_t) -1
+# endif
+# endif
+ )
+ {
+ /* We are supposed to do a conversion. First allocate an
+ appropriate table with the same structure as the table
+ of translations in the file, where we can put the pointers
+ to the converted strings in.
+ The is a slight complication with the INDEX: We don't know
+ a priori which entries are plural entries. Therefore at any
+ moment we can only translate the variants 0 .. INDEX. */
+
+ if (domain->conv_tab == NULL
+ && ((domain->conv_tab = (char **) calloc (domain->nstrings,
+ sizeof (char *)))
+ == NULL))
+ /* Mark that we didn't succeed allocating a table. */
+ domain->conv_tab = (char **) -1;
+
+ if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
+ /* Nothing we can do, no more memory. */
+ goto converted;
+
+ if (domain->conv_tab[act] == NULL
+ || *(nls_uint32 *) domain->conv_tab[act] < index)
+ {
+ /* We haven't used this string so far, so it is not
+ translated yet. Do this now. */
+ /* We use a bit more efficient memory handling.
+ We allocate always larger blocks which get used over
+ time. This is faster than many small allocations. */
+ __libc_lock_define_initialized (static, lock)
+ static unsigned char *freemem;
+ static size_t freemem_size;
+
+ size_t resultlen;
+ const unsigned char *inbuf;
+ unsigned char *outbuf;
+
+ /* Note that we translate (index + 1) consecutive strings at
+ once, including the final NUL byte. */
+ {
+ unsigned long int i = index;
+ char *p = result;
+ do
+ p += strlen (p) + 1;
+ while (i-- > 0);
+ resultlen = p - result;
+ }
+
+ inbuf = result;
+ outbuf = freemem + 4;
+
+ __libc_lock_lock (lock);
+
+ while (1)
+ {
+# ifdef _LIBC
+ size_t non_reversible;
+ int res;
+
+ res = __gconv (domain->conv,
+ &inbuf, inbuf + resultlen,
+ &outbuf, outbuf + freemem_size,
+ &non_reversible);
+
+ if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
+ break;
+
+ if (res != __GCONV_FULL_OUTPUT)
+ {
+ __libc_lock_unlock (lock);
+ goto converted;
+ }
+
+ inbuf = result;
+# else
+# if HAVE_ICONV
+ const char *inptr = (const char *) inbuf;
+ size_t inleft = resultlen;
+ char *outptr = (char *) outbuf;
+ size_t outleft = freemem_size;
+
+ if (iconv (domain->conv, &inptr, &inleft, &outptr, &outleft)
+ != (size_t) (-1))
+ {
+ outbuf = (unsigned char *) outptr;
+ break;
+ }
+ if (errno != E2BIG)
+ {
+ __libc_lock_unlock (lock);
+ goto converted;
+ }
+# endif
+# endif
+
+ /* We must resize the buffer. */
+ freemem_size = 2 * freemem_size;
+ if (freemem_size < 4064)
+ freemem_size = 4064;
+ freemem = (char *) malloc (freemem_size);
+ if (__builtin_expect (freemem == NULL, 0))
+ {
+ __libc_lock_unlock (lock);
+ goto converted;
+ }
+
+ outbuf = freemem + 4;
+ }
+
+ /* We have now in our buffer a converted string. Put this
+ into the table of conversions. */
+ *(nls_uint32 *) freemem = index;
+ domain->conv_tab[act] = freemem;
+ /* Shrink freemem, but keep it aligned. */
+ freemem_size -= outbuf - freemem;
+ freemem = outbuf;
+ freemem += freemem_size & (__alignof__ (nls_uint32) - 1);
+ freemem_size = freemem_size & ~ (__alignof__ (nls_uint32) - 1);
+
+ __libc_lock_unlock (lock);
+ }
+
+ /* Now domain->conv_tab[act] contains the translation of at least
+ the variants 0 .. INDEX. */
+ result = domain->conv_tab[act] + 4;
+ }
+
+ converted:
+ /* The result string is converted. */
+
+#endif /* _LIBC || HAVE_ICONV */
+
+ /* Now skip some strings. How much depends on the index passed in. */
+ while (index-- > 0)
+ {
+#ifdef _LIBC
+ result = __rawmemchr (result, '\0');
+#else
+ result = strchr (result, '\0');
+#endif
+ /* And skip over the NUL byte. */
+ ++result;
+ }
+
+ return result;
+}
+
+
+/* Function to evaluate the plural expression and return an index value. */
+static unsigned long int
+internal_function
+plural_eval (struct expression *pexp, unsigned long int n)
+{
+ switch (pexp->operation)
+ {
+ case var:
+ return n;
+ case num:
+ return pexp->val.num;
+ case mult:
+ return (plural_eval (pexp->val.args2.left, n)
+ * plural_eval (pexp->val.args2.right, n));
+ case divide:
+ return (plural_eval (pexp->val.args2.left, n)
+ / plural_eval (pexp->val.args2.right, n));
+ case module:
+ return (plural_eval (pexp->val.args2.left, n)
+ % plural_eval (pexp->val.args2.right, n));
+ case plus:
+ return (plural_eval (pexp->val.args2.left, n)
+ + plural_eval (pexp->val.args2.right, n));
+ case minus:
+ return (plural_eval (pexp->val.args2.left, n)
+ - plural_eval (pexp->val.args2.right, n));
+ case equal:
+ return (plural_eval (pexp->val.args2.left, n)
+ == plural_eval (pexp->val.args2.right, n));
+ case not_equal:
+ return (plural_eval (pexp->val.args2.left, n)
+ != plural_eval (pexp->val.args2.right, n));
+ case land:
+ return (plural_eval (pexp->val.args2.left, n)
+ && plural_eval (pexp->val.args2.right, n));
+ case lor:
+ return (plural_eval (pexp->val.args2.left, n)
+ || plural_eval (pexp->val.args2.right, n));
+ case qmop:
+ return (plural_eval (pexp->val.args3.bexp, n)
+ ? plural_eval (pexp->val.args3.tbranch, n)
+ : plural_eval (pexp->val.args3.fbranch, n));
+ }
+ /* NOTREACHED */
+ return 0;
+}
+
+
+/* Return string representation of locale CATEGORY. */
+static const char *
+internal_function
+category_to_name (category)
+ int category;
+{
+ const char *retval;
+
+ switch (category)
+ {
+#ifdef LC_COLLATE
+ case LC_COLLATE:
+ retval = "LC_COLLATE";
+ break;
+#endif
+#ifdef LC_CTYPE
+ case LC_CTYPE:
+ retval = "LC_CTYPE";
+ break;
+#endif
+#ifdef LC_MONETARY
+ case LC_MONETARY:
+ retval = "LC_MONETARY";
+ break;
+#endif
+#ifdef LC_NUMERIC
+ case LC_NUMERIC:
+ retval = "LC_NUMERIC";
+ break;
+#endif
+#ifdef LC_TIME
+ case LC_TIME:
+ retval = "LC_TIME";
+ break;
+#endif
+#ifdef LC_MESSAGES
+ case LC_MESSAGES:
+ retval = "LC_MESSAGES";
+ break;
+#endif
+#ifdef LC_RESPONSE
+ case LC_RESPONSE:
+ retval = "LC_RESPONSE";
+ break;
+#endif
+#ifdef LC_ALL
+ case LC_ALL:
+ /* This might not make sense but is perhaps better than any other
+ value. */
+ retval = "LC_ALL";
+ break;
+#endif
+ default:
+ /* If you have a better idea for a default value let me know. */
+ retval = "LC_XXX";
+ }
+
+ return retval;
+}
+
+/* Guess value of current locale from value of the environment variables. */
+static const char *
+internal_function
+guess_category_value (category, categoryname)
+ int category;
+ const char *categoryname;
+{
+ const char *retval;
+
+ /* The highest priority value is the `LANGUAGE' environment
+ variable. This is a GNU extension. */
+ retval = getenv ("LANGUAGE");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* `LANGUAGE' is not set. So we have to proceed with the POSIX
+ methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
+ systems this can be done by the `setlocale' function itself. */
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+ return setlocale (category, NULL);
+#else
+ /* Setting of LC_ALL overwrites all other. */
+ retval = getenv ("LC_ALL");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* Next comes the name of the desired category. */
+ retval = getenv (categoryname);
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* Last possibility is the LANG environment variable. */
+ retval = getenv ("LANG");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* We use C as the default domain. POSIX says this is implementation
+ defined. */
+ return "C";
+#endif
+}
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
+
+#if !_LIBC && !HAVE_MEMPCPY
+static void *
+mempcpy (dest, src, n)
+ void *dest;
+ const void *src;
+ size_t n;
+{
+ return (void *) ((char *) memcpy (dest, src, n) + n);
+}
+#endif
+
+
+#ifdef _LIBC
+/* If we want to free all resources we have to do some work at
+ program's end. */
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ struct binding *runp;
+
+ for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next)
+ {
+ if (runp->dirname != _nl_default_dirname)
+ /* Yes, this is a pointer comparison. */
+ free (runp->dirname);
+ if (runp->codeset != NULL)
+ free (runp->codeset);
+ }
+
+ if (_nl_current_default_domain != _nl_default_default_domain)
+ /* Yes, again a pointer comparison. */
+ free ((char *) _nl_current_default_domain);
+
+ /* Remove the search tree with the known translations. */
+ __tdestroy (root, free);
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif
diff --git a/intl/dcngettext.c b/intl/dcngettext.c
new file mode 100644
index 0000000..d10f4a6
--- /dev/null
+++ b/intl/dcngettext.c
@@ -0,0 +1,61 @@
+/* Implementation of the dcngettext(3) function.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCNGETTEXT __dcngettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCNGETTEXT dcngettext__
+# define DCIGETTEXT dcigettext__
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+char *
+DCNGETTEXT (domainname, msgid1, msgid2, n, category)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+ int category;
+{
+ return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dcngettext, dcngettext);
+#endif
diff --git a/intl/dgettext.c b/intl/dgettext.c
new file mode 100644
index 0000000..85770d2
--- /dev/null
+++ b/intl/dgettext.c
@@ -0,0 +1,60 @@
+/* Implementation of the dgettext(3) function.
+ Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined HAVE_LOCALE_H || defined _LIBC
+# include <locale.h>
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DGETTEXT __dgettext
+# define DCGETTEXT __dcgettext
+#else
+# define DGETTEXT dgettext__
+# define DCGETTEXT dcgettext__
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+ LC_MESSAGES locale. */
+char *
+DGETTEXT (domainname, msgid)
+ const char *domainname;
+ const char *msgid;
+{
+ return DCGETTEXT (domainname, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dgettext, dgettext);
+#endif
diff --git a/intl/dngettext.c b/intl/dngettext.c
new file mode 100644
index 0000000..0501446
--- /dev/null
+++ b/intl/dngettext.c
@@ -0,0 +1,64 @@
+/* Implementation of the dngettext(3) function.
+ Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined HAVE_LOCALE_H || defined _LIBC
+# include <locale.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DNGETTEXT __dngettext
+# define DCNGETTEXT __dcngettext
+#else
+# define DNGETTEXT dngettext__
+# define DCNGETTEXT dcngettext__
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+ LC_MESSAGES locale and skip message according to the plural form. */
+char *
+DNGETTEXT (domainname, msgid1, msgid2, n)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dngettext, dngettext);
+#endif
diff --git a/intl/explodename.c b/intl/explodename.c
new file mode 100644
index 0000000..f89c7c9
--- /dev/null
+++ b/intl/explodename.c
@@ -0,0 +1,198 @@
+/* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#include <sys/types.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+char *
+_nl_find_language (const char *name)
+{
+ while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
+ && name[0] != '+' && name[0] != ',')
+ ++name;
+
+ return (char *) name;
+}
+
+
+int
+_nl_explode_name (name, language, modifier, territory, codeset,
+ normalized_codeset, special, sponsor, revision)
+ char *name;
+ const char **language;
+ const char **modifier;
+ const char **territory;
+ const char **codeset;
+ const char **normalized_codeset;
+ const char **special;
+ const char **sponsor;
+ const char **revision;
+{
+ enum { undecided, xpg, cen } syntax;
+ char *cp;
+ int mask;
+
+ *modifier = NULL;
+ *territory = NULL;
+ *codeset = NULL;
+ *normalized_codeset = NULL;
+ *special = NULL;
+ *sponsor = NULL;
+ *revision = NULL;
+
+ /* Now we determine the single parts of the locale name. First
+ look for the language. Termination symbols are `_' and `@' if
+ we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+ mask = 0;
+ syntax = undecided;
+ *language = cp = name;
+ cp = _nl_find_language (*language);
+
+ if (*language == cp)
+ /* This does not make sense: language has to be specified. Use
+ this entry as it is without exploding. Perhaps it is an alias. */
+ cp = strchr (*language, '\0');
+ else if (cp[0] == '_')
+ {
+ /* Next is the territory. */
+ cp[0] = '\0';
+ *territory = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
+ && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= TERRITORY;
+
+ if (cp[0] == '.')
+ {
+ /* Next is the codeset. */
+ syntax = xpg;
+ cp[0] = '\0';
+ *codeset = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '@')
+ ++cp;
+
+ mask |= XPG_CODESET;
+
+ if (*codeset != cp && (*codeset)[0] != '\0')
+ {
+ *normalized_codeset = _nl_normalize_codeset (*codeset,
+ cp - *codeset);
+ if (strcmp (*codeset, *normalized_codeset) == 0)
+ free ((char *) *normalized_codeset);
+ else
+ mask |= XPG_NORM_CODESET;
+ }
+ }
+ }
+
+ if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
+ {
+ /* Next is the modifier. */
+ syntax = cp[0] == '@' ? xpg : cen;
+ cp[0] = '\0';
+ *modifier = ++cp;
+
+ while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
+ && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= XPG_MODIFIER | CEN_AUDIENCE;
+ }
+
+ if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
+ {
+ syntax = cen;
+
+ if (cp[0] == '+')
+ {
+ /* Next is special application (CEN syntax). */
+ cp[0] = '\0';
+ *special = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= CEN_SPECIAL;
+ }
+
+ if (cp[0] == ',')
+ {
+ /* Next is sponsor (CEN syntax). */
+ cp[0] = '\0';
+ *sponsor = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '_')
+ ++cp;
+
+ mask |= CEN_SPONSOR;
+ }
+
+ if (cp[0] == '_')
+ {
+ /* Next is revision (CEN syntax). */
+ cp[0] = '\0';
+ *revision = ++cp;
+
+ mask |= CEN_REVISION;
+ }
+ }
+
+ /* For CEN syntax values it might be important to have the
+ separator character in the file name, not for XPG syntax. */
+ if (syntax == xpg)
+ {
+ if (*territory != NULL && (*territory)[0] == '\0')
+ mask &= ~TERRITORY;
+
+ if (*codeset != NULL && (*codeset)[0] == '\0')
+ mask &= ~XPG_CODESET;
+
+ if (*modifier != NULL && (*modifier)[0] == '\0')
+ mask &= ~XPG_MODIFIER;
+ }
+
+ return mask;
+}
diff --git a/intl/finddomain.c b/intl/finddomain.c
new file mode 100644
index 0000000..dc215ad
--- /dev/null
+++ b/intl/finddomain.c
@@ -0,0 +1,220 @@
+/* Handle list of needed message catalogs
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.org>, 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+/* List of already loaded domains. */
+static struct loaded_l10nfile *_nl_loaded_domains;
+
+
+/* Return a data structure describing the message catalog described by
+ the DOMAINNAME and CATEGORY parameters with respect to the currently
+ established bindings. */
+struct loaded_l10nfile *
+internal_function
+_nl_find_domain (dirname, locale, domainname, domainbinding)
+ const char *dirname;
+ char *locale;
+ const char *domainname;
+ struct binding *domainbinding;
+{
+ struct loaded_l10nfile *retval;
+ const char *language;
+ const char *modifier;
+ const char *territory;
+ const char *codeset;
+ const char *normalized_codeset;
+ const char *special;
+ const char *sponsor;
+ const char *revision;
+ const char *alias_value;
+ int mask;
+
+ /* LOCALE can consist of up to four recognized parts for the XPG syntax:
+
+ language[_territory[.codeset]][@modifier]
+
+ and six parts for the CEN syntax:
+
+ language[_territory][+audience][+special][,[sponsor][_revision]]
+
+ Beside the first part all of them are allowed to be missing. If
+ the full specified locale is not found, the less specific one are
+ looked for. The various parts will be stripped off according to
+ the following order:
+ (1) revision
+ (2) sponsor
+ (3) special
+ (4) codeset
+ (5) normalized codeset
+ (6) territory
+ (7) audience/modifier
+ */
+
+ /* If we have already tested for this locale entry there has to
+ be one data set in the list of loaded domains. */
+ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+ strlen (dirname) + 1, 0, locale, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, domainname,
+ domainbinding, 0);
+ if (retval != NULL)
+ {
+ /* We know something about this locale. */
+ int cnt;
+
+ if (retval->decided == 0)
+ _nl_load_domain (retval);
+
+ if (retval->data != NULL)
+ return retval;
+
+ for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+ {
+ if (retval->successor[cnt]->decided == 0)
+ _nl_load_domain (retval->successor[cnt]);
+
+ if (retval->successor[cnt]->data != NULL)
+ break;
+ }
+ return cnt >= 0 ? retval : NULL;
+ /* NOTREACHED */
+ }
+
+ /* See whether the locale value is an alias. If yes its value
+ *overwrites* the alias name. No test for the original value is
+ done. */
+ alias_value = _nl_expand_alias (locale);
+ if (alias_value != NULL)
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ locale = strdup (alias_value);
+ if (locale == NULL)
+ return NULL;
+#else
+ size_t len = strlen (alias_value) + 1;
+ locale = (char *) malloc (len);
+ if (locale == NULL)
+ return NULL;
+
+ memcpy (locale, alias_value, len);
+#endif
+ }
+
+ /* Now we determine the single parts of the locale name. First
+ look for the language. Termination symbols are `_' and `@' if
+ we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+ mask = _nl_explode_name (locale, &language, &modifier, &territory,
+ &codeset, &normalized_codeset, &special,
+ &sponsor, &revision);
+
+ /* Create all possible locale entries which might be interested in
+ generalization. */
+ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+ strlen (dirname) + 1, mask, language, territory,
+ codeset, normalized_codeset, modifier, special,
+ sponsor, revision, domainname, domainbinding,
+ 1);
+ if (retval == NULL)
+ /* This means we are out of core. */
+ return NULL;
+
+ if (retval->decided == 0)
+ _nl_load_domain (retval);
+ if (retval->data == NULL)
+ {
+ int cnt;
+ for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+ {
+ if (retval->successor[cnt]->decided == 0)
+ _nl_load_domain (retval->successor[cnt]);
+ if (retval->successor[cnt]->data != NULL)
+ break;
+ }
+ }
+
+ /* The room for an alias was dynamically allocated. Free it now. */
+ if (alias_value != NULL)
+ free (locale);
+
+ /* The space for normalized_codeset is dynamically allocated. Free it. */
+ if (mask & XPG_NORM_CODESET)
+ free ((void *) normalized_codeset);
+
+ return retval;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ struct loaded_l10nfile *runp = _nl_loaded_domains;
+
+ while (runp != NULL)
+ {
+ struct loaded_l10nfile *here = runp;
+ if (runp->data != NULL)
+ _nl_unload_domain ((struct loaded_domain *) runp->data);
+ runp = runp->next;
+ free ((char *) here->filename);
+ free (here);
+ }
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif
diff --git a/intl/gettext.c b/intl/gettext.c
new file mode 100644
index 0000000..0607185
--- /dev/null
+++ b/intl/gettext.c
@@ -0,0 +1,73 @@
+/* Implementation of gettext(3) function.
+ Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# ifdef STDC_HEADERS
+# include <stdlib.h> /* Just for NULL. */
+# else
+# ifdef HAVE_STRING_H
+# include <string.h>
+# else
+# define NULL ((void *) 0)
+# endif
+# endif
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+#include <locale.h>
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define GETTEXT __gettext
+# define DCGETTEXT __dcgettext
+#else
+# define GETTEXT gettext__
+# define DCGETTEXT dcgettext__
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+char *
+GETTEXT (msgid)
+ const char *msgid;
+{
+ return DCGETTEXT (NULL, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__gettext, gettext);
+#endif
diff --git a/intl/gettext.h b/intl/gettext.h
new file mode 100644
index 0000000..a8bd7b5
--- /dev/null
+++ b/intl/gettext.h
@@ -0,0 +1,105 @@
+/* Internal header for GNU gettext internationalization functions.
+ Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _GETTEXT_H
+#define _GETTEXT_H 1
+
+#include <stdio.h>
+
+#if HAVE_LIMITS_H || _LIBC
+# include <limits.h>
+#endif
+
+/* @@ end of prolog @@ */
+
+/* The magic number of the GNU message catalog format. */
+#define _MAGIC 0x950412de
+#define _MAGIC_SWAPPED 0xde120495
+
+/* Revision number of the currently used .mo (binary) file format. */
+#define MO_REVISION_NUMBER 0
+
+/* The following contortions are an attempt to use the C preprocessor
+ to determine an unsigned integral type that is 32 bits wide. An
+ alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
+ doing that would require that the configure script compile and *run*
+ the resulting executable. Locally running cross-compiled executables
+ is usually not possible. */
+
+#if __STDC__
+# define UINT_MAX_32_BITS 4294967295U
+#else
+# define UINT_MAX_32_BITS 0xFFFFFFFF
+#endif
+
+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
+ This should be valid for all systems GNU cares about because
+ that doesn't include 16-bit systems, and only modern systems
+ (that certainly have <limits.h>) have 64+-bit integral types. */
+
+#ifndef UINT_MAX
+# define UINT_MAX UINT_MAX_32_BITS
+#endif
+
+#if UINT_MAX == UINT_MAX_32_BITS
+typedef unsigned nls_uint32;
+#else
+# if USHRT_MAX == UINT_MAX_32_BITS
+typedef unsigned short nls_uint32;
+# else
+# if ULONG_MAX == UINT_MAX_32_BITS
+typedef unsigned long nls_uint32;
+# else
+ /* The following line is intended to throw an error. Using #error is
+ not portable enough. */
+ "Cannot determine unsigned 32-bit data type."
+# endif
+# endif
+#endif
+
+
+/* Header for binary .mo file format. */
+struct mo_file_header
+{
+ /* The magic number. */
+ nls_uint32 magic;
+ /* The revision number of the file format. */
+ nls_uint32 revision;
+ /* The number of strings pairs. */
+ nls_uint32 nstrings;
+ /* Offset of table with start offsets of original strings. */
+ nls_uint32 orig_tab_offset;
+ /* Offset of table with start offsets of translation strings. */
+ nls_uint32 trans_tab_offset;
+ /* Size of hashing table. */
+ nls_uint32 hash_tab_size;
+ /* Offset of first hashing entry. */
+ nls_uint32 hash_tab_offset;
+};
+
+struct string_desc
+{
+ /* Length of addressed string. */
+ nls_uint32 length;
+ /* Offset of string in file. */
+ nls_uint32 offset;
+};
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettext.h */
diff --git a/intl/gettextP.h b/intl/gettextP.h
new file mode 100644
index 0000000..8dcbaf2
--- /dev/null
+++ b/intl/gettextP.h
@@ -0,0 +1,196 @@
+/* Header describing internals of gettext library
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _GETTEXTP_H
+#define _GETTEXTP_H
+
+#ifdef _LIBC
+# include "../iconv/gconv_int.h"
+#else
+# if HAVE_ICONV
+# include <iconv.h>
+# endif
+#endif
+
+#include "loadinfo.h"
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+ almost always true or almost always false. */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#ifndef W
+# define W(flag, data) ((flag) ? SWAP (data) : (data))
+#endif
+
+
+#ifdef _LIBC
+# include <byteswap.h>
+# define SWAP(i) bswap_32 (i)
+#else
+static nls_uint32 SWAP PARAMS ((nls_uint32 i));
+
+static inline nls_uint32
+SWAP (i)
+ nls_uint32 i;
+{
+ return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
+}
+#endif
+
+
+/* This is the representation of the expressions to determine the
+ plural form. */
+struct expression
+{
+ enum operator
+ {
+ var, /* The variable "n". */
+ num, /* Decimal number. */
+ mult, /* Multiplication. */
+ divide, /* Division. */
+ module, /* Module operation. */
+ plus, /* Addition. */
+ minus, /* Subtraction. */
+ equal, /* Comparision for equality. */
+ not_equal, /* Comparision for inequality. */
+ land, /* Logical AND. */
+ lor, /* Logical OR. */
+ qmop /* Question mark operator. */
+ } operation;
+ union
+ {
+ unsigned long int num; /* Number value for `num'. */
+ struct
+ {
+ struct expression *left; /* Left expression in binary operation. */
+ struct expression *right; /* Right expression in binary operation. */
+ } args2;
+ struct
+ {
+ struct expression *bexp; /* Boolean expression in ?: operation. */
+ struct expression *tbranch; /* True-branch in ?: operation. */
+ struct expression *fbranch; /* False-branch in ?: operation. */
+ } args3;
+ } val;
+};
+
+/* This is the data structure to pass information to the parser and get
+ the result in a thread-safe way. */
+struct parse_args
+{
+ const char *cp;
+ struct expression *res;
+};
+
+
+struct loaded_domain
+{
+ const char *data;
+ int use_mmap;
+ size_t mmap_size;
+ int must_swap;
+ nls_uint32 nstrings;
+ struct string_desc *orig_tab;
+ struct string_desc *trans_tab;
+ nls_uint32 hash_size;
+ nls_uint32 *hash_tab;
+#ifdef _LIBC
+ __gconv_t conv;
+#else
+# if HAVE_ICONV
+ iconv_t conv;
+# endif
+#endif
+ char **conv_tab;
+
+ struct expression *plural;
+ unsigned long int nplurals;
+};
+
+struct binding
+{
+ struct binding *next;
+ char *dirname;
+ char *codeset;
+#ifdef __GNUC__
+ char domainname[0];
+#else
+ char domainname[1];
+#endif
+};
+
+extern int _nl_msg_cat_cntr;
+
+struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
+ char *__locale,
+ const char *__domainname,
+ struct binding *__domainbinding))
+ internal_function;
+void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
+ internal_function;
+void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
+ internal_function;
+
+#ifdef _LIBC
+extern char *__ngettext PARAMS ((const char *msgid1, const char *msgid2,
+ unsigned long int n));
+extern char *__dngettext PARAMS ((const char *domainname, const char *msgid1,
+ const char *msgid2, unsigned long int n));
+extern char *__dcngettext PARAMS ((const char *domainname, const char *msgid1,
+ const char *msgid2, unsigned long int n,
+ int category));
+extern char *__dcigettext PARAMS ((const char *domainname, const char *msgid1,
+ const char *msgid2, int plural,
+ unsigned long int n, int category));
+#else
+extern char *ngettext__ PARAMS ((const char *msgid1, const char *msgid2,
+ unsigned long int n));
+extern char *dngettext__ PARAMS ((const char *domainname, const char *msgid1,
+ const char *msgid2, unsigned long int n));
+extern char *dcngettext__ PARAMS ((const char *domainname, const char *msgid1,
+ const char *msgid2, unsigned long int n,
+ int category));
+extern char *dcigettext__ PARAMS ((const char *domainname, const char *msgid1,
+ const char *msgid2, int plural,
+ unsigned long int n, int category));
+#endif
+
+extern int __gettextdebug;
+extern void __gettext_free_exp (struct expression *exp) internal_function;
+extern int __gettextparse (void *arg);
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettextP.h */
diff --git a/intl/hash-string.h b/intl/hash-string.h
new file mode 100644
index 0000000..107514c
--- /dev/null
+++ b/intl/hash-string.h
@@ -0,0 +1,59 @@
+/* Implements a string hashing function.
+ Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+#endif
+
+/* We assume to have `unsigned long int' value with at least 32 bits. */
+#define HASHWORDBITS 32
+
+
+/* Defines the so called `hashpjw' function by P.J. Weinberger
+ [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
+ 1986, 1987 Bell Telephone Laboratories, Inc.] */
+static unsigned long int hash_string PARAMS ((const char *__str_param));
+
+static inline unsigned long int
+hash_string (str_param)
+ const char *str_param;
+{
+ unsigned long int hval, g;
+ const char *str = str_param;
+
+ /* Compute the hash value for the given string. */
+ hval = 0;
+ while (*str != '\0')
+ {
+ hval <<= 4;
+ hval += (unsigned long int) *str++;
+ g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
+ if (g != 0)
+ {
+ hval ^= g >> (HASHWORDBITS - 8);
+ hval ^= g;
+ }
+ }
+ return hval;
+}
diff --git a/intl/intl-compat.c b/intl/intl-compat.c
new file mode 100644
index 0000000..503efa0
--- /dev/null
+++ b/intl/intl-compat.c
@@ -0,0 +1,76 @@
+/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
+ Library.
+ Copyright (C) 1995 Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "libgettext.h"
+
+/* @@ end of prolog @@ */
+
+
+#undef gettext
+#undef dgettext
+#undef dcgettext
+#undef textdomain
+#undef bindtextdomain
+
+
+char *
+bindtextdomain (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ return bindtextdomain__ (domainname, dirname);
+}
+
+
+char *
+dcgettext (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ int category;
+{
+ return dcgettext__ (domainname, msgid, category);
+}
+
+
+char *
+dgettext (domainname, msgid)
+ const char *domainname;
+ const char *msgid;
+{
+ return dgettext__ (domainname, msgid);
+}
+
+
+char *
+gettext (msgid)
+ const char *msgid;
+{
+ return gettext__ (msgid);
+}
+
+
+char *
+textdomain (domainname)
+ const char *domainname;
+{
+ return textdomain__ (domainname);
+}
diff --git a/intl/intlh.inst.in b/intl/intlh.inst.in
new file mode 100644
index 0000000..27cf6c7
--- /dev/null
+++ b/intl/intlh.inst.in
@@ -0,0 +1,111 @@
+/* Message catalogs for internationalization.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef _LIBINTL_H
+#define _LIBINTL_H 1
+
+@INCLUDE_LOCALE_H@
+
+/* We define an additional symbol to signal that we use the GNU
+ implementation of gettext. */
+#define __USE_GNU_GETTEXT 1
+
+#ifndef PARAMS
+# if __STDC__ || defined __cplusplus
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+extern char *gettext PARAMS ((const char *__msgid));
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+ LC_MESSAGES locale. */
+extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
+ int __category));
+
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+extern char *textdomain PARAMS ((const char *__domainname));
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+extern char *bindtextdomain PARAMS ((const char *__domainname,
+ const char *__dirname));
+
+
+/* Optimized version of the functions above. */
+#if defined __OPTIMIZED
+/* These must be a macro. Inlined functions are useless because the
+ `__builtin_constant_p' predicate in dcgettext would always return
+ false. */
+
+# define gettext(msgid) dgettext ((char *) 0, msgid)
+
+# define dgettext(domainname, msgid) \
+ dcgettext (domainname, msgid, LC_MESSAGES)
+
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+/* This global variable is defined in loadmsgcat.c. We need a sign,
+ whether a new catalog was loaded, which can be associated with all
+ translations. */
+extern int _nl_msg_cat_cntr;
+
+# define dcgettext(domainname, msgid, category) \
+ (__extension__ \
+ ({ \
+ char *__result; \
+ if (__builtin_constant_p (msgid)) \
+ { \
+ static char *__translation__; \
+ static int __catalog_counter__; \
+ if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
+ { \
+ __translation__ = \
+ (dcgettext) ((domainname), (msgid), (category)); \
+ __catalog_counter__ = _nl_msg_cat_cntr; \
+ } \
+ __result = __translation__; \
+ } \
+ else \
+ __result = (dcgettext) ((domainname), (msgid), (category)); \
+ __result; \
+ }))
+# endif
+#endif /* Optimizing. */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* libintl.h */
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
new file mode 100644
index 0000000..4cd6615
--- /dev/null
+++ b/intl/l10nflist.c
@@ -0,0 +1,419 @@
+/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#if defined _LIBC || defined HAVE_ARGZ_H
+# include <argz.h>
+#endif
+#include <ctype.h>
+#include <sys/types.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# ifndef stpcpy
+# define stpcpy(dest, src) __stpcpy(dest, src)
+# endif
+#else
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+#endif
+
+/* Define function which are usually not available. */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
+/* Returns the number of strings in ARGZ. */
+static size_t argz_count__ PARAMS ((const char *argz, size_t len));
+
+static size_t
+argz_count__ (argz, len)
+ const char *argz;
+ size_t len;
+{
+ size_t count = 0;
+ while (len > 0)
+ {
+ size_t part_len = strlen (argz);
+ argz += part_len + 1;
+ len -= part_len + 1;
+ count++;
+ }
+ return count;
+}
+# undef __argz_count
+# define __argz_count(argz, len) argz_count__ (argz, len)
+#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
+/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
+ except the last into the character SEP. */
+static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
+
+static void
+argz_stringify__ (argz, len, sep)
+ char *argz;
+ size_t len;
+ int sep;
+{
+ while (len > 0)
+ {
+ size_t part_len = strlen (argz);
+ argz += part_len;
+ len -= part_len + 1;
+ if (len > 0)
+ *argz++ = sep;
+ }
+}
+# undef __argz_stringify
+# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
+#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
+static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
+ const char *entry));
+
+static char *
+argz_next__ (argz, argz_len, entry)
+ char *argz;
+ size_t argz_len;
+ const char *entry;
+{
+ if (entry)
+ {
+ if (entry < argz + argz_len)
+ entry = strchr (entry, '\0') + 1;
+
+ return entry >= argz + argz_len ? NULL : (char *) entry;
+ }
+ else
+ if (argz_len > 0)
+ return argz;
+ else
+ return 0;
+}
+# undef __argz_next
+# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
+#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
+
+
+/* Return number of bits set in X. */
+static int pop PARAMS ((int x));
+
+static inline int
+pop (x)
+ int x;
+{
+ /* We assume that no more than 16 bits are used. */
+ x = ((x & ~0x5555) >> 1) + (x & 0x5555);
+ x = ((x & ~0x3333) >> 2) + (x & 0x3333);
+ x = ((x >> 4) + x) & 0x0f0f;
+ x = ((x >> 8) + x) & 0xff;
+
+ return x;
+}
+
+
+struct loaded_l10nfile *
+_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
+ territory, codeset, normalized_codeset, modifier, special,
+ sponsor, revision, filename, domainbinding, do_allocate)
+ struct loaded_l10nfile **l10nfile_list;
+ const char *dirlist;
+ size_t dirlist_len;
+ int mask;
+ const char *language;
+ const char *territory;
+ const char *codeset;
+ const char *normalized_codeset;
+ const char *modifier;
+ const char *special;
+ const char *sponsor;
+ const char *revision;
+ const char *filename;
+ struct binding *domainbinding;
+ int do_allocate;
+{
+ char *abs_filename;
+ struct loaded_l10nfile *last = NULL;
+ struct loaded_l10nfile *retval;
+ char *cp;
+ size_t entries;
+ int cnt;
+
+ /* Allocate room for the full file name. */
+ abs_filename = (char *) malloc (dirlist_len
+ + strlen (language)
+ + ((mask & TERRITORY) != 0
+ ? strlen (territory) + 1 : 0)
+ + ((mask & XPG_CODESET) != 0
+ ? strlen (codeset) + 1 : 0)
+ + ((mask & XPG_NORM_CODESET) != 0
+ ? strlen (normalized_codeset) + 1 : 0)
+ + (((mask & XPG_MODIFIER) != 0
+ || (mask & CEN_AUDIENCE) != 0)
+ ? strlen (modifier) + 1 : 0)
+ + ((mask & CEN_SPECIAL) != 0
+ ? strlen (special) + 1 : 0)
+ + (((mask & CEN_SPONSOR) != 0
+ || (mask & CEN_REVISION) != 0)
+ ? (1 + ((mask & CEN_SPONSOR) != 0
+ ? strlen (sponsor) + 1 : 0)
+ + ((mask & CEN_REVISION) != 0
+ ? strlen (revision) + 1 : 0)) : 0)
+ + 1 + strlen (filename) + 1);
+
+ if (abs_filename == NULL)
+ return NULL;
+
+ retval = NULL;
+ last = NULL;
+
+ /* Construct file name. */
+ memcpy (abs_filename, dirlist, dirlist_len);
+ __argz_stringify (abs_filename, dirlist_len, ':');
+ cp = abs_filename + (dirlist_len - 1);
+ *cp++ = '/';
+ cp = stpcpy (cp, language);
+
+ if ((mask & TERRITORY) != 0)
+ {
+ *cp++ = '_';
+ cp = stpcpy (cp, territory);
+ }
+ if ((mask & XPG_CODESET) != 0)
+ {
+ *cp++ = '.';
+ cp = stpcpy (cp, codeset);
+ }
+ if ((mask & XPG_NORM_CODESET) != 0)
+ {
+ *cp++ = '.';
+ cp = stpcpy (cp, normalized_codeset);
+ }
+ if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
+ {
+ /* This component can be part of both syntaces but has different
+ leading characters. For CEN we use `+', else `@'. */
+ *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
+ cp = stpcpy (cp, modifier);
+ }
+ if ((mask & CEN_SPECIAL) != 0)
+ {
+ *cp++ = '+';
+ cp = stpcpy (cp, special);
+ }
+ if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
+ {
+ *cp++ = ',';
+ if ((mask & CEN_SPONSOR) != 0)
+ cp = stpcpy (cp, sponsor);
+ if ((mask & CEN_REVISION) != 0)
+ {
+ *cp++ = '_';
+ cp = stpcpy (cp, revision);
+ }
+ }
+
+ *cp++ = '/';
+ stpcpy (cp, filename);
+
+ /* Look in list of already loaded domains whether it is already
+ available. */
+ last = NULL;
+ for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
+ if (retval->filename != NULL)
+ {
+ int compare = strcmp (retval->filename, abs_filename);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It's not in the list. */
+ retval = NULL;
+ break;
+ }
+
+ last = retval;
+ }
+
+ if (retval != NULL || do_allocate == 0)
+ {
+ free (abs_filename);
+ return retval;
+ }
+
+ retval = (struct loaded_l10nfile *)
+ malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
+ * (1 << pop (mask))
+ * sizeof (struct loaded_l10nfile *)));
+ if (retval == NULL)
+ return NULL;
+
+ retval->filename = abs_filename;
+ retval->domainbinding = domainbinding;
+ retval->decided = (__argz_count (dirlist, dirlist_len) != 1
+ || ((mask & XPG_CODESET) != 0
+ && (mask & XPG_NORM_CODESET) != 0));
+ retval->data = NULL;
+
+ if (last == NULL)
+ {
+ retval->next = *l10nfile_list;
+ *l10nfile_list = retval;
+ }
+ else
+ {
+ retval->next = last->next;
+ last->next = retval;
+ }
+
+ entries = 0;
+ /* If the DIRLIST is a real list the RETVAL entry corresponds not to
+ a real file. So we have to use the DIRLIST separation mechanism
+ of the inner loop. */
+ cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
+ for (; cnt >= 0; --cnt)
+ if ((cnt & ~mask) == 0
+ && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
+ && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
+ {
+ /* Iterate over all elements of the DIRLIST. */
+ char *dir = NULL;
+
+ while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
+ != NULL)
+ retval->successor[entries++]
+ = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
+ language, territory, codeset,
+ normalized_codeset, modifier, special,
+ sponsor, revision, filename, domainbinding,
+ 1);
+ }
+ retval->successor[entries] = NULL;
+
+ return retval;
+}
+
+/* Normalize codeset name. There is no standard for the codeset
+ names. Normalization allows the user to use any of the common
+ names. The return value is dynamically allocated and has to be
+ freed by the caller. */
+const char *
+_nl_normalize_codeset (codeset, name_len)
+ const char *codeset;
+ size_t name_len;
+{
+ int len = 0;
+ int only_digit = 1;
+ char *retval;
+ char *wp;
+ size_t cnt;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalnum (codeset[cnt]))
+ {
+ ++len;
+
+ if (isalpha (codeset[cnt]))
+ only_digit = 0;
+ }
+
+ retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
+
+ if (retval != NULL)
+ {
+ if (only_digit)
+ wp = stpcpy (retval, "iso");
+ else
+ wp = retval;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalpha (codeset[cnt]))
+ *wp++ = _tolower (codeset[cnt]);
+ else if (isdigit (codeset[cnt]))
+ *wp++ = codeset[cnt];
+
+ *wp = '\0';
+ }
+
+ return (const char *) retval;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
diff --git a/intl/libgettext.h b/intl/libgettext.h
new file mode 100644
index 0000000..3a92960
--- /dev/null
+++ b/intl/libgettext.h
@@ -0,0 +1,182 @@
+/* Message catalogs for internationalization.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* Because on some systems (e.g. Solaris) we sometimes have to include
+ the systems libintl.h as well as this file we have more complex
+ include protection above. But the systems header might perhaps also
+ define _LIBINTL_H and therefore we have to protect the definition here. */
+
+#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H
+#ifndef _LIBINTL_H
+# define _LIBINTL_H 1
+#endif
+#define _LIBGETTEXT_H 1
+
+/* We define an additional symbol to signal that we use the GNU
+ implementation of gettext. */
+#define __USE_GNU_GETTEXT 1
+
+#include <sys/types.h>
+
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __cplusplus
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef NULL
+# if !defined __cplusplus || defined __GNUC__
+# define NULL ((void *) 0)
+# else
+# define NULL (0)
+# endif
+#endif
+
+#if !HAVE_LC_MESSAGES
+/* This value determines the behaviour of the gettext() and dgettext()
+ function. But some system does not have this defined. Define it
+ to a default value. */
+# define LC_MESSAGES (-1)
+#endif
+
+
+/* Declarations for gettext-using-catgets interface. Derived from
+ Jim Meyering's libintl.h. */
+struct _msg_ent
+{
+ const char *_msg;
+ int _msg_number;
+};
+
+
+#if HAVE_CATGETS
+/* These two variables are defined in the automatically by po-to-tbl.sed
+ generated file `cat-id-tbl.c'. */
+extern const struct _msg_ent _msg_tbl[];
+extern int _msg_tbl_length;
+#endif
+
+
+/* For automatical extraction of messages sometimes no real
+ translation is needed. Instead the string itself is the result. */
+#define gettext_noop(Str) (Str)
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+extern char *gettext PARAMS ((const char *__msgid));
+extern char *gettext__ PARAMS ((const char *__msgid));
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+ LC_MESSAGES locale. */
+extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
+extern char *dgettext__ PARAMS ((const char *__domainname,
+ const char *__msgid));
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
+ int __category));
+extern char *dcgettext__ PARAMS ((const char *__domainname,
+ const char *__msgid, int __category));
+
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+extern char *textdomain PARAMS ((const char *__domainname));
+extern char *textdomain__ PARAMS ((const char *__domainname));
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+extern char *bindtextdomain PARAMS ((const char *__domainname,
+ const char *__dirname));
+extern char *bindtextdomain__ PARAMS ((const char *__domainname,
+ const char *__dirname));
+
+#if ENABLE_NLS
+
+/* Solaris 2.3 has the gettext function but dcgettext is missing.
+ So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
+ has dcgettext. */
+# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
+
+# define gettext(Msgid) \
+ dgettext (NULL, Msgid)
+
+# define dgettext(Domainname, Msgid) \
+ dcgettext (Domainname, Msgid, LC_MESSAGES)
+
+# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
+/* This global variable is defined in loadmsgcat.c. We need a sign,
+ whether a new catalog was loaded, which can be associated with all
+ translations. */
+extern int _nl_msg_cat_cntr;
+
+# define dcgettext(Domainname, Msgid, Category) \
+ (__extension__ \
+ ({ \
+ char *__result; \
+ if (__builtin_constant_p (Msgid)) \
+ { \
+ static char *__translation__; \
+ static int __catalog_counter__; \
+ if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
+ { \
+ __translation__ = \
+ dcgettext__ (Domainname, Msgid, Category); \
+ __catalog_counter__ = _nl_msg_cat_cntr; \
+ } \
+ __result = __translation__; \
+ } \
+ else \
+ __result = dcgettext__ (Domainname, Msgid, Category); \
+ __result; \
+ }))
+# endif
+# endif
+
+#else
+
+# define gettext(Msgid) (Msgid)
+# define dgettext(Domainname, Msgid) (Msgid)
+# define dcgettext(Domainname, Msgid, Category) (Msgid)
+# define textdomain(Domainname) ((char *) Domainname)
+# define bindtextdomain(Domainname, Dirname) ((char *) Dirname)
+
+#endif
+
+/* @@ begin of epilog @@ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/intl/libintl.glibc b/intl/libintl.glibc
new file mode 100644
index 0000000..967a8ca
--- /dev/null
+++ b/intl/libintl.glibc
@@ -0,0 +1,115 @@
+/* Message catalogs for internationalization.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ This file is derived from the file libgettext.h in the GNU gettext package.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _LIBINTL_H
+#define _LIBINTL_H 1
+
+#include <features.h>
+
+/* We define an additional symbol to signal that we use the GNU
+ implementation of gettext. */
+#define __USE_GNU_GETTEXT 1
+
+__BEGIN_DECLS
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+extern char *gettext (__const char *__msgid) __THROW;
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+ LC_MESSAGES locale. */
+extern char *dgettext (__const char *__domainname,
+ __const char *__msgid) __THROW;
+extern char *__dgettext (__const char *__domainname,
+ __const char *__msgid) __THROW;
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+extern char *dcgettext (__const char *__domainname,
+ __const char *__msgid, int __category) __THROW;
+extern char *__dcgettext (__const char *__domainname,
+ __const char *__msgid, int __category) __THROW;
+
+
+/* Similar to `gettext' but select the plural form corresponding to the
+ number N. */
+extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
+ unsigned long int __n)
+ __THROW __attribute__ ((__format_arg__ (1)));
+
+/* Similar to `dgettext' but select the plural form corresponding to the
+ number N. */
+extern char *dngettext (__const char *__domainname, __const char *__msgid1,
+ __const char *__msgid2, unsigned long int __n)
+ __THROW __attribute__ ((__format_arg__ (2)));
+
+/* Similar to `dcgettext' but select the plural form corresponding to the
+ number N. */
+extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
+ __const char *__msgid2, unsigned long int __n,
+ int __category)
+ __THROW __attribute__ ((__format_arg__ (2)));
+
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+extern char *textdomain (__const char *__domainname) __THROW;
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+extern char *bindtextdomain (__const char *__domainname,
+ __const char *__dirname) __THROW;
+
+/* Specify the character encoding in which the messages from the
+ DOMAINNAME message catalog will be returned. */
+extern char *bind_textdomain_codeset (__const char *__domainname,
+ __const char *__codeset) __THROW;
+
+
+/* Optimized version of the function above. */
+#if defined __OPTIMIZE__
+
+/* We need NULL for `gettext'. */
+# define __need_NULL
+# include <stddef.h>
+
+/* We need LC_MESSAGES for `dgettext'. */
+# include <locale.h>
+
+/* These must be macros. Inlined functions are useless because the
+ `__builtin_constant_p' predicate in dcgettext would always return
+ false. */
+
+# define gettext(msgid) dgettext (NULL, msgid)
+
+# define dgettext(domainname, msgid) \
+ dcgettext (domainname, msgid, LC_MESSAGES)
+
+# define ngettext(msgid, n) dngettext (NULL, msgid, n)
+
+# define dngettext(domainname, msgid, n) \
+ dcngettext (domainname, msgid, n, LC_MESSAGES)
+
+#endif /* Optimizing. */
+
+__END_DECLS
+
+#endif /* libintl.h */
diff --git a/intl/linux-msg.sed b/intl/linux-msg.sed
new file mode 100644
index 0000000..5918e72
--- /dev/null
+++ b/intl/linux-msg.sed
@@ -0,0 +1,100 @@
+# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+#
+# The first directive in the .msg should be the definition of the
+# message set number. We use always set number 1.
+#
+1 {
+ i\
+$set 1 # Automatically created by po2msg.sed
+ h
+ s/.*/0/
+ x
+}
+#
+# Mitch's old catalog format does not allow comments.
+#
+# We copy the original message as a comment into the .msg file.
+#
+/^msgid/ {
+ s/msgid[ ]*"//
+#
+# This does not work now with the new format.
+# /"$/! {
+# s/\\$//
+# s/$/ ... (more lines following)"/
+# }
+ x
+# The following nice solution is by
+# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+ td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+ :d
+ s/9\(_*\)$/_\1/
+ td
+# Assure at least one digit is available.
+ s/^\(_*\)$/0\1/
+# Increment the last digit.
+ s/8\(_*\)$/9\1/
+ s/7\(_*\)$/8\1/
+ s/6\(_*\)$/7\1/
+ s/5\(_*\)$/6\1/
+ s/4\(_*\)$/5\1/
+ s/3\(_*\)$/4\1/
+ s/2\(_*\)$/3\1/
+ s/1\(_*\)$/2\1/
+ s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+ s/_/0/g
+ x
+ G
+ s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
+}
+#
+# The .msg file contains, other then the .po file, only the translations
+# but each given a unique ID. Starting from 1 and incrementing by 1 for
+# each message we assign them to the messages.
+# It is important that the .po file used to generate the cat-id-tbl.c file
+# (with po-to-tbl) is the same as the one used here. (At least the order
+# of declarations must not be changed.)
+#
+/^msgstr/ {
+ s/msgstr[ ]*"\(.*\)"/# \1/
+# Clear substitution flag.
+ tb
+# Append the next line.
+ :b
+ N
+# Look whether second part is continuation line.
+ s/\(.*\n\)"\(.*\)"/\1\2/
+# Yes, then branch.
+ ta
+ P
+ D
+# Note that D includes a jump to the start!!
+# We found a continuation line. But before printing insert '\'.
+ :a
+ s/\(.*\)\(\n.*\)/\1\\\2/
+ P
+# We cannot use D here.
+ s/.*\n\(.*\)/\1/
+ tb
+}
+d
diff --git a/intl/loadinfo.h b/intl/loadinfo.h
new file mode 100644
index 0000000..1013470
--- /dev/null
+++ b/intl/loadinfo.h
@@ -0,0 +1,107 @@
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _LOADINFO_H
+#define _LOADINFO_H 1
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+ almost always true or almost always false. */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+/* Encoding of locale name parts. */
+#define CEN_REVISION 1
+#define CEN_SPONSOR 2
+#define CEN_SPECIAL 4
+#define XPG_NORM_CODESET 8
+#define XPG_CODESET 16
+#define TERRITORY 32
+#define CEN_AUDIENCE 64
+#define XPG_MODIFIER 128
+
+#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
+#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
+
+
+struct loaded_l10nfile
+{
+ const char *filename;
+ struct binding *domainbinding;
+ int decided;
+
+ const void *data;
+
+ struct loaded_l10nfile *next;
+ struct loaded_l10nfile *successor[1];
+};
+
+
+/* Normalize codeset name. There is no standard for the codeset
+ names. Normalization allows the user to use any of the common
+ names. The return value is dynamically allocated and has to be
+ freed by the caller. */
+extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
+ size_t name_len));
+
+extern struct loaded_l10nfile *
+_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
+ const char *dirlist, size_t dirlist_len, int mask,
+ const char *language, const char *territory,
+ const char *codeset,
+ const char *normalized_codeset,
+ const char *modifier, const char *special,
+ const char *sponsor, const char *revision,
+ const char *filename,
+ struct binding *domainbinding, int do_allocate));
+
+
+extern const char *_nl_expand_alias PARAMS ((const char *name));
+
+/* normalized_codeset is dynamically allocated and has to be freed by
+ the caller. */
+extern int _nl_explode_name PARAMS ((char *name, const char **language,
+ const char **modifier,
+ const char **territory,
+ const char **codeset,
+ const char **normalized_codeset,
+ const char **special,
+ const char **sponsor,
+ const char **revision));
+
+extern char *_nl_find_language PARAMS ((const char *name));
+
+
+extern char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
+ const char *msgid, unsigned long int index))
+ internal_function;
+
+#endif /* loadinfo.h */
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
new file mode 100644
index 0000000..4009525
--- /dev/null
+++ b/intl/loadmsgcat.c
@@ -0,0 +1,407 @@
+/* Load needed message catalogs.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#ifdef _LIBC
+# include <langinfo.h>
+#endif
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || (defined _LIBC && defined _POSIX_MAPPED_FILES)
+# include <sys/mman.h>
+# undef HAVE_MMAP
+# define HAVE_MMAP 1
+#else
+# undef HAVE_MMAP
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ISO C functions. This is required by the standard
+ because some ISO C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define open __open
+# define close __close
+# define read __read
+# define mmap __mmap
+# define munmap __munmap
+#endif
+
+/* We need a sign, whether a new catalog was loaded, which can be associated
+ with all translations. This is important if the translations are
+ cached by one of GCC's features. */
+int _nl_msg_cat_cntr;
+
+/* These structs are the constant expression for the germanic plural
+ form determination. */
+static const struct expression plvar =
+{
+ .operation = var,
+};
+static const struct expression plone =
+{
+ .operation = num,
+ .val =
+ {
+ .num = 1
+ }
+};
+static struct expression germanic_plural =
+{
+ .operation = not_equal,
+ .val =
+ {
+ .args2 = {
+ .left = (struct expression *) &plvar,
+ .right = (struct expression *) &plone
+ }
+ }
+};
+
+
+/* Load the message catalogs specified by FILENAME. If it is no valid
+ message catalog do nothing. */
+void
+internal_function
+_nl_load_domain (domain_file)
+ struct loaded_l10nfile *domain_file;
+{
+ int fd;
+ size_t size;
+ struct stat st;
+ struct mo_file_header *data = (struct mo_file_header *) -1;
+ int use_mmap = 0;
+ struct loaded_domain *domain;
+ char *nullentry;
+
+ domain_file->decided = 1;
+ domain_file->data = NULL;
+
+ /* If the record does not represent a valid locale the FILENAME
+ might be NULL. This can happen when according to the given
+ specification the locale file name is different for XPG and CEN
+ syntax. */
+ if (domain_file->filename == NULL)
+ return;
+
+ /* Try to open the addressed file. */
+ fd = open (domain_file->filename, O_RDONLY);
+ if (fd == -1)
+ return;
+
+ /* We must know about the size of the file. */
+ if (__builtin_expect (fstat (fd, &st) != 0, 0)
+ || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
+ || __builtin_expect (size < sizeof (struct mo_file_header), 0))
+ {
+ /* Something went wrong. */
+ close (fd);
+ return;
+ }
+
+#ifdef HAVE_MMAP
+ /* Now we are ready to load the file. If mmap() is available we try
+ this first. If not available or it failed we try to load it. */
+ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
+ MAP_PRIVATE, fd, 0);
+
+ if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
+ {
+ /* mmap() call was successful. */
+ close (fd);
+ use_mmap = 1;
+ }
+#endif
+
+ /* If the data is not yet available (i.e. mmap'ed) we try to load
+ it manually. */
+ if (data == (struct mo_file_header *) -1)
+ {
+ size_t to_read;
+ char *read_ptr;
+
+ data = (struct mo_file_header *) malloc (size);
+ if (data == NULL)
+ return;
+
+ to_read = size;
+ read_ptr = (char *) data;
+ do
+ {
+ long int nb = (long int) read (fd, read_ptr, to_read);
+ if (nb <= 0)
+ {
+#ifdef EINTR
+ if (nb == -1 && errno == EINTR)
+ continue;
+#endif
+ close (fd);
+ return;
+ }
+ read_ptr += nb;
+ to_read -= nb;
+ }
+ while (to_read > 0);
+
+ close (fd);
+ }
+
+ /* Using the magic number we can test whether it really is a message
+ catalog file. */
+ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
+ 0))
+ {
+ /* The magic number is wrong: not a message catalog file. */
+#ifdef HAVE_MMAP
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ return;
+ }
+
+ domain_file->data
+ = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+ if (domain_file->data == NULL)
+ return;
+
+ domain = (struct loaded_domain *) domain_file->data;
+ domain->data = (char *) data;
+ domain->use_mmap = use_mmap;
+ domain->mmap_size = size;
+ domain->must_swap = data->magic != _MAGIC;
+
+ /* Fill in the information about the available tables. */
+ switch (W (domain->must_swap, data->revision))
+ {
+ case 0:
+ domain->nstrings = W (domain->must_swap, data->nstrings);
+ domain->orig_tab = (struct string_desc *)
+ ((char *) data + W (domain->must_swap, data->orig_tab_offset));
+ domain->trans_tab = (struct string_desc *)
+ ((char *) data + W (domain->must_swap, data->trans_tab_offset));
+ domain->hash_size = W (domain->must_swap, data->hash_tab_size);
+ domain->hash_tab = (nls_uint32 *)
+ ((char *) data + W (domain->must_swap, data->hash_tab_offset));
+ break;
+ default:
+ /* This is an invalid revision. */
+#ifdef HAVE_MMAP
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ free (domain);
+ domain_file->data = NULL;
+ return;
+ }
+
+ /* Now find out about the character set the file is encoded with.
+ This can be found (in textual form) in the entry "". If this
+ entry does not exist or if this does not contain the `charset='
+ information, we will assume the charset matches the one the
+ current locale and we don't have to perform any conversion. */
+#ifdef _LIBC
+ domain->conv = (__gconv_t) -1;
+#else
+# if HAVE_ICONV
+ domain->conv = (iconv_t) -1;
+# endif
+#endif
+ domain->conv_tab = NULL;
+ nullentry = _nl_find_msg (domain_file, "", 0);
+ if (nullentry != NULL)
+ {
+#if defined _LIBC || HAVE_ICONV
+ const char *charsetstr;
+
+ charsetstr = strstr (nullentry, "charset=");
+ if (charsetstr != NULL)
+ {
+ size_t len;
+ char *charset;
+ const char *outcharset;
+
+ charsetstr += strlen ("charset=");
+ len = strcspn (charsetstr, " \t\n");
+
+ charset = (char *) alloca (len + 1);
+# if defined _LIBC || HAVE_MEMPCPY
+ *((char *) mempcpy (charset, charsetstr, len)) = '\0';
+# else
+ memcpy (charset, charsetstr, len);
+ charset[len] = '\0';
+# endif
+
+ /* The output charset should normally be determined by the
+ locale. But sometimes the locale is not used or not correctly
+ set up, so we provide a possibility for the user to override
+ this. Moreover, the value specified through
+ bind_textdomain_codeset overrides both. */
+ if (domain_file->domainbinding != NULL
+ && domain_file->domainbinding->codeset != NULL)
+ outcharset = domain_file->domainbinding->codeset;
+ else
+ {
+ outcharset = getenv ("OUTPUT_CHARSET");
+ if (outcharset == NULL || outcharset[0] == '\0')
+ {
+# ifdef _LIBC
+ outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
+# else
+# if HAVE_ICONV
+ extern const char *locale_charset (void);
+ outcharset = locale_charset ();
+ if (outcharset == NULL)
+ outcharset = "";
+# endif
+# endif
+ }
+ }
+
+# ifdef _LIBC
+ outcharset = norm_add_slashes (outcharset);
+ charset = norm_add_slashes (charset);
+ if (__gconv_open (outcharset, charset, &domain->conv,
+ GCONV_AVOID_NOCONV)
+ != __GCONV_OK)
+ domain->conv = (__gconv_t) -1;
+# else
+# if HAVE_ICONV
+ domain->conv = iconv_open (outcharset, charset);
+# endif
+# endif
+ }
+#endif /* _LIBC || HAVE_ICONV */
+ }
+
+ /* Also look for a plural specification. */
+ if (nullentry != NULL)
+ {
+ const char *plural;
+ const char *nplurals;
+
+ plural = strstr (nullentry, "plural=");
+ nplurals = strstr (nullentry, "nplurals=");
+ if (plural == NULL || nplurals == NULL)
+ goto no_plural;
+ else
+ {
+ /* First get the number. */
+ char *endp;
+ struct parse_args args;
+
+ nplurals += 9;
+ while (*nplurals != '\0' && isspace (*nplurals))
+ ++nplurals;
+ domain->nplurals = strtoul (nplurals, &endp, 10);
+ if (nplurals == endp)
+ goto no_plural;
+
+ /* Due to the restrictions bison imposes onto the interface of the
+ scanner function we have to put the input string and the result
+ passed up from the parser into the same structure which address
+ is passed down to the parser. */
+ plural += 7;
+ args.cp = plural;
+ if (__gettextparse (&args) != 0)
+ goto no_plural;
+ domain->plural = args.res;
+ }
+ }
+ else
+ {
+ /* By default we are using the Germanic form: singular form only
+ for `one', the plural form otherwise. Yes, this is also what
+ English is using since English is a Germanic language. */
+ no_plural:
+ domain->plural = &germanic_plural;
+ domain->nplurals = 2;
+ }
+}
+
+
+#ifdef _LIBC
+void
+internal_function
+_nl_unload_domain (domain)
+ struct loaded_domain *domain;
+{
+ if (domain->plural != &germanic_plural)
+ __gettext_free_exp (domain->plural);
+
+#ifdef _LIBC
+ if (domain->conv != (__gconv_t) -1)
+ __gconv_close (domain->conv);
+#else
+# if HAVE_ICONV
+ if (domain->conv != (iconv_t) -1)
+ iconv_close (domain->conv);
+# endif
+#endif
+
+#ifdef _POSIX_MAPPED_FILES
+ if (domain->use_mmap)
+ munmap ((caddr_t) domain->data, domain->mmap_size);
+ else
+#endif /* _POSIX_MAPPED_FILES */
+ free ((void *) domain->data);
+
+ free (domain);
+}
+#endif
diff --git a/intl/localealias.c b/intl/localealias.c
new file mode 100644
index 0000000..57c693d
--- /dev/null
+++ b/intl/localealias.c
@@ -0,0 +1,447 @@
+/* Handle aliases for locale names.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define strcasecmp __strcasecmp
+
+# ifndef mempcpy
+# define mempcpy __mempcpy
+# endif
+# define HAVE_MEMPCPY 1
+
+/* We need locking here since we can be called from different places. */
+# include <bits/libc-lock.h>
+
+__libc_lock_define_initialized (static, lock);
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* For those loosing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+/* Nothing has to be done. */
+# define ADD_BLOCK(list, address) /* nothing */
+# define FREE_BLOCKS(list) /* nothing */
+#else
+struct block_list
+{
+ void *address;
+ struct block_list *next;
+};
+# define ADD_BLOCK(list, addr) \
+ do { \
+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
+ /* If we cannot get a free block we cannot add the new element to \
+ the list. */ \
+ if (newp != NULL) { \
+ newp->address = (addr); \
+ newp->next = (list); \
+ (list) = newp; \
+ } \
+ } while (0)
+# define FREE_BLOCKS(list) \
+ do { \
+ while (list != NULL) { \
+ struct block_list *old = list; \
+ list = list->next; \
+ free (old); \
+ } \
+ } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+#endif /* have alloca */
+
+#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
+# undef fgets
+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
+#endif
+#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
+# undef feof
+# define feof(s) feof_unlocked (s)
+#endif
+
+
+struct alias_map
+{
+ const char *alias;
+ const char *value;
+};
+
+
+static char *string_space;
+static size_t string_space_act;
+static size_t string_space_max;
+static struct alias_map *map;
+static size_t nmap;
+static size_t maxmap;
+
+
+/* Prototypes for local functions. */
+static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
+ internal_function;
+static int extend_alias_table PARAMS ((void));
+static int alias_compare PARAMS ((const struct alias_map *map1,
+ const struct alias_map *map2));
+
+
+const char *
+_nl_expand_alias (name)
+ const char *name;
+{
+ static const char *locale_alias_path = LOCALE_ALIAS_PATH;
+ struct alias_map *retval;
+ const char *result = NULL;
+ size_t added;
+
+#ifdef _LIBC
+ __libc_lock_lock (lock);
+#endif
+
+ do
+ {
+ struct alias_map item;
+
+ item.alias = name;
+
+ if (nmap > 0)
+ retval = (struct alias_map *) bsearch (&item, map, nmap,
+ sizeof (struct alias_map),
+ (int (*) PARAMS ((const void *,
+ const void *))
+ ) alias_compare);
+ else
+ retval = NULL;
+
+ /* We really found an alias. Return the value. */
+ if (retval != NULL)
+ {
+ result = retval->value;
+ break;
+ }
+
+ /* Perhaps we can find another alias file. */
+ added = 0;
+ while (added == 0 && locale_alias_path[0] != '\0')
+ {
+ const char *start;
+
+ while (locale_alias_path[0] == ':')
+ ++locale_alias_path;
+ start = locale_alias_path;
+
+ while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
+ ++locale_alias_path;
+
+ if (start < locale_alias_path)
+ added = read_alias_file (start, locale_alias_path - start);
+ }
+ }
+ while (added != 0);
+
+#ifdef _LIBC
+ __libc_lock_unlock (lock);
+#endif
+
+ return result;
+}
+
+
+static size_t
+internal_function
+read_alias_file (fname, fname_len)
+ const char *fname;
+ int fname_len;
+{
+#ifndef HAVE_ALLOCA
+ struct block_list *block_list = NULL;
+#endif
+ FILE *fp;
+ char *full_fname;
+ size_t added;
+ static const char aliasfile[] = "/locale.alias";
+
+ full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+ ADD_BLOCK (block_list, full_fname);
+#ifdef HAVE_MEMPCPY
+ mempcpy (mempcpy (full_fname, fname, fname_len),
+ aliasfile, sizeof aliasfile);
+#else
+ memcpy (full_fname, fname, fname_len);
+ memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
+#endif
+
+ fp = fopen (full_fname, "r");
+ if (fp == NULL)
+ {
+ FREE_BLOCKS (block_list);
+ return 0;
+ }
+
+ added = 0;
+ while (!feof (fp))
+ {
+ /* It is a reasonable approach to use a fix buffer here because
+ a) we are only interested in the first two fields
+ b) these fields must be usable as file names and so must not
+ be that long
+ */
+ char buf[BUFSIZ];
+ char *alias;
+ char *value;
+ char *cp;
+
+ if (fgets (buf, sizeof buf, fp) == NULL)
+ /* EOF reached. */
+ break;
+
+ /* Possibly not the whole line fits into the buffer. Ignore
+ the rest of the line. */
+ if (strchr (buf, '\n') == NULL)
+ {
+ char altbuf[BUFSIZ];
+ do
+ if (fgets (altbuf, sizeof altbuf, fp) == NULL)
+ /* Make sure the inner loop will be left. The outer loop
+ will exit at the `feof' test. */
+ break;
+ while (strchr (altbuf, '\n') == NULL);
+ }
+
+ cp = buf;
+ /* Ignore leading white space. */
+ while (isspace (cp[0]))
+ ++cp;
+
+ /* A leading '#' signals a comment line. */
+ if (cp[0] != '\0' && cp[0] != '#')
+ {
+ alias = cp++;
+ while (cp[0] != '\0' && !isspace (cp[0]))
+ ++cp;
+ /* Terminate alias name. */
+ if (cp[0] != '\0')
+ *cp++ = '\0';
+
+ /* Now look for the beginning of the value. */
+ while (isspace (cp[0]))
+ ++cp;
+
+ if (cp[0] != '\0')
+ {
+ size_t alias_len;
+ size_t value_len;
+
+ value = cp++;
+ while (cp[0] != '\0' && !isspace (cp[0]))
+ ++cp;
+ /* Terminate value. */
+ if (cp[0] == '\n')
+ {
+ /* This has to be done to make the following test
+ for the end of line possible. We are looking for
+ the terminating '\n' which do not overwrite here. */
+ *cp++ = '\0';
+ *cp = '\n';
+ }
+ else if (cp[0] != '\0')
+ *cp++ = '\0';
+
+ if (nmap >= maxmap)
+ if (__builtin_expect (extend_alias_table (), 0))
+ {
+ FREE_BLOCKS (block_list);
+ return added;
+ }
+
+ alias_len = strlen (alias) + 1;
+ value_len = strlen (value) + 1;
+
+ if (string_space_act + alias_len + value_len > string_space_max)
+ {
+ /* Increase size of memory pool. */
+ size_t new_size = (string_space_max
+ + (alias_len + value_len > 1024
+ ? alias_len + value_len : 1024));
+ char *new_pool = (char *) realloc (string_space, new_size);
+ if (new_pool == NULL)
+ {
+ FREE_BLOCKS (block_list);
+ return added;
+ }
+ string_space = new_pool;
+ string_space_max = new_size;
+ }
+
+ map[nmap].alias = memcpy (&string_space[string_space_act],
+ alias, alias_len);
+ string_space_act += alias_len;
+
+ map[nmap].value = memcpy (&string_space[string_space_act],
+ value, value_len);
+ string_space_act += value_len;
+
+ ++nmap;
+ ++added;
+ }
+ }
+ }
+
+ /* Should we test for ferror()? I think we have to silently ignore
+ errors. --drepper */
+ fclose (fp);
+
+ if (added > 0)
+ qsort (map, nmap, sizeof (struct alias_map),
+ (int (*) PARAMS ((const void *, const void *))) alias_compare);
+
+ FREE_BLOCKS (block_list);
+ return added;
+}
+
+
+static int
+extend_alias_table ()
+{
+ size_t new_size;
+ struct alias_map *new_map;
+
+ new_size = maxmap == 0 ? 100 : 2 * maxmap;
+ new_map = (struct alias_map *) realloc (map, (new_size
+ * sizeof (struct alias_map)));
+ if (new_map == NULL)
+ /* Simply don't extend: we don't have any more core. */
+ return -1;
+
+ map = new_map;
+ maxmap = new_size;
+ return 0;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ if (string_space != NULL)
+ free (string_space);
+ if (map != NULL)
+ free (map);
+}
+text_set_element (__libc_subfreeres, free_mem);
+#endif
+
+
+static int
+alias_compare (map1, map2)
+ const struct alias_map *map1;
+ const struct alias_map *map2;
+{
+#if defined _LIBC || defined HAVE_STRCASECMP
+ return strcasecmp (map1->alias, map2->alias);
+#else
+ const unsigned char *p1 = (const unsigned char *) map1->alias;
+ const unsigned char *p2 = (const unsigned char *) map2->alias;
+ unsigned char c1, c2;
+
+ if (p1 == p2)
+ return 0;
+
+ do
+ {
+ /* I know this seems to be odd but the tolower() function in
+ some systems libc cannot handle nonalpha characters. */
+ c1 = isupper (*p1) ? tolower (*p1) : *p1;
+ c2 = isupper (*p2) ? tolower (*p2) : *p2;
+ if (c1 == '\0')
+ break;
+ ++p1;
+ ++p2;
+ }
+ while (c1 == c2);
+
+ return c1 - c2;
+#endif
+}
diff --git a/intl/ngettext.c b/intl/ngettext.c
new file mode 100644
index 0000000..5340732
--- /dev/null
+++ b/intl/ngettext.c
@@ -0,0 +1,77 @@
+/* Implementation of ngettext(3) function.
+ Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# ifdef STDC_HEADERS
+# include <stdlib.h> /* Just for NULL. */
+# else
+# ifdef HAVE_STRING_H
+# include <string.h>
+# else
+# define NULL ((void *) 0)
+# endif
+# endif
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+#include <locale.h>
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define NGETTEXT __ngettext
+# define DCNGETTEXT __dcngettext
+#else
+# define NGETTEXT ngettext__
+# define DCNGETTEXT dcngettext__
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+char *
+NGETTEXT (msgid1, msgid2, n)
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__ngettext, ngettext);
+#endif
diff --git a/intl/plural.c b/intl/plural.c
new file mode 100644
index 0000000..f9165b7
--- /dev/null
+++ b/intl/plural.c
@@ -0,0 +1,1218 @@
+
+/* A Bison parser, made from plural.y
+ by GNU Bison version 1.28 */
+
+#define YYBISON 1 /* Identify Bison output. */
+
+#define yyparse __gettextparse
+#define yylex __gettextlex
+#define yyerror __gettexterror
+#define yylval __gettextlval
+#define yychar __gettextchar
+#define yydebug __gettextdebug
+#define yynerrs __gettextnerrs
+#define NUMBER 257
+
+#line 1 "plural.y"
+
+/* Expression parsing for plural form selection.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include "gettext.h"
+#include "gettextP.h"
+
+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM arg
+
+#line 32 "plural.y"
+typedef union {
+ unsigned long int num;
+ struct expression *exp;
+} YYSTYPE;
+#line 37 "plural.y"
+
+/* Prototypes for local functions. */
+static struct expression *new_exp (enum operator op, ...);
+static int yylex (YYSTYPE *lval, const char **pexp);
+static void yyerror (const char *str);
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define YYFINAL 31
+#define YYFLAG -32768
+#define YYNTBASE 18
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 257 ? yytranslate[x] : 20)
+
+static const char yytranslate[] = { 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 7, 2, 2, 2, 12, 5, 2, 16,
+ 17, 10, 8, 2, 9, 2, 11, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 14, 2, 2,
+ 6, 2, 3, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 15,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 4, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 13
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = { 0,
+ 0, 2, 8, 12, 16, 20, 24, 28, 32, 36,
+ 40, 44, 46, 48
+};
+
+static const short yyrhs[] = { 19,
+ 0, 19, 3, 19, 14, 19, 0, 19, 4, 19,
+ 0, 19, 5, 19, 0, 19, 6, 19, 0, 19,
+ 7, 19, 0, 19, 8, 19, 0, 19, 9, 19,
+ 0, 19, 10, 19, 0, 19, 11, 19, 0, 19,
+ 12, 19, 0, 15, 0, 13, 0, 16, 19, 17,
+ 0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+ 55, 61, 66, 71, 76, 81, 86, 91, 96, 101,
+ 106, 111, 116, 122
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = { "$","error","$undefined.","'?'","'|'",
+"'&'","'='","'!'","'+'","'-'","'*'","'/'","'%'","NUMBER","':'","'n'","'('","')'",
+"start","exp", NULL
+};
+#endif
+
+static const short yyr1[] = { 0,
+ 18, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19
+};
+
+static const short yyr2[] = { 0,
+ 1, 5, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 1, 1, 3
+};
+
+static const short yydefact[] = { 0,
+ 13, 12, 0, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 14, 0, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 0, 2, 0, 0,
+ 0
+};
+
+static const short yydefgoto[] = { 29,
+ 4
+};
+
+static const short yypact[] = { 58,
+-32768,-32768, 58, 37, 10, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58,-32768, 25, 45, 52, 57,
+ 57, 65, 65,-32768,-32768,-32768, 58, 37, 1, 2,
+-32768
+};
+
+static const short yypgoto[] = {-32768,
+ -3
+};
+
+
+#define YYLAST 77
+
+
+static const short yytable[] = { 5,
+ 30, 31, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 0, 28, 0, 0, 16, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 0, 27, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 8,
+ 9, 10, 11, 12, 13, 14, 15, 9, 10, 11,
+ 12, 13, 14, 15, 11, 12, 13, 14, 15, 0,
+ 1, 0, 2, 3, 13, 14, 15
+};
+
+static const short yycheck[] = { 3,
+ 0, 0, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, -1, 27, -1, -1, 17, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 5,
+ 6, 7, 8, 9, 10, 11, 12, 6, 7, 8,
+ 9, 10, 11, 12, 8, 9, 10, 11, 12, -1,
+ 13, -1, 15, 16, 10, 11, 12
+};
+#define YYPURE 1
+
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+#line 3 "/usr/share/bison.simple"
+/* This file comes from bison-1.28. */
+
+/* Skeleton output parser for bison,
+ Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C. */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+ It is replaced by the list of actions, each action
+ as one case of the switch. */
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+ This remains here temporarily to ease the
+ transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
+#define YYRECOVERING() (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { yychar = (token), yylval = (value); \
+ yychar1 = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { yyerror ("syntax error: cannot back up"); YYERROR; } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+#ifndef YYPURE
+#define YYLEX yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int yychar; /* the lookahead symbol */
+YYSTYPE yylval; /* the semantic value of the */
+ /* lookahead symbol */
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc; /* location data for the lookahead */
+ /* symbol */
+#endif
+
+int yynerrs; /* number of parse errors so far */
+#endif /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug; /* nonzero means print parse trace */
+/* Since this is uninitialized, it does not stop multiple parsers
+ from coexisting. */
+#endif
+
+/* YYINITDEPTH indicates the initial size of the parser's stacks */
+
+#ifndef YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH is the maximum size the stacks can grow to
+ (effective only if the built-in stack extension method is used). */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Define __yy_memcpy. Note that the size argument
+ should be passed with type unsigned int, because that is what the non-GCC
+ definitions require. With GCC, __builtin_memcpy takes an arg
+ of type size_t, but it can handle unsigned int. */
+
+#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
+#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
+#else /* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (to, from, count)
+ char *to;
+ char *from;
+ unsigned int count;
+{
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (char *to, char *from, unsigned int count)
+{
+ register char *t = to;
+ register char *f = from;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 217 "/usr/share/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+ into yyparse. The argument should have type void *.
+ It should actually point to an object.
+ Grammar actions can access the variable by casting it
+ to the proper pointer type. */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+ YYPARSE_PARAM_DECL
+{
+ register int yystate;
+ register int yyn;
+ register short *yyssp;
+ register YYSTYPE *yyvsp;
+ int yyerrstatus; /* number of tokens to shift before error messages enabled */
+ int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+
+ short yyssa[YYINITDEPTH]; /* the state stack */
+ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+
+ short *yyss = yyssa; /* refer to the stacks thru separate pointers */
+ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
+
+#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK (yyvsp--, yyssp--)
+#endif
+
+ int yystacksize = YYINITDEPTH;
+ int yyfree_stacks = 0;
+
+#ifdef YYPURE
+ int yychar;
+ YYSTYPE yylval;
+ int yynerrs;
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylloc;
+#endif
+#endif
+
+ YYSTYPE yyval; /* the variable used to return */
+ /* semantic values from the action */
+ /* routines */
+
+ int yylen;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Starting parse\n");
+#endif
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss - 1;
+ yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in yystate . */
+/* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks. */
+yynewstate:
+
+ *++yyssp = yystate;
+
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /* Give user a chance to reallocate the stack */
+ /* Use copies of these so that the &'s don't force the real ones into memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+ YYLTYPE *yyls1 = yyls;
+#endif
+
+ /* Get the current used size of the three stacks, in elements. */
+ int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ /* Each stack pointer address is followed by the size of
+ the data in use in that stack, in bytes. */
+#ifdef YYLSP_NEEDED
+ /* This used to be a conditional around just the two extra args,
+ but that might be undefined if yyoverflow is a macro. */
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yyls1, size * sizeof (*yylsp),
+ &yystacksize);
+#else
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yystacksize);
+#endif
+
+ yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+ yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+ /* Extend the stack our own way. */
+ if (yystacksize >= YYMAXDEPTH)
+ {
+ yyerror("parser stack overflow");
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 2;
+ }
+ yystacksize *= 2;
+ if (yystacksize > YYMAXDEPTH)
+ yystacksize = YYMAXDEPTH;
+#ifndef YYSTACK_USE_ALLOCA
+ yyfree_stacks = 1;
+#endif
+ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss, (char *)yyss1,
+ size * (unsigned int) sizeof (*yyssp));
+ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+ size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls, (char *)yyls1,
+ size * (unsigned int) sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + size - 1;
+ yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+ if (yyssp >= yyss + yystacksize - 1)
+ YYABORT;
+ }
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+ goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* yychar is either YYEMPTY or YYEOF
+ or a valid token in external form. */
+
+ if (yychar == YYEMPTY)
+ {
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Reading a token: ");
+#endif
+ yychar = YYLEX;
+ }
+
+ /* Convert token to internal form (in yychar1) for indexing tables with */
+
+ if (yychar <= 0) /* This means end of input. */
+ {
+ yychar1 = 0;
+ yychar = YYEOF; /* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Now at end of input.\n");
+#endif
+ }
+ else
+ {
+ yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+ /* Give the individual parser a way to print the precise meaning
+ of a token, for further debugging info. */
+#ifdef YYPRINT
+ YYPRINT (stderr, yychar, yylval);
+#endif
+ fprintf (stderr, ")\n");
+ }
+#endif
+ }
+
+ yyn += yychar1;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ goto yydefault;
+
+ yyn = yytable[yyn];
+
+ /* yyn is what to do for this token type in this state.
+ Negative => reduce, -yyn is rule number.
+ Positive => shift, yyn is new state.
+ New state is final state => don't bother to shift,
+ just return success.
+ 0, or most negative number => error. */
+
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrlab;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ /* count tokens shifted since error; after three, turn off error status. */
+ if (yyerrstatus) yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+/* Do the default action for the current state. */
+yydefault:
+
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+
+/* Do a reduction. yyn is the number of a rule to reduce with. */
+yyreduce:
+ yylen = yyr2[yyn];
+ if (yylen > 0)
+ yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ int i;
+
+ fprintf (stderr, "Reducing via rule %d (line %d), ",
+ yyn, yyrline[yyn]);
+
+ /* Print the symbols being reduced, and their result. */
+ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+ fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+ fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+ }
+#endif
+
+
+ switch (yyn) {
+
+case 1:
+#line 56 "plural.y"
+{
+ ((struct parse_args *) arg)->res = yyvsp[0].exp;
+ ;
+ break;}
+case 2:
+#line 62 "plural.y"
+{
+ if ((yyval.exp = new_exp (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 3:
+#line 67 "plural.y"
+{
+ if ((yyval.exp = new_exp (lor, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 4:
+#line 72 "plural.y"
+{
+ if ((yyval.exp = new_exp (land, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 5:
+#line 77 "plural.y"
+{
+ if ((yyval.exp = new_exp (equal, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 6:
+#line 82 "plural.y"
+{
+ if ((yyval.exp = new_exp (not_equal, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 7:
+#line 87 "plural.y"
+{
+ if ((yyval.exp = new_exp (plus, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 8:
+#line 92 "plural.y"
+{
+ if ((yyval.exp = new_exp (minus, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 9:
+#line 97 "plural.y"
+{
+ if ((yyval.exp = new_exp (mult, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 10:
+#line 102 "plural.y"
+{
+ if ((yyval.exp = new_exp (divide, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 11:
+#line 107 "plural.y"
+{
+ if ((yyval.exp = new_exp (module, yyvsp[-2].exp, yyvsp[0].exp, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 12:
+#line 112 "plural.y"
+{
+ if ((yyval.exp = new_exp (var, NULL)) == NULL)
+ YYABORT
+ ;
+ break;}
+case 13:
+#line 117 "plural.y"
+{
+ if ((yyval.exp = new_exp (num, NULL)) == NULL)
+ YYABORT;
+ yyval.exp->val.num = yyvsp[0].num
+ ;
+ break;}
+case 14:
+#line 123 "plural.y"
+{
+ yyval.exp = yyvsp[-1].exp
+ ;
+ break;}
+}
+ /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/share/bison.simple"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+ yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+ *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+ yylsp++;
+ if (yylen == 0)
+ {
+ yylsp->first_line = yylloc.first_line;
+ yylsp->first_column = yylloc.first_column;
+ yylsp->last_line = (yylsp-1)->last_line;
+ yylsp->last_column = (yylsp-1)->last_column;
+ yylsp->text = 0;
+ }
+ else
+ {
+ yylsp->last_line = (yylsp+yylen-1)->last_line;
+ yylsp->last_column = (yylsp+yylen-1)->last_column;
+ }
+#endif
+
+ /* Now "shift" the result of the reduction.
+ Determine what state that goes to,
+ based on the state we popped back to
+ and the rule number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTBASE];
+
+ goto yynewstate;
+
+yyerrlab: /* here on detecting error */
+
+ if (! yyerrstatus)
+ /* If not already recovering from an error, report this error. */
+ {
+ ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (yyn > YYFLAG && yyn < YYLAST)
+ {
+ int size = 0;
+ char *msg;
+ int x, count;
+
+ count = 0;
+ /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ size += strlen(yytname[x]) + 15, count++;
+ msg = (char *) malloc(size + 15);
+ if (msg != 0)
+ {
+ strcpy(msg, "parse error");
+
+ if (count < 5)
+ {
+ count = 0;
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ {
+ strcat(msg, count == 0 ? ", expecting `" : " or `");
+ strcat(msg, yytname[x]);
+ strcat(msg, "'");
+ count++;
+ }
+ }
+ yyerror(msg);
+ free(msg);
+ }
+ else
+ yyerror ("parse error; also virtual memory exceeded");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror("parse error");
+ }
+
+ goto yyerrlab1;
+yyerrlab1: /* here on error raised explicitly by an action */
+
+ if (yyerrstatus == 3)
+ {
+ /* if just tried and failed to reuse lookahead token after an error, discard it. */
+
+ /* return failure if at end of input */
+ if (yychar == YYEOF)
+ YYABORT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+ yychar = YYEMPTY;
+ }
+
+ /* Else will try to reuse lookahead token
+ after shifting the error token. */
+
+ yyerrstatus = 3; /* Each real token shifted decrements this */
+
+ goto yyerrhandle;
+
+yyerrdefault: /* current state does not do anything special for the error token. */
+
+#if 0
+ /* This is wrong; only states that explicitly want error tokens
+ should shift them. */
+ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
+ if (yyn) goto yydefault;
+#endif
+
+yyerrpop: /* pop the current state because it cannot handle the error token */
+
+ if (yyssp == yyss) YYABORT;
+ yyvsp--;
+ yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+ yylsp--;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "Error: state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+yyerrhandle:
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yyerrdefault;
+
+ yyn += YYTERROR;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+ goto yyerrdefault;
+
+ yyn = yytable[yyn];
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrpop;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrpop;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting error token, ");
+#endif
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ yystate = yyn;
+ goto yynewstate;
+
+ yyacceptlab:
+ /* YYACCEPT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 0;
+
+ yyabortlab:
+ /* YYABORT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 1;
+}
+#line 128 "plural.y"
+
+
+static struct expression *
+new_exp (enum operator op, ...)
+{
+ struct expression *newp = (struct expression *) malloc (sizeof (*newp));
+ va_list va;
+ struct expression *next;
+
+ va_start (va, op);
+
+ if (newp == NULL)
+ while ((next = va_arg (va, struct expression *)) != NULL)
+ __gettext_free_exp (next);
+ else
+ {
+ newp->operation = op;
+ next = va_arg (va, struct expression *);
+ if (next != NULL)
+ {
+ newp->val.args3.bexp = next;
+ next = va_arg (va, struct expression *);
+ if (next != NULL)
+ {
+ newp->val.args3.tbranch = next;
+ next = va_arg (va, struct expression *);
+ if (next != NULL)
+ newp->val.args3.fbranch = next;
+ }
+ }
+ }
+
+ va_end (va);
+
+ return newp;
+}
+
+void
+internal_function
+__gettext_free_exp (struct expression *exp)
+{
+ if (exp == NULL)
+ return;
+
+ /* Handle the recursive case. */
+ switch (exp->operation)
+ {
+ case qmop:
+ __gettext_free_exp (exp->val.args3.fbranch);
+ /* FALLTHROUGH */
+
+ case mult:
+ case divide:
+ case module:
+ case plus:
+ case minus:
+ case equal:
+ case not_equal:
+ case land:
+ case lor:
+ __gettext_free_exp (exp->val.args2.right);
+ __gettext_free_exp (exp->val.args2.left);
+ break;
+
+ default:
+ break;
+ }
+
+ free (exp);
+}
+
+
+static int
+yylex (YYSTYPE *lval, const char **pexp)
+{
+ const char *exp = *pexp;
+ int result;
+
+ while (1)
+ {
+ if (exp[0] == '\\' && exp[1] == '\n')
+ {
+ exp += 2;
+ continue;
+ }
+ if (exp[0] != '\0' && exp[0] != ' ' && exp[0] != '\t')
+ break;
+
+ ++exp;
+ }
+
+ result = *exp++;
+ switch (result)
+ {
+ case '0' ... '9':
+ {
+ unsigned long int n = exp[-1] - '0';
+ while (exp[0] >= '0' && exp[0] <= '9')
+ {
+ n *= 10;
+ n += exp[0] - '0';
+ ++exp;
+ }
+ lval->num = n;
+ result = NUMBER;
+ }
+ break;
+
+ case '=':
+ case '!':
+ if (exp[0] == '=')
+ ++exp;
+ else
+ result = YYERRCODE;
+ break;
+
+ case '&':
+ case '|':
+ if (exp[0] == result)
+ ++exp;
+ else
+ result = YYERRCODE;
+ break;
+
+ case 'n':
+ case '*':
+ case '/':
+ case '%':
+ case '+':
+ case '-':
+ case '?':
+ case ':':
+ case '(':
+ case ')':
+ /* Nothing, just return the character. */
+ break;
+
+ case '\n':
+ case '\0':
+ /* Be safe and let the user call this function again. */
+ --exp;
+ result = YYEOF;
+ break;
+
+ default:
+ result = YYERRCODE;
+#if YYDEBUG != 0
+ --exp;
+#endif
+ break;
+ }
+
+ *pexp = exp;
+
+ return result;
+}
+
+
+static void
+yyerror (const char *str)
+{
+ /* Do nothing. We don't print error messages here. */
+}
diff --git a/intl/plural.y b/intl/plural.y
new file mode 100644
index 0000000..00b6fcc
--- /dev/null
+++ b/intl/plural.y
@@ -0,0 +1,290 @@
+%{
+/* Expression parsing for plural form selection.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include "gettext.h"
+#include "gettextP.h"
+
+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM arg
+%}
+%pure_parser
+%expect 10
+
+%union {
+ unsigned long int num;
+ struct expression *exp;
+}
+
+%{
+/* Prototypes for local functions. */
+static struct expression *new_exp (enum operator op, ...);
+static int yylex (YYSTYPE *lval, const char **pexp);
+static void yyerror (const char *str);
+%}
+
+%left '?'
+%left '|'
+%left '&'
+%left '=', '!'
+%left '+', '-'
+%left '*', '/', '%'
+%token <num> NUMBER
+%type <exp> exp
+
+%%
+
+start: exp
+ {
+ ((struct parse_args *) arg)->res = $1;
+ }
+ ;
+
+exp: exp '?' exp ':' exp
+ {
+ if (($$ = new_exp (qmop, $1, $3, $5, NULL)) == NULL)
+ YYABORT
+ }
+ | exp '|' exp
+ {
+ if (($$ = new_exp (lor, $1, $3, NULL)) == NULL)
+ YYABORT
+ }
+ | exp '&' exp
+ {
+ if (($$ = new_exp (land, $1, $3, NULL)) == NULL)
+ YYABORT
+ }
+ | exp '=' exp
+ {
+ if (($$ = new_exp (equal, $1, $3, NULL)) == NULL)
+ YYABORT
+ }
+ | exp '!' exp
+ {
+ if (($$ = new_exp (not_equal, $1, $3, NULL)) == NULL)
+ YYABORT
+ }
+ | exp '+' exp
+ {
+ if (($$ = new_exp (plus, $1, $3, NULL)) == NULL)
+ YYABORT
+ }
+ | exp '-' exp
+ {
+ if (($$ = new_exp (minus, $1, $3, NULL)) == NULL)
+ YYABORT
+ }
+ | exp '*' exp
+ {
+ if (($$ = new_exp (mult, $1, $3, NULL)) == NULL)
+ YYABORT
+ }
+ | exp '/' exp
+ {
+ if (($$ = new_exp (divide, $1, $3, NULL)) == NULL)
+ YYABORT
+ }
+ | exp '%' exp
+ {
+ if (($$ = new_exp (module, $1, $3, NULL)) == NULL)
+ YYABORT
+ }
+ | 'n'
+ {
+ if (($$ = new_exp (var, NULL)) == NULL)
+ YYABORT
+ }
+ | NUMBER
+ {
+ if (($$ = new_exp (num, NULL)) == NULL)
+ YYABORT;
+ $$->val.num = $1
+ }
+ | '(' exp ')'
+ {
+ $$ = $2
+ }
+ ;
+
+%%
+
+static struct expression *
+new_exp (enum operator op, ...)
+{
+ struct expression *newp = (struct expression *) malloc (sizeof (*newp));
+ va_list va;
+ struct expression *next;
+
+ va_start (va, op);
+
+ if (newp == NULL)
+ while ((next = va_arg (va, struct expression *)) != NULL)
+ __gettext_free_exp (next);
+ else
+ {
+ newp->operation = op;
+ next = va_arg (va, struct expression *);
+ if (next != NULL)
+ {
+ newp->val.args3.bexp = next;
+ next = va_arg (va, struct expression *);
+ if (next != NULL)
+ {
+ newp->val.args3.tbranch = next;
+ next = va_arg (va, struct expression *);
+ if (next != NULL)
+ newp->val.args3.fbranch = next;
+ }
+ }
+ }
+
+ va_end (va);
+
+ return newp;
+}
+
+void
+internal_function
+__gettext_free_exp (struct expression *exp)
+{
+ if (exp == NULL)
+ return;
+
+ /* Handle the recursive case. */
+ switch (exp->operation)
+ {
+ case qmop:
+ __gettext_free_exp (exp->val.args3.fbranch);
+ /* FALLTHROUGH */
+
+ case mult:
+ case divide:
+ case module:
+ case plus:
+ case minus:
+ case equal:
+ case not_equal:
+ case land:
+ case lor:
+ __gettext_free_exp (exp->val.args2.right);
+ __gettext_free_exp (exp->val.args2.left);
+ break;
+
+ default:
+ break;
+ }
+
+ free (exp);
+}
+
+
+static int
+yylex (YYSTYPE *lval, const char **pexp)
+{
+ const char *exp = *pexp;
+ int result;
+
+ while (1)
+ {
+ if (exp[0] == '\\' && exp[1] == '\n')
+ {
+ exp += 2;
+ continue;
+ }
+ if (exp[0] != '\0' && exp[0] != ' ' && exp[0] != '\t')
+ break;
+
+ ++exp;
+ }
+
+ result = *exp++;
+ switch (result)
+ {
+ case '0' ... '9':
+ {
+ unsigned long int n = exp[-1] - '0';
+ while (exp[0] >= '0' && exp[0] <= '9')
+ {
+ n *= 10;
+ n += exp[0] - '0';
+ ++exp;
+ }
+ lval->num = n;
+ result = NUMBER;
+ }
+ break;
+
+ case '=':
+ case '!':
+ if (exp[0] == '=')
+ ++exp;
+ else
+ result = YYERRCODE;
+ break;
+
+ case '&':
+ case '|':
+ if (exp[0] == result)
+ ++exp;
+ else
+ result = YYERRCODE;
+ break;
+
+ case 'n':
+ case '*':
+ case '/':
+ case '%':
+ case '+':
+ case '-':
+ case '?':
+ case ':':
+ case '(':
+ case ')':
+ /* Nothing, just return the character. */
+ break;
+
+ case '\n':
+ case '\0':
+ /* Be safe and let the user call this function again. */
+ --exp;
+ result = YYEOF;
+ break;
+
+ default:
+ result = YYERRCODE;
+#if YYDEBUG != 0
+ --exp;
+#endif
+ break;
+ }
+
+ *pexp = exp;
+
+ return result;
+}
+
+
+static void
+yyerror (const char *str)
+{
+ /* Do nothing. We don't print error messages here. */
+}
diff --git a/intl/po2tbl.sed.in b/intl/po2tbl.sed.in
new file mode 100644
index 0000000..b3bcca4
--- /dev/null
+++ b/intl/po2tbl.sed.in
@@ -0,0 +1,102 @@
+# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+1 {
+ i\
+/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
+\
+#if HAVE_CONFIG_H\
+# include <config.h>\
+#endif\
+\
+#include "libgettext.h"\
+\
+const struct _msg_ent _msg_tbl[] = {
+ h
+ s/.*/0/
+ x
+}
+#
+# Write msgid entries in C array form.
+#
+/^msgid/ {
+ s/msgid[ ]*\(".*"\)/ {\1/
+ tb
+# Append the next line
+ :b
+ N
+# Look whether second part is continuation line.
+ s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
+# Yes, then branch.
+ ta
+# Because we assume that the input file correctly formed the line
+# just read cannot be again be a msgid line. So it's safe to ignore
+# it.
+ s/\(.*\)\n.*/\1/
+ bc
+# We found a continuation line. But before printing insert '\'.
+ :a
+ s/\(.*\)\(\n.*\)/\1\\\2/
+ P
+# We cannot use D here.
+ s/.*\n\(.*\)/\1/
+# Some buggy seds do not clear the `successful substitution since last ``t'''
+# flag on `N', so we do a `t' here to clear it.
+ tb
+# Not reached
+ :c
+ x
+# The following nice solution is by
+# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+ td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+ :d
+ s/9\(_*\)$/_\1/
+ td
+# Assure at least one digit is available.
+ s/^\(_*\)$/0\1/
+# Increment the last digit.
+ s/8\(_*\)$/9\1/
+ s/7\(_*\)$/8\1/
+ s/6\(_*\)$/7\1/
+ s/5\(_*\)$/6\1/
+ s/4\(_*\)$/5\1/
+ s/3\(_*\)$/4\1/
+ s/2\(_*\)$/3\1/
+ s/1\(_*\)$/2\1/
+ s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+ s/_/0/g
+ x
+ G
+ s/\(.*\)\n\([0-9]*\)/\1, \2},/
+ s/\(.*\)"$/\1/
+ p
+}
+#
+# Last line.
+#
+$ {
+ i\
+};\
+
+ g
+ s/0*\(.*\)/int _msg_tbl_length = \1;/p
+}
+d
diff --git a/intl/stamp-cat-id b/intl/stamp-cat-id
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/intl/stamp-cat-id
@@ -0,0 +1 @@
+timestamp
diff --git a/intl/textdomain.c b/intl/textdomain.c
new file mode 100644
index 0000000..2a4b67c
--- /dev/null
+++ b/intl/textdomain.c
@@ -0,0 +1,145 @@
+/* Implementation of the textdomain(3) function.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+#include "gettext.h"
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications. */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Name of the default text domain. */
+extern const char _nl_default_default_domain[];
+
+/* Default text domain in which entries for gettext(3) are to be found. */
+extern const char *_nl_current_default_domain;
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define TEXTDOMAIN __textdomain
+# ifndef strdup
+# define strdup(str) __strdup (str)
+# endif
+#else
+# define TEXTDOMAIN textdomain__
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation. */
+__libc_rwlock_define (extern, _nl_state_lock)
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+char *
+TEXTDOMAIN (domainname)
+ const char *domainname;
+{
+ char *new_domain;
+ char *old_domain;
+
+ /* A NULL pointer requests the current setting. */
+ if (domainname == NULL)
+ return (char *) _nl_current_default_domain;
+
+ __libc_rwlock_wrlock (_nl_state_lock);
+
+ old_domain = (char *) _nl_current_default_domain;
+
+ /* If domain name is the null string set to default domain "messages". */
+ if (domainname[0] == '\0'
+ || strcmp (domainname, _nl_default_default_domain) == 0)
+ {
+ _nl_current_default_domain = _nl_default_default_domain;
+ new_domain = (char *) _nl_current_default_domain;
+ }
+ else if (strcmp (domainname, old_domain) == 0)
+ /* This can happen and people will use it to signal that some
+ environment variable changed. */
+ new_domain = old_domain;
+ else
+ {
+ /* If the following malloc fails `_nl_current_default_domain'
+ will be NULL. This value will be returned and so signals we
+ are out of core. */
+#if defined _LIBC || defined HAVE_STRDUP
+ new_domain = strdup (domainname);
+#else
+ size_t len = strlen (domainname) + 1;
+ new_domain = (char *) malloc (len);
+ if (new_domain != NULL)
+ memcpy (new_domain, domainname, len);
+#endif
+
+ if (new_domain != NULL)
+ _nl_current_default_domain = new_domain;
+ }
+
+ /* We use this possibility to signal a change of the loaded catalogs
+ since this is most likely the case and there is no other easy we
+ to do it. Do it only when the call was successful. */
+ if (new_domain != NULL)
+ {
+ ++_nl_msg_cat_cntr;
+
+ if (old_domain != new_domain && old_domain != _nl_default_default_domain)
+ free (old_domain);
+ }
+
+ __libc_rwlock_unlock (_nl_state_lock);
+
+ return new_domain;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__textdomain, textdomain);
+#endif
diff --git a/intl/tst-gettext.c b/intl/tst-gettext.c
new file mode 100644
index 0000000..9ce1190
--- /dev/null
+++ b/intl/tst-gettext.c
@@ -0,0 +1,322 @@
+/* Test of the gettext functions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <libintl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+const struct
+{
+ const char *msgid;
+ const char *msgstr;
+} msgs[] =
+{
+#define INPUT(Str) { Str,
+#define OUTPUT(Str) Str },
+#include TESTSTRS_H
+};
+
+const char *catname[] =
+{
+ [LC_MESSAGES] = "LC_MESSAGES",
+ [LC_TIME] = "LC_TIME",
+ [LC_NUMERIC] = "LC_NUMERIC"
+};
+
+
+static int positive_gettext_test (void);
+static int negative_gettext_test (void);
+static int positive_dgettext_test (const char *domain);
+static int positive_dcgettext_test (const char *domain, int category);
+static int negative_dcgettext_test (const char *domain, int category);
+
+
+int
+main (int argc, char *argv[])
+{
+ int result = 0;
+
+ /* This is the place where the .mo files are placed. */
+ if (argc > 1)
+ {
+ bindtextdomain ("existing-domain", argv[1]);
+ bindtextdomain ("existing-time-domain", argv[1]);
+ bindtextdomain ("non-existing-domain", argv[1]);
+ }
+
+ /* The locale the catalog is created for is "existing-category". Now
+ set the various variables in question to this value and run the
+ test. */
+ setenv ("LANGUAGE", "existing-locale", 1);
+ setenv ("LC_ALL", "non-existing-locale", 1);
+ setenv ("LC_MESSAGES", "non-existing-locale", 1);
+ setenv ("LANG", "non-existing-locale", 1);
+ /* This is the name of the existing domain with a catalog for the
+ LC_MESSAGES category. */
+ textdomain ("existing-domain");
+ puts ("test `gettext' with LANGUAGE set");
+ if (positive_gettext_test () != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ /* This is the name of a non-existing domain with a catalog for the
+ LC_MESSAGES category. We leave this value set for the `dgettext'
+ and `dcgettext' tests. */
+ textdomain ("non-existing-domain");
+ puts ("test `gettext' with LANGUAGE set");
+ if (negative_gettext_test () != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ puts ("test `dgettext' with LANGUAGE set");
+ if (positive_dgettext_test ("existing-domain") != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+
+ /* Now the same tests with LC_ALL deciding. */
+ unsetenv ("LANGUAGE");
+ setenv ("LC_ALL", "existing-locale", 1);
+ puts ("test `gettext' with LC_ALL set");
+ /* This is the name of the existing domain with a catalog for the
+ LC_MESSAGES category. */
+ textdomain ("existing-domain");
+ if (positive_gettext_test () != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ /* This is the name of a non-existing domain with a catalog for the
+ LC_MESSAGES category. We leave this value set for the `dgettext'
+ and `dcgettext' tests. */
+ textdomain ("non-existing-domain");
+ puts ("test `gettext' with LANGUAGE set");
+ if (negative_gettext_test () != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ puts ("test `dgettext' with LANGUAGE set");
+ if (positive_dgettext_test ("existing-domain") != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+
+ /* Now the same tests with LC_MESSAGES deciding. */
+ unsetenv ("LC_ALL");
+ setenv ("LC_MESSAGES", "existing-locale", 1);
+ setenv ("LC_TIME", "existing-locale", 1);
+ setenv ("LC_NUMERIC", "non-existing-locale", 1);
+ puts ("test `gettext' with LC_ALL set");
+ /* This is the name of the existing domain with a catalog for the
+ LC_MESSAGES category. */
+ textdomain ("existing-domain");
+ if (positive_gettext_test () != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ /* This is the name of a non-existing domain with a catalog for the
+ LC_MESSAGES category. We leave this value set for the `dgettext'
+ and `dcgettext' tests. */
+ textdomain ("non-existing-domain");
+ puts ("test `gettext' with LANGUAGE set");
+ if (negative_gettext_test () != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ puts ("test `dgettext' with LANGUAGE set");
+ if (positive_dgettext_test ("existing-domain") != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ puts ("test `dcgettext' with LANGUAGE set (LC_MESSAGES)");
+ if (positive_dcgettext_test ("existing-domain", LC_MESSAGES) != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ /* Try a different category. For this we also switch the domain. */
+ puts ("test `dcgettext' with LANGUAGE set (LC_TIME)");
+ if (positive_dcgettext_test ("existing-time-domain", LC_TIME) != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ /* This time use a category for which there is no catalog. */
+ puts ("test `dcgettext' with LANGUAGE set (LC_NUMERIC)");
+ if (negative_dcgettext_test ("existing-domain", LC_NUMERIC) != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+
+ /* Now the same tests with LANG deciding. */
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "existing-locale", 1);
+ /* This is the name of the existing domain with a catalog for the
+ LC_MESSAGES category. */
+ textdomain ("existing-domain");
+ puts ("test `gettext' with LC_ALL set");
+ if (positive_gettext_test () != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ /* This is the name of a non-existing domain with a catalog for the
+ LC_MESSAGES category. We leave this value set for the `dgettext'
+ and `dcgettext' tests. */
+ textdomain ("non-existing-domain");
+ puts ("test `gettext' with LANGUAGE set");
+ if (negative_gettext_test () != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+ puts ("test `dgettext' with LANGUAGE set");
+ if (positive_dgettext_test ("existing-domain") != 0)
+ {
+ puts ("FAILED");
+ result = 1;
+ }
+
+ return result;
+}
+
+
+static int
+positive_gettext_test (void)
+{
+ size_t cnt;
+ int result = 0;
+
+ for (cnt = 0; cnt < sizeof (msgs) / sizeof (msgs[0]); ++cnt)
+ {
+ const char *found = gettext (msgs[cnt].msgid);
+
+ if (found == NULL || strcmp (found, msgs[cnt].msgstr) != 0)
+ {
+ /* Oops, shouldn't happen. */
+ printf (" gettext (\"%s\") failed, returned \"%s\"\n",
+ msgs[cnt].msgid, found);
+ result = 1;
+ }
+ }
+
+ return result;
+}
+
+
+static int
+negative_gettext_test (void)
+{
+ size_t cnt;
+ int result = 0;
+
+ for (cnt = 0; cnt < sizeof (msgs) / sizeof (msgs[0]); ++cnt)
+ {
+ const char *found = gettext (msgs[cnt].msgid);
+
+ if (found != msgs[cnt].msgid)
+ {
+ /* Oops, shouldn't happen. */
+ printf (" gettext (\"%s\") failed\n", msgs[cnt].msgid);
+ result = 1;
+ }
+ }
+
+ return result;
+}
+
+
+static int
+positive_dgettext_test (const char *domain)
+{
+ size_t cnt;
+ int result = 0;
+
+ for (cnt = 0; cnt < sizeof (msgs) / sizeof (msgs[0]); ++cnt)
+ {
+ const char *found = dgettext (domain, msgs[cnt].msgid);
+
+ if (found == NULL || strcmp (found, msgs[cnt].msgstr) != 0)
+ {
+ /* Oops, shouldn't happen. */
+ printf (" dgettext (\"%s\", \"%s\") failed, returned \"%s\"\n",
+ domain, msgs[cnt].msgid, found);
+ result = 1;
+ }
+ }
+
+ return result;
+}
+
+
+static int
+positive_dcgettext_test (const char *domain, int category)
+{
+ size_t cnt;
+ int result = 0;
+
+ for (cnt = 0; cnt < sizeof (msgs) / sizeof (msgs[0]); ++cnt)
+ {
+ const char *found = dcgettext (domain, msgs[cnt].msgid, category);
+
+ if (found == NULL || strcmp (found, msgs[cnt].msgstr) != 0)
+ {
+ /* Oops, shouldn't happen. */
+ printf (" dcgettext (\"%s\", \"%s\", %s) failed, returned \"%s\"\n",
+ domain, msgs[cnt].msgid, catname[category], found);
+ result = 1;
+ }
+ }
+
+ return result;
+}
+
+
+static int
+negative_dcgettext_test (const char *domain, int category)
+{
+ size_t cnt;
+ int result = 0;
+
+ for (cnt = 0; cnt < sizeof (msgs) / sizeof (msgs[0]); ++cnt)
+ {
+ const char *found = dcgettext (domain, msgs[cnt].msgid, category);
+
+ if (found != msgs[cnt].msgid)
+ {
+ /* Oops, shouldn't happen. */
+ printf (" dcgettext (\"%s\", \"%s\", %s) failed\n",
+ domain, msgs[cnt].msgid, catname[category]);
+ result = 1;
+ }
+ }
+
+ return result;
+}
diff --git a/intl/xopen-msg.sed b/intl/xopen-msg.sed
new file mode 100644
index 0000000..b19c0bb
--- /dev/null
+++ b/intl/xopen-msg.sed
@@ -0,0 +1,104 @@
+# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+#
+# The first directive in the .msg should be the definition of the
+# message set number. We use always set number 1.
+#
+1 {
+ i\
+$set 1 # Automatically created by po2msg.sed
+ h
+ s/.*/0/
+ x
+}
+#
+# We copy all comments into the .msg file. Perhaps they can help.
+#
+/^#/ s/^#[ ]*/$ /p
+#
+# We copy the original message as a comment into the .msg file.
+#
+/^msgid/ {
+# Does not work now
+# /"$/! {
+# s/\\$//
+# s/$/ ... (more lines following)"/
+# }
+ s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
+ p
+}
+#
+# The .msg file contains, other then the .po file, only the translations
+# but each given a unique ID. Starting from 1 and incrementing by 1 for
+# each message we assign them to the messages.
+# It is important that the .po file used to generate the cat-id-tbl.c file
+# (with po-to-tbl) is the same as the one used here. (At least the order
+# of declarations must not be changed.)
+#
+/^msgstr/ {
+ s/msgstr[ ]*"\(.*\)"/\1/
+ x
+# The following nice solution is by
+# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+ td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+ :d
+ s/9\(_*\)$/_\1/
+ td
+# Assure at least one digit is available.
+ s/^\(_*\)$/0\1/
+# Increment the last digit.
+ s/8\(_*\)$/9\1/
+ s/7\(_*\)$/8\1/
+ s/6\(_*\)$/7\1/
+ s/5\(_*\)$/6\1/
+ s/4\(_*\)$/5\1/
+ s/3\(_*\)$/4\1/
+ s/2\(_*\)$/3\1/
+ s/1\(_*\)$/2\1/
+ s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+ s/_/0/g
+ x
+# Bring the line in the format `<number> <message>'
+ G
+ s/^[^\n]*$/& /
+ s/\(.*\)\n\([0-9]*\)/\2 \1/
+# Clear flag from last substitution.
+ tb
+# Append the next line.
+ :b
+ N
+# Look whether second part is a continuation line.
+ s/\(.*\n\)"\(.*\)"/\1\2/
+# Yes, then branch.
+ ta
+ P
+ D
+# Note that `D' includes a jump to the start!!
+# We found a continuation line. But before printing insert '\'.
+ :a
+ s/\(.*\)\(\n.*\)/\1\\\2/
+ P
+# We cannot use the sed command `D' here
+ s/.*\n\(.*\)/\1/
+ tb
+}
+d
diff --git a/lib/.deps/.P b/lib/.deps/.P
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/lib/.deps/.P
@@ -0,0 +1 @@
+
diff --git a/lib/.deps/alloca.P b/lib/.deps/alloca.P
new file mode 100644
index 0000000..c2fbdb8
--- /dev/null
+++ b/lib/.deps/alloca.P
@@ -0,0 +1 @@
+alloca.o: alloca.c
diff --git a/lib/.deps/error.P b/lib/.deps/error.P
new file mode 100644
index 0000000..e033d68
--- /dev/null
+++ b/lib/.deps/error.P
@@ -0,0 +1 @@
+error.o: error.c
diff --git a/lib/.deps/fstrcmp.P b/lib/.deps/fstrcmp.P
new file mode 100644
index 0000000..9bbd4da
--- /dev/null
+++ b/lib/.deps/fstrcmp.P
@@ -0,0 +1,2 @@
+fstrcmp.o: fstrcmp.c ../config.h system.h \
+ fstrcmp.h
diff --git a/lib/.deps/getline.P b/lib/.deps/getline.P
new file mode 100644
index 0000000..abe097b
--- /dev/null
+++ b/lib/.deps/getline.P
@@ -0,0 +1 @@
+getline.o: ../lib/getline.c
diff --git a/lib/.deps/getopt.P b/lib/.deps/getopt.P
new file mode 100644
index 0000000..51f06c0
--- /dev/null
+++ b/lib/.deps/getopt.P
@@ -0,0 +1 @@
+getopt.o: getopt.c
diff --git a/lib/.deps/getopt1.P b/lib/.deps/getopt1.P
new file mode 100644
index 0000000..1acc5d2
--- /dev/null
+++ b/lib/.deps/getopt1.P
@@ -0,0 +1 @@
+getopt1.o: getopt1.c getopt.h
diff --git a/lib/.deps/hash.P b/lib/.deps/hash.P
new file mode 100644
index 0000000..1701cf4
--- /dev/null
+++ b/lib/.deps/hash.P
@@ -0,0 +1 @@
+hash.o: hash.c system.h hash.h
diff --git a/lib/.deps/obstack.P b/lib/.deps/obstack.P
new file mode 100644
index 0000000..525e862
--- /dev/null
+++ b/lib/.deps/obstack.P
@@ -0,0 +1 @@
+obstack.o: ../lib/obstack.c ../lib/obstack.h
diff --git a/lib/.deps/printf-prs.P b/lib/.deps/printf-prs.P
new file mode 100644
index 0000000..63851aa
--- /dev/null
+++ b/lib/.deps/printf-prs.P
@@ -0,0 +1 @@
+printf-prs.o: ../lib/printf-prs.c ../lib/printf-parse.h
diff --git a/lib/.deps/xgetcwd.P b/lib/.deps/xgetcwd.P
new file mode 100644
index 0000000..12c1491
--- /dev/null
+++ b/lib/.deps/xgetcwd.P
@@ -0,0 +1 @@
+xgetcwd.o: xgetcwd.c pathmax.h
diff --git a/lib/.deps/xmalloc.P b/lib/.deps/xmalloc.P
new file mode 100644
index 0000000..5325ac3
--- /dev/null
+++ b/lib/.deps/xmalloc.P
@@ -0,0 +1 @@
+xmalloc.o: xmalloc.c error.h
diff --git a/lib/.deps/xstrdup.P b/lib/.deps/xstrdup.P
new file mode 100644
index 0000000..df89dff
--- /dev/null
+++ b/lib/.deps/xstrdup.P
@@ -0,0 +1 @@
+xstrdup.o: xstrdup.c
diff --git a/lib/ChangeLog b/lib/ChangeLog
new file mode 100644
index 0000000..2c760b1
--- /dev/null
+++ b/lib/ChangeLog
@@ -0,0 +1,503 @@
+2000-05-06 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add basename.c.
+ (libnlsut_a_SOURCES): Add basename.c.
+
+1998-06-01 Ulrich Drepper <drepper@cygnus.com>
+
+ * printf-parse.h: Change back from using `unsigned char' to `char'.
+
+1998-04-29 Ulrich Drepper <drepper@cygnus.com>
+
+ * printf-parse.h: Use unsigned char for parameters to read_int and
+ parse_one_spec (for loosing Solaris systems).
+ Patch by Jim Meyering.
+
+1998-04-28 11:42 Ulrich Drepper <drepper@cygnus.com>
+
+ * hash.c: Include malloc.h if stdlib.h is not available.
+ Include either string.h or strings.h.
+
+ * system.h: Include limits.h before defining MAX to prevent
+ redefinitions.
+
+ * Makefile.am: Move basename.c from EXTRA_DIST to libnlsut_a_SOURCES.
+
+1998-04-27 20:51 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile (EXTRA_DIST): Remove obstack.c here.
+ (libnlsut_a_SOURCES): Add obstack.c here.
+
+ * alloca.c: Include string.h and stdlib.h if available. Fix typos.
+
+ * getopt.c: Update from glibc version.
+
+ * hash.c: Include stdlib.h. Use #if instead of #ifdef while testing
+ HAVE_* macros. Don't include system.h.
+
+ * printf-parse.h: Use #if instead of #ifdef.
+
+1997-08-18 13:47 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * xstrdup.c (sys/types.h): File included.
+ * system.h (strstr): Function prototype added.
+
+1997-08-15 03:01 Ulrich Drepper <drepper@cygnus.com>
+
+ * stpcpy.c, stpncpy.c: Copy version from glibc to fix severe bugs.
+
+1997-08-01 15:47 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Require version 1.2.
+
+Mon Mar 10 06:52:59 1997 Ulrich Drepper <drepper@cygnus.com>
+
+ * xstrdup.c: Add more compatibility handling. Pretty-print
+ preprocessor directives.
+
+ * printf-parse.h: Define _GNU_SOURCE not __USE_GNU.
+
+ * Makefile.am: Change for use with automake-1.1.
+
+1997-02-08 04:26 Ulrich Drepper <drepper@cygnus.com>
+
+ * stpncpy.c: Update from version in GNU libc 2.0. This corrects
+ a long standing bug in xgettext.
+
+Fri Dec 6 04:20:56 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * system.h: Use PARAMS not __P for basename prototype.
+ Reported by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
+
+Tue Dec 3 17:50:34 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * system.h: Add prototype for basename.
+
+ * Makefile.am (EXTRA_DIST): Add basename.c.
+
+Fri Nov 22 03:32:34 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (EXTRA_DIST): Rename strncase.c to strncasecmp.c.
+
+Sat Aug 31 04:52:56 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (nlsut_SOURCES): Move error.c to EXTRA_DIST.
+
+Wed Jun 19 02:45:02 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * system.h: Add prototypes for stpncpy, strcasecmp, and
+ strncasecmp.
+
+ * Makefile.am (EXTRA_DIST): Add strncase and stpncpy.
+
+Fri Jun 14 03:56:23 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * getline.c (_GNU_SOURCE): Define this macro, not __USE_GNU.
+
+ * Makefile.am (nlsut_SOURCES): Move getline.c and printf-prs.c to
+ EXTRA_DIST. Reported by Kaveh R. Ghazi.
+
+Tue Jun 11 15:28:17 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * printf-prs.c: Add some casts for `n'.
+
+ * printf-parse.h: Add prototypes and __USE_GNU definition.
+
+ * getline.c: Define __USE_GNU to get prototype.
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Add variable. Must be defined
+ in all subdirs.
+
+Wed Jun 5 16:54:43 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (INCLUDES): Define include paths to intl/ dir for
+ <libintl.h> file.
+
+Mon Jun 3 19:13:36 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * getopt.c: Update from latest GNU libc source. We don't need
+ the AC_REPLACE_GNU_GETOPT anymore.
+
+ * Makefile.am (EXTRA_DIST): Remove files mentioned in
+ nlsut_SOURCES from EXTRA_DIST.
+ (nlsut_SOURCES): Add getopt.c and getopt1.c.
+
+Wed Apr 24 23:48:42 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (GETOPT): Remove variable.
+ (OBJECTS): Don't use $(GETOPT). If not present the getopt are now
+ listed in @LIBOBJS@.
+
+Fri Apr 5 12:00:51 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (SOURCES): Remove whoami.c.
+ (OBJECTS): Remove whoami.o.
+
+ * system.h: Remove prototype for `get_submitter'.
+
+Thu Apr 4 21:14:51 1996 Ulrich Drepper <drepper@myware>
+
+ * system.h: Add prototype for asprintf.
+
+Tue Apr 2 18:53:38 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all-gettext): New goal. Same as all.
+
+Tue Apr 2 12:57:44 1996 Ulrich Drepper <drepper@myware>
+
+ * error.c, error.h: Update from version in GNU libc.
+
+Tue Mar 26 12:35:56 1996 Ulrich Drepper <drepper@myware>
+
+ * error.c, error.h: Applied François' patches for more
+ portability.
+
+Mon Mar 25 01:21:31 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (SOURCES): Add strstr.c.
+
+Sun Mar 24 18:41:42 1996 Ulrich Drepper <drepper@myware>
+
+ * error.c (error_with_loc): In `one error per line' mode check for
+ old_file_name to be NULL first. Reported by François Pinard.
+
+Fri Mar 1 13:38:26 1996 Ulrich Drepper <drepper@myware>
+
+ * getopt.c: Update from latest version in GNU C Library.
+ * getopt1.c: Ditto.
+ * getopt.h: Ditto.
+
+ * error.c (error_with_loc): Not simply compare string pointers to
+ test for same file name.
+ (error_with_loc): file_name parameter is really const.
+
+ * error.c (error_one_per_line): New variable.
+ (error_with_loc): If error_one_per_line != 0, print at most one
+ error per line.
+
+ * error.h: Declare new variable error_one_per_line.
+
+Mon Jan 1 03:12:08 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (GETOPTSRC): Remove this variable.
+
+Sat Dec 30 16:26:07 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (ERROR, ERRORSRC): New variables. error.c is now
+ part of GNU libc and will not be needed on systems running this
+ lib.
+ (SOURCES): Replace error.c with $(ERRORSRC).
+ (OBJECTS): Replace error.o with $(ERROR).
+
+Tue Dec 19 22:08:10 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (Makefile): Explicitly use $(SHELL) for running
+ shell scripts.
+
+Sat Dec 9 16:40:49 1995 Ulrich Drepper <drepper@myware>
+
+ * whoami.c, system.h, printf.h, printf-parse.h, hash.h, hash.c,
+ getline.h, fstrcmp.h, fstrcmp.c, error.h, error.c:
+ Use PARAMS instead of __P. Suggested by Roland McGrath.
+
+Wed Dec 6 16:07:27 1995 ghazi@caip.rutgers.edu <Kaveh R. Ghazi>
+
+ * system.h: Fix alloca declaration so that it matches the one
+ generated by bison on HPUX.
+
+Sat Nov 25 16:13:50 1995 Ulrich Drepper <drepper@myware>
+
+ * whoami.c: Don't use #ifdef, prefer #if.
+
+ * error.c: Capitalize arguments of macros. Patch by Franc,ois Pinard.
+
+Thu Nov 16 22:41:32 1995 Ulrich Drepper <drepper@myware>
+
+ * whoami.c: Correct prototype declarations.
+
+ * xmalloc.c: Include "error.h" instead of defining error ourself.
+
+ * system.h: Include <stdio.h> to get FILE definition.
+
+ * hash.c: Peter Miller suggested not to use `div' as a variable name.
+
+ * error.c (error_print_progname): For ANSI C provide complete type.
+ Include error.h. Patches by Peter Miller.
+
+Sun Nov 12 12:34:12 1995 Ulrich Drepper <drepper@myware>
+
+ * whoami.c: Add prototypes.
+ (get_submitter): Use stpcpy if available.
+
+Sat Nov 11 00:26:31 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (HEADERS):
+ Add missing pathmax.h file. Reported by Franc,ois Pinard.
+
+Fri Nov 10 09:59:06 1995 Ulrich Drepper <drepper@myware>
+
+ * error.h (error_print_progname):
+ Provide real prototype, i.e. with argument types.
+ Patch by Peter Miller.
+
+Wed Nov 8 23:25:00 1995 Ulrich Drepper <drepper@myware>
+
+ * system.h: Add prototype for xgetcwd.
+
+ * Makefile.in (SOURCES): Add xgetcwd.c.
+ (OBJECTS): Add xgetcwd.o.
+
+Tue Nov 7 11:44:32 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (intldir):
+ New variable. Use its value instead of ../intl.
+
+Sun Nov 5 19:40:03 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist-gettext): Make synonym for dist.
+
+Sun Nov 5 18:04:11 1995 Ulrich Drepper <drepper@myware>
+
+ * hash.c (find_entry): Remove unused variable retval.
+
+Sun Nov 5 11:38:19 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Suppress error message when ln failed.
+ Get files from $(srcdir) explicitly.
+
+Sat Oct 28 14:25:13 1995 Ulrich Drepper <drepper@myware>
+
+ * fstrcmp.c:
+ Revised version by Peter Miller. Now based on GNU diff's version
+ of this algorithm.
+
+Wed Sep 27 20:18:44 1995 Ulrich Drepper <drepper@myware>
+
+ * system.h: Include sys/types.h for those old SysV systems out there.
+ Reported by Francesco Potorti`.
+
+Mon Sep 25 22:26:28 1995 Ulrich Drepper <drepper@myware>
+
+ * obstack.h (ptrdiff_t):
+ Don't define unless HAVE_PTRDIFF_T is not defined. This
+ solves problems with Sun's compiler. Reported by Marcus Daniels.
+
+Mon Sep 18 10:45:48 1995 Ulrich Drepper <drepper@myware>
+
+ * fstrcmp.h, fstrcmp.c: Initial revision
+
+Sun Sep 17 23:37:15 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Add fstrcmp.[ch] to libgettext.
+
+ * system.h (open_po_file): Remove unused `use_path' parameter.
+
+ * hash.c:
+ Rewrite for uniform return values: < 0 for error cases, else >= 0.
+
+ * Makefile.in: hash.[ch] moved from src/ to lib/ subdirectory.
+
+Mon Aug 28 10:05:31 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Remove Emacs hints.
+
+ * Makefile.in (libnlsut.a): Use $@ instead of full name.
+
+Sat Aug 19 17:37:24 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): Make depend on `all'.
+
+Tue Aug 15 05:51:25 1995 Ulrich Drepper <drepper@myware>
+
+ * system.h (xgetcwd): Remove prototype.
+
+Mon Aug 14 23:52:41 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): New no-op goal.
+
+Wed Aug 9 10:05:09 1995 Ulrich Drepper <drepper@myware>
+
+ * system.h (MAX):
+ Mark GCC variant with __extension__ and change typeof to __typeof__.
+
+Tue Aug 8 21:02:28 1995 Ulrich Drepper <drepper@myware>
+
+ * strcasecmp.c: Initial revision.
+
+ * Makefile.in (SOURCES): Add strcasecmp.c.
+
+Mon Aug 7 21:17:51 1995 Ulrich Drepper <drepper@myware>
+
+ * strcspn.c: Initial revision.
+
+ * Makefile.in (SOURCES): Add strcspn.c.
+
+Fri Aug 4 15:44:00 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Remove `copying instead' message.
+
+Wed Aug 2 18:51:33 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (ID, TAGS): Do not use $^.
+
+Tue Aug 1 20:07:40 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (distclean): Remove ID file.
+
+ * Makefile.in (TAGS, ID): Use $^ as command argument.
+ (TAGS): Give etags -o option t write to current directory,
+ not $(srcdir).
+ (ID): Use $(srcdir) instead os $(top_srcdir)/src.
+
+Wed Jul 19 23:54:32 1995 Ulrich Drepper <drepper@myware>
+
+ * strtol.c: Change copyright from LGPL to GPL.
+
+Tue Jul 18 20:09:04 1995 Ulrich Drepper <drepper@myware>
+
+ * strtol.c (ULONG_MAX): Define if not defined in system header.
+ Reported by Francesco Potorti`.
+
+ * printf-parse.h (parse_one_spec): Define prototype.
+
+ * obstack.h: Put stddef.h include statement back in.
+
+Tue Jul 18 00:19:54 1995 Ulrich Drepper <drepper@myware>
+
+ * vasprintf.c, strtol.c, obstack.c, getopt1.c, getopt.c, system.h,
+ printf.h, obstack.h, getline.h: Uniform test for __STDC__.
+
+Mon Jul 17 01:13:09 1995 Ulrich Drepper <drepper@myware>
+
+ * system.h (HAVE_MALLOC_H):
+ Remove obsolete #else case. Was needed when we tried
+ to define free ourself.
+
+ * system.h, error.h, strtoul.c, printf-parse.h, memmove.c,
+ getline.h: Add `Free' to Software Foundation.
+
+ * getline.h:
+ Remove unneeded comment after #endif. We now use indentation.
+
+ * getline.c: Indent preprocessor directives.
+
+ * strtol.c (NULL): Define manualy if not defined in any included file.
+
+Sat Jul 15 23:59:26 1995 Ulrich Drepper <drepper@myware>
+
+ * obstack.h: Add accidently removed #endif.
+
+Sat Jul 15 23:31:45 1995 Ulrich Drepper <drepper@myware>
+
+ * vasprintf.c, printf-prs.c, obstack.h, obstack.c, memmove.c,
+ printf.h, printf-parse.h:
+ Exchange old LGPL against new GPL (no LGPL code in normal packages).
+
+ * getline.h: Add copyright.
+
+ * strtoul.c, strtol.c: Initial revision
+
+ * obstack.h (ptrdiff_t):
+ Don't include stddef.h. Try to get it with sys/types.h and
+ if _PTRDIFF_T and ptrdiff_t are not defined, define it to off_t
+ (which is at least defined in config.h).
+
+ * system.h (HAVE_STDLIB_H):
+ Is not useful if STDC_HEADERS is not also defined.
+
+Sat Jul 15 00:49:22 1995 Ulrich Drepper <drepper@myware>
+
+ * error.h: Correct definition of size_t: don't try to include
+ stddef.h, but instead use sys/types. If it is not found here,
+ the config.h file will define it.
+
+ * system.h: Load <stdlib.h> before defining prototypes. This
+ avoids problems with size_t not defined in the prototypes.
+
+ * printf-parse.h (find_spec): Handle missing mblen function.
+
+Thu Jul 13 22:28:38 1995 Ulrich Drepper <drepper@myware>
+
+ * system.h (MAX):
+ Move definition to end to reduce possibility of redefinition.
+
+ * whoami.c (get_username, get_hostname, get_submitter):
+ Use K&R prototypes.
+
+ * vasprintf.c: Include config.h.
+
+ * printf.h (printf_info):
+ Use `char' and `unsigned' instead of `unsigned char' and
+ `unsigned int' resp. to help these dumb K&R compilers.
+
+ * printf-parse.h:
+ Compilers other than GCC don't have `long long', K&R compiler
+ even don't have `long double'.
+
+Thu Jul 13 01:41:41 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check): New goal.
+
+Tue Jul 11 21:37:19 1995 Ulrich Drepper <drepper@myware>
+
+ * vasprintf.c (HAVE_STRTOUL):
+ Not needed anymore because we substitute strtoul if not present.
+
+Tue Jul 11 01:34:06 1995 Ulrich Drepper <drepper@myware>
+
+ * whoami.c: Define NULL is necessary.
+
+ * obstack.h: Protect inclusion of stddef and define ptrdiff_t if
+ necessary.
+
+ * memmove.c: Include sys/types.h and perhaps stdlib.h instead of
+ stddef.h for getting size_t defined.
+
+ * system.h: Don't define free, qsort, and strtol when no header
+ file is available.
+ Define EXIT_{FAILURE,SUCCESS} after stdlib.h is included.
+
+ * printf.h: Protect non-ANSI header inclusion.
+ Protect __P definition.
+ Don't use __const in prototypes.
+
+ * printf-prs.c: Include config.h.
+ Protect stdlib.h inclusion.
+
+ * printf-parse.h: Protect header inclusion for non-ANSI environments.
+ Protect and de-GCC-ify MAX/MIN definition.
+
+ * Makefile.in (SOURCES): New files: strtol.c and strtoul.c.
+ Depend $(OBJECT) on config.h,, instead of $(LIBOBJS).
+ Better dependency for printf-prs.o.
+
+Tue Jul 4 22:09:00 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (SOURCES): add memmove.c.
+
+ * memmove.c: Initial revision.
+
+ * error.h: Make size_t definition correct for !__STDC__.
+ Include <stddef.h> for getting size_t defined.
+
+ * vasprintf.c: Don't use strtoul if !HAVE_STRTOUL.
+
+ * system.h: Include <stdlib.h> also if defined HAVE_STDLIB_H.
+ Make sure that qsort, free and strtoul are prototyped.
+
+Mon Jul 3 15:02:50 1995 Ulrich Drepper <drepper@myware>
+
+ * system.h: system.h (MAX): don't use GCC feature if !__STDC__.
+ Fix typo in EXIT_FAILURE defintion.
+
+ * xmalloc.c: Include prototype for calloc.c.
+
+ * Makefile.in (INCLUDES): even better path list.
+ (INCLUDES): remove unnecessary paths.
+ Correct path to original version.
+
+Sun Jul 2 02:01:43 1995 Ulrich Drepper <drepper@myware>
+
+ * First official release. This directory contains supplementary
+ code taken from GNU C Library and other package's lib/
+ directories.
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644
index 0000000..3cab0b0
--- /dev/null
+++ b/lib/Makefile.am
@@ -0,0 +1,36 @@
+## Makefile for the support lib subdirectory of the GNU NLS Utilities
+## Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+## Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+noinst_LIBRARIES = libnlsut.a
+
+EXTRA_DIST = alloca.c error.c getline.c memset.c memmove.c \
+printf-prs.c stpcpy.c stpncpy.c strcasecmp.c strcspn.c strncasecmp.c \
+strstr.c strtol.c strtoul.c vasprintf.c
+
+libnlsut_a_SOURCES = basename.c fstrcmp.c getopt.c getopt1.c hash.c obstack.c \
+xgetcwd.c xmalloc.c xstrdup.c
+
+libnlsut_a_LIBADD = @ALLOCA@ @LIBOBJS@
+
+noinst_HEADERS = error.h fstrcmp.h getline.h getopt.h hash.h obstack.h \
+printf-parse.h printf.h system.h pathmax.h
+
+INCLUDES = -I../intl
diff --git a/lib/Makefile.in b/lib/Makefile.in
new file mode 100644
index 0000000..49b8fe2
--- /dev/null
+++ b/lib/Makefile.in
@@ -0,0 +1,371 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+ACLOCAL_VERSION = @ACLOCAL_VERSION@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+EMACS = @EMACS@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LIBOBJS = @LIBOBJS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+YACC = @YACC@
+aclocaldir = @aclocaldir@
+l = @l@
+lispdir = @lispdir@
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+noinst_LIBRARIES = libnlsut.a
+
+EXTRA_DIST = alloca.c error.c getline.c memset.c memmove.c printf-prs.c stpcpy.c stpncpy.c strcasecmp.c strcspn.c strncasecmp.c strstr.c strtol.c strtoul.c vasprintf.c
+
+
+libnlsut_a_SOURCES = basename.c fstrcmp.c getopt.c getopt1.c hash.c obstack.c xgetcwd.c xmalloc.c xstrdup.c
+
+
+libnlsut_a_LIBADD = @ALLOCA@ @LIBOBJS@
+
+noinst_HEADERS = error.h fstrcmp.h getline.h getopt.h hash.h obstack.h printf-parse.h printf.h system.h pathmax.h
+
+
+INCLUDES = -I../intl
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libnlsut_a_DEPENDENCIES = @ALLOCA@ @LIBOBJS@
+libnlsut_a_OBJECTS = basename.o fstrcmp.o getopt.o getopt1.o hash.o \
+obstack.o xgetcwd.o xmalloc.o xstrdup.o
+AR = ar
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+HEADERS = $(noinst_HEADERS)
+
+DIST_COMMON = ChangeLog Makefile.am Makefile.in alloca.c error.c \
+error.h getline.c memmove.c memset.c printf-prs.c stpcpy.c stpncpy.c \
+strcspn.c strncasecmp.c strstr.c strtoul.c vasprintf.c
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+DEP_FILES = .deps/alloca.P .deps/basename.P .deps/error.P \
+.deps/fstrcmp.P .deps/getline.P .deps/getopt.P .deps/getopt1.P \
+.deps/hash.P .deps/memmove.P .deps/memset.P .deps/obstack.P \
+.deps/printf-prs.P .deps/stpcpy.P .deps/stpncpy.P .deps/strcspn.P \
+.deps/strncasecmp.P .deps/strstr.P .deps/strtoul.P .deps/vasprintf.P \
+.deps/xgetcwd.P .deps/xmalloc.P .deps/xstrdup.P
+SOURCES = $(libnlsut_a_SOURCES)
+OBJECTS = $(libnlsut_a_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstLIBRARIES:
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+distclean-noinstLIBRARIES:
+
+maintainer-clean-noinstLIBRARIES:
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libnlsut.a: $(libnlsut_a_OBJECTS) $(libnlsut_a_DEPENDENCIES)
+ -rm -f libnlsut.a
+ $(AR) cru libnlsut.a $(libnlsut_a_OBJECTS) $(libnlsut_a_LIBADD)
+ $(RANLIB) libnlsut.a
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = lib
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits lib/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile $(LIBRARIES) $(HEADERS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
+ mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-noinstLIBRARIES clean-compile clean-libtool clean-tags \
+ clean-depend clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-noinstLIBRARIES distclean-compile \
+ distclean-libtool distclean-tags distclean-depend \
+ distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-depend \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/lib/alloca.c b/lib/alloca.c
new file mode 100644
index 0000000..d2f7f0c
--- /dev/null
+++ b/lib/alloca.c
@@ -0,0 +1,513 @@
+/* alloca.c -- allocate automatically reclaimed memory
+ (Mostly) portable public-domain implementation -- D A Gwyn
+
+ This implementation of the PWB library alloca function,
+ which is used to allocate space off the run-time stack so
+ that it is automatically reclaimed upon procedure exit,
+ was inspired by discussions with J. Q. Johnson of Cornell.
+ J.Otto Tennant <jot@cray.com> contributed the Cray support.
+
+ There are some preprocessor constants that can
+ be defined when compiling for your specific system, for
+ improved efficiency; however, the defaults should be okay.
+
+ The general concept of this implementation is to keep
+ track of all alloca-allocated blocks, and reclaim any
+ that are found to be deeper in the stack than the current
+ invocation. This heuristic does not reclaim storage as
+ soon as it becomes invalid, but it will do so eventually.
+
+ As a special case, alloca(0) reclaims storage without
+ allocating any. It is a good idea to use alloca(0) in
+ your main control loop, etc. to force garbage collection. */
+
+/* Synched up with: FSF 19.30. */
+
+/* Authorsip:
+
+ FSF: A long time ago.
+ Very few changes for XEmacs.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+/* XEmacs: If compiling with GCC 2, this file is theoretically not needed.
+ However, alloca() is broken under GCC 2 on many machines: you
+ cannot put a call to alloca() as part of an argument to a function.
+ */
+/* If someone has defined alloca as a macro,
+ there must be some other way alloca is supposed to work. */
+/* XEmacs sometimes uses the C alloca even when a builtin alloca is available,
+ because it's safer. */
+#if defined (EMACS_WANTS_C_ALLOCA) || (!defined (alloca) && (!defined (__GNUC__) || __GNUC__ < 2))
+
+#ifdef emacs
+#ifdef static
+/* actually, only want this if static is defined as ""
+ -- this is for usg, in which emacs must undefine static
+ in order to make unexec workable
+ */
+#ifndef STACK_DIRECTION
+you
+lose
+-- must know STACK_DIRECTION at compile-time
+#endif /* STACK_DIRECTION undefined */
+#endif /* static */
+#endif /* emacs */
+
+/* If your stack is a linked list of frames, you have to
+ provide an "address metric" ADDRESS_FUNCTION macro. */
+
+#if defined (CRAY) && defined (CRAY_STACKSEG_END)
+long i00afunc ();
+#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
+#else
+#define ADDRESS_FUNCTION(arg) &(arg)
+#endif
+
+#ifdef __STDC__ /* XEmacs change */
+typedef void *pointer;
+#else
+typedef char *pointer;
+#endif
+
+/* XEmacs: With ERROR_CHECK_MALLOC defined, there is no xfree -- it's
+ a macro that does some stuff to try and trap invalid frees,
+ and then calls xfree_1 to actually do the work. */
+
+#ifdef emacs
+# ifdef ERROR_CHECK_MALLOC
+void xfree_1 (pointer);
+# define xfree xfree_1
+# else
+void xfree (pointer);
+# endif
+#endif
+
+#ifndef WINDOWSNT
+#define NULL 0
+#endif
+
+/* Different portions of Emacs need to call different versions of
+ malloc. The Emacs executable needs alloca to call xmalloc, because
+ ordinary malloc isn't protected from input signals. On the other
+ hand, the utilities in lib-src need alloca to call malloc; some of
+ them are very simple, and don't have an xmalloc routine.
+
+ Non-Emacs programs expect this to call use xmalloc.
+
+ Callers below should use malloc. */
+
+#ifndef emacs
+#define malloc xmalloc
+#endif
+#ifndef WINDOWSNT
+extern pointer malloc ();
+#else
+extern void *malloc();
+#endif
+
+/* Define STACK_DIRECTION if you know the direction of stack
+ growth for your system; otherwise it will be automatically
+ deduced at run-time.
+
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+
+#ifndef STACK_DIRECTION
+#define STACK_DIRECTION 0 /* Direction unknown. */
+#endif
+
+#if STACK_DIRECTION != 0
+
+#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
+
+#else /* STACK_DIRECTION == 0; need run-time code. */
+
+static int stack_dir; /* 1 or -1 once known. */
+#define STACK_DIR stack_dir
+
+static void
+find_stack_direction ()
+{
+ static char *addr = NULL; /* Address of first `dummy', once known. */
+ auto char dummy; /* To get stack address. */
+
+ if (addr == NULL)
+ { /* Initial entry. */
+ addr = ADDRESS_FUNCTION (dummy);
+
+ find_stack_direction (); /* Recurse once. */
+ }
+ else
+ {
+ /* Second entry. */
+ if (ADDRESS_FUNCTION (dummy) > addr)
+ stack_dir = 1; /* Stack grew upward. */
+ else
+ stack_dir = -1; /* Stack grew downward. */
+ }
+}
+
+#endif /* STACK_DIRECTION == 0 */
+
+/* An "alloca header" is used to:
+ (a) chain together all alloca'ed blocks;
+ (b) keep track of stack depth.
+
+ It is very important that sizeof(header) agree with malloc
+ alignment chunk size. The following default should work okay. */
+
+#ifndef ALIGN_SIZE
+#define ALIGN_SIZE sizeof(double)
+#endif
+
+typedef union hdr
+{
+ char align[ALIGN_SIZE]; /* To force sizeof(header). */
+ struct
+ {
+ union hdr *next; /* For chaining headers. */
+ char *deep; /* For stack depth measure. */
+ } h;
+} header;
+
+static header *last_alloca_header = NULL; /* -> last alloca header. */
+
+/* Return a pointer to at least SIZE bytes of storage,
+ which will be automatically reclaimed upon exit from
+ the procedure that called alloca. Originally, this space
+ was supposed to be taken from the current stack frame of the
+ caller, but that method cannot be made to work for some
+ implementations of C, for example under Gould's UTX/32. */
+
+pointer
+#ifdef EMACS_WANTS_C_ALLOCA
+c_alloca (size)
+#else
+alloca (size)
+#endif
+ unsigned size;
+{
+ auto char probe; /* Probes stack depth: */
+ REGISTER char *depth = ADDRESS_FUNCTION (probe);
+
+#if STACK_DIRECTION == 0
+ if (STACK_DIR == 0) /* Unknown growth direction. */
+ find_stack_direction ();
+#endif
+
+ /* Reclaim garbage, defined as all alloca'd storage that
+ was allocated from deeper in the stack than currently. */
+
+ {
+ REGISTER header *hp; /* Traverses linked list. */
+
+ for (hp = last_alloca_header; hp != NULL;)
+ if ((STACK_DIR > 0 && hp->h.deep > depth)
+ || (STACK_DIR < 0 && hp->h.deep < depth))
+ {
+ REGISTER header *np = hp->h.next;
+
+ free ((pointer) hp); /* Collect garbage. */
+
+ hp = np; /* -> next header. */
+ }
+ else
+ break; /* Rest are not deeper. */
+
+ last_alloca_header = hp; /* -> last valid storage. */
+ }
+
+ if (size == 0)
+ return NULL; /* No allocation required. */
+
+ /* Allocate combined header + user data storage. */
+
+ {
+ REGISTER pointer new = malloc (sizeof (header) + size);
+ /* Address of header. */
+
+ ((header *) new)->h.next = last_alloca_header;
+ ((header *) new)->h.deep = depth;
+
+ last_alloca_header = (header *) new;
+
+ /* User storage begins just after header. */
+
+ return (pointer) ((char *) new + sizeof (header));
+ }
+}
+
+#if defined (CRAY) && defined (CRAY_STACKSEG_END)
+
+#ifdef DEBUG_I00AFUNC
+#include <stdio.h>
+#endif
+
+#ifndef CRAY_STACK
+#define CRAY_STACK
+#ifndef CRAY2
+/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
+struct stack_control_header
+ {
+ long shgrow:32; /* Number of times stack has grown. */
+ long shaseg:32; /* Size of increments to stack. */
+ long shhwm:32; /* High water mark of stack. */
+ long shsize:32; /* Current size of stack (all segments). */
+ };
+
+/* The stack segment linkage control information occurs at
+ the high-address end of a stack segment. (The stack
+ grows from low addresses to high addresses.) The initial
+ part of the stack segment linkage control information is
+ 0200 (octal) words. This provides for register storage
+ for the routine which overflows the stack. */
+
+struct stack_segment_linkage
+ {
+ long ss[0200]; /* 0200 overflow words. */
+ long sssize:32; /* Number of words in this segment. */
+ long ssbase:32; /* Offset to stack base. */
+ long:32;
+ long sspseg:32; /* Offset to linkage control of previous
+ segment of stack. */
+ long:32;
+ long sstcpt:32; /* Pointer to task common address block. */
+ long sscsnm; /* Private control structure number for
+ microtasking. */
+ long ssusr1; /* Reserved for user. */
+ long ssusr2; /* Reserved for user. */
+ long sstpid; /* Process ID for pid based multi-tasking. */
+ long ssgvup; /* Pointer to multitasking thread giveup. */
+ long sscray[7]; /* Reserved for Cray Research. */
+ long ssa0;
+ long ssa1;
+ long ssa2;
+ long ssa3;
+ long ssa4;
+ long ssa5;
+ long ssa6;
+ long ssa7;
+ long sss0;
+ long sss1;
+ long sss2;
+ long sss3;
+ long sss4;
+ long sss5;
+ long sss6;
+ long sss7;
+ };
+
+#else /* CRAY2 */
+/* The following structure defines the vector of words
+ returned by the STKSTAT library routine. */
+struct stk_stat
+ {
+ long now; /* Current total stack size. */
+ long maxc; /* Amount of contiguous space which would
+ be required to satisfy the maximum
+ stack demand to date. */
+ long high_water; /* Stack high-water mark. */
+ long overflows; /* Number of stack overflow ($STKOFEN) calls. */
+ long hits; /* Number of internal buffer hits. */
+ long extends; /* Number of block extensions. */
+ long stko_mallocs; /* Block allocations by $STKOFEN. */
+ long underflows; /* Number of stack underflow calls ($STKRETN). */
+ long stko_free; /* Number of deallocations by $STKRETN. */
+ long stkm_free; /* Number of deallocations by $STKMRET. */
+ long segments; /* Current number of stack segments. */
+ long maxs; /* Maximum number of stack segments so far. */
+ long pad_size; /* Stack pad size. */
+ long current_address; /* Current stack segment address. */
+ long current_size; /* Current stack segment size. This
+ number is actually corrupted by STKSTAT to
+ include the fifteen word trailer area. */
+ long initial_address; /* Address of initial segment. */
+ long initial_size; /* Size of initial segment. */
+ };
+
+/* The following structure describes the data structure which trails
+ any stack segment. I think that the description in 'asdef' is
+ out of date. I only describe the parts that I am sure about. */
+
+struct stk_trailer
+ {
+ long this_address; /* Address of this block. */
+ long this_size; /* Size of this block (does not include
+ this trailer). */
+ long unknown2;
+ long unknown3;
+ long link; /* Address of trailer block of previous
+ segment. */
+ long unknown5;
+ long unknown6;
+ long unknown7;
+ long unknown8;
+ long unknown9;
+ long unknown10;
+ long unknown11;
+ long unknown12;
+ long unknown13;
+ long unknown14;
+ };
+
+#endif /* CRAY2 */
+#endif /* not CRAY_STACK */
+
+#ifdef CRAY2
+/* Determine a "stack measure" for an arbitrary ADDRESS.
+ I doubt that "lint" will like this much. */
+
+static long
+i00afunc (long *address)
+{
+ struct stk_stat status;
+ struct stk_trailer *trailer;
+ long *block, size;
+ long result = 0;
+
+ /* We want to iterate through all of the segments. The first
+ step is to get the stack status structure. We could do this
+ more quickly and more directly, perhaps, by referencing the
+ $LM00 common block, but I know that this works. */
+
+ STKSTAT (&status);
+
+ /* Set up the iteration. */
+
+ trailer = (struct stk_trailer *) (status.current_address
+ + status.current_size
+ - 15);
+
+ /* There must be at least one stack segment. Therefore it is
+ a fatal error if "trailer" is null. */
+
+ if (trailer == 0)
+ abort ();
+
+ /* Discard segments that do not contain our argument address. */
+
+ while (trailer != 0)
+ {
+ block = (long *) trailer->this_address;
+ size = trailer->this_size;
+ if (block == 0 || size == 0)
+ abort ();
+ trailer = (struct stk_trailer *) trailer->link;
+ if ((block <= address) && (address < (block + size)))
+ break;
+ }
+
+ /* Set the result to the offset in this segment and add the sizes
+ of all predecessor segments. */
+
+ result = address - block;
+
+ if (trailer == 0)
+ {
+ return result;
+ }
+
+ do
+ {
+ if (trailer->this_size <= 0)
+ abort ();
+ result += trailer->this_size;
+ trailer = (struct stk_trailer *) trailer->link;
+ }
+ while (trailer != 0);
+
+ /* We are done. Note that if you present a bogus address (one
+ not in any segment), you will get a different number back, formed
+ from subtracting the address of the first block. This is probably
+ not what you want. */
+
+ return (result);
+}
+
+#else /* not CRAY2 */
+/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
+ Determine the number of the cell within the stack,
+ given the address of the cell. The purpose of this
+ routine is to linearize, in some sense, stack addresses
+ for alloca. */
+
+static long
+i00afunc (long address)
+{
+ long stkl = 0;
+
+ long size, pseg, this_segment, stack;
+ long result = 0;
+
+ struct stack_segment_linkage *ssptr;
+
+ /* Register B67 contains the address of the end of the
+ current stack segment. If you (as a subprogram) store
+ your registers on the stack and find that you are past
+ the contents of B67, you have overflowed the segment.
+
+ B67 also points to the stack segment linkage control
+ area, which is what we are really interested in. */
+
+ stkl = CRAY_STACKSEG_END ();
+ ssptr = (struct stack_segment_linkage *) stkl;
+
+ /* If one subtracts 'size' from the end of the segment,
+ one has the address of the first word of the segment.
+
+ If this is not the first segment, 'pseg' will be
+ nonzero. */
+
+ pseg = ssptr->sspseg;
+ size = ssptr->sssize;
+
+ this_segment = stkl - size;
+
+ /* It is possible that calling this routine itself caused
+ a stack overflow. Discard stack segments which do not
+ contain the target address. */
+
+ while (!(this_segment <= address && address <= stkl))
+ {
+#ifdef DEBUG_I00AFUNC
+ fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
+#endif
+ if (pseg == 0)
+ break;
+ stkl = stkl - pseg;
+ ssptr = (struct stack_segment_linkage *) stkl;
+ size = ssptr->sssize;
+ pseg = ssptr->sspseg;
+ this_segment = stkl - size;
+ }
+
+ result = address - this_segment;
+
+ /* If you subtract pseg from the current end of the stack,
+ you get the address of the previous stack segment's end.
+ This seems a little convoluted to me, but I'll bet you save
+ a cycle somewhere. */
+
+ while (pseg != 0)
+ {
+#ifdef DEBUG_I00AFUNC
+ fprintf (stderr, "%011o %011o\n", pseg, size);
+#endif
+ stkl = stkl - pseg;
+ ssptr = (struct stack_segment_linkage *) stkl;
+ size = ssptr->sssize;
+ pseg = ssptr->sspseg;
+ result += size;
+ }
+ return (result);
+}
+
+#endif /* not CRAY2 */
+#endif /* CRAY */
+
+#endif /* complicated expression at top of file */
diff --git a/lib/basename.c b/lib/basename.c
new file mode 100644
index 0000000..52ecb51
--- /dev/null
+++ b/lib/basename.c
@@ -0,0 +1,41 @@
+/* Return the name-within-directory of a file name.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#ifndef _LIBC
+/* We cannot generally use the name `basename' since XPG defines an unusable
+ variant of the function but we cannot use it. */
+# define basename gnu_basename
+#endif
+
+
+char *
+basename (filename)
+ const char *filename;
+{
+ char *p = strrchr (filename, '/');
+ return p ? p + 1 : (char *) filename;
+}
diff --git a/lib/error.c b/lib/error.c
new file mode 100644
index 0000000..140fa77
--- /dev/null
+++ b/lib/error.c
@@ -0,0 +1,248 @@
+/* Error handler for noninteractive utilities
+ Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc.
+
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
+# if __STDC__
+# include <stdarg.h>
+# define VA_START(args, lastarg) va_start(args, lastarg)
+# else
+# include <varargs.h>
+# define VA_START(args, lastarg) va_start(args)
+# endif
+#else
+# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
+# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
+#endif
+
+#if STDC_HEADERS || _LIBC
+# include <stdlib.h>
+# include <string.h>
+#else
+void exit ();
+#endif
+
+#include "error.h"
+
+#ifndef _
+# define _(String) String
+#endif
+
+/* If NULL, error will flush stdout, then print on stderr the program
+ name, a colon and a space. Otherwise, error will call this
+ function without parameters instead. */
+void (*error_print_progname) (
+#if __STDC__ - 0
+ void
+#endif
+ );
+
+/* This variable is incremented each time `error' is called. */
+unsigned int error_message_count;
+
+#ifdef _LIBC
+/* In the GNU C library, there is a predefined variable for this. */
+
+# define program_name program_invocation_name
+# include <errno.h>
+
+/* In GNU libc we want do not want to use the common name `error' directly.
+ Instead make it a weak alias. */
+# define error __error
+# define error_at_line __error_at_line
+
+#else /* not _LIBC */
+
+/* The calling program should define program_name and set it to the
+ name of the executing program. */
+extern char *program_name;
+
+# ifdef HAVE_STRERROR_R
+# define __strerror_r strerror_r
+# else
+# if HAVE_STRERROR
+# ifndef strerror /* On some systems, strerror is a macro */
+char *strerror ();
+# endif
+# else
+static char *
+private_strerror (errnum)
+ int errnum;
+{
+ extern char *sys_errlist[];
+ extern int sys_nerr;
+
+ if (errnum > 0 && errnum <= sys_nerr)
+ return _(sys_errlist[errnum]);
+ return _("Unknown system error");
+}
+# define strerror private_strerror
+# endif /* HAVE_STRERROR */
+# endif /* HAVE_STRERROR_R */
+#endif /* not _LIBC */
+
+/* Print the program name and error message MESSAGE, which is a printf-style
+ format string with optional args.
+ If ERRNUM is nonzero, print its corresponding system error message.
+ Exit with status STATUS if it is nonzero. */
+/* VARARGS */
+
+void
+#if defined VA_START && __STDC__
+error (int status, int errnum, const char *message, ...)
+#else
+error (status, errnum, message, va_alist)
+ int status;
+ int errnum;
+ char *message;
+ va_dcl
+#endif
+{
+#ifdef VA_START
+ va_list args;
+#endif
+
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+ fflush (stdout);
+ fprintf (stderr, "%s: ", program_name);
+ }
+
+#ifdef VA_START
+ VA_START (args, message);
+# if HAVE_VPRINTF || _LIBC
+ vfprintf (stderr, message, args);
+# else
+ _doprnt (message, args, stderr);
+# endif
+ va_end (args);
+#else
+ fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
+#endif
+
+ ++error_message_count;
+ if (errnum)
+ {
+#if defined HAVE_STRERROR_R || defined _LIBC
+ char errbuf[1024];
+ fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
+#else
+ fprintf (stderr, ": %s", strerror (errnum));
+#endif
+ }
+ putc ('\n', stderr);
+ fflush (stderr);
+ if (status)
+ exit (status);
+}
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+int error_one_per_line;
+
+void
+#if defined VA_START && __STDC__
+error_at_line (int status, int errnum, const char *file_name,
+ unsigned int line_number, const char *message, ...)
+#else
+error_at_line (status, errnum, file_name, line_number, message, va_alist)
+ int status;
+ int errnum;
+ const char *file_name;
+ unsigned int line_number;
+ char *message;
+ va_dcl
+#endif
+{
+#ifdef VA_START
+ va_list args;
+#endif
+
+ if (error_one_per_line)
+ {
+ static const char *old_file_name;
+ static unsigned int old_line_number;
+
+ if (old_line_number == line_number &&
+ (file_name == old_file_name || !strcmp (old_file_name, file_name)))
+ /* Simply return and print nothing. */
+ return;
+
+ old_file_name = file_name;
+ old_line_number = line_number;
+ }
+
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+ fflush (stdout);
+ fprintf (stderr, "%s:", program_name);
+ }
+
+ if (file_name != NULL)
+ fprintf (stderr, "%s:%d: ", file_name, line_number);
+
+#ifdef VA_START
+ VA_START (args, message);
+# if HAVE_VPRINTF || _LIBC
+ vfprintf (stderr, message, args);
+# else
+ _doprnt (message, args, stderr);
+# endif
+ va_end (args);
+#else
+ fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
+#endif
+
+ ++error_message_count;
+ if (errnum)
+ {
+#if defined HAVE_STRERROR_R || defined _LIBC
+ char errbuf[1024];
+ fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
+#else
+ fprintf (stderr, ": %s", strerror (errnum));
+#endif
+ }
+ putc ('\n', stderr);
+ fflush (stderr);
+ if (status)
+ exit (status);
+}
+
+#ifdef _LIBC
+/* Make the weak alias. */
+# undef error
+# undef error_at_line
+weak_alias (__error, error)
+weak_alias (__error_at_line, error_at_line)
+#endif
diff --git a/lib/error.h b/lib/error.h
new file mode 100644
index 0000000..20f7582
--- /dev/null
+++ b/lib/error.h
@@ -0,0 +1,78 @@
+/* Declaration for error-reporting function
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef _ERROR_H
+#define _ERROR_H 1
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+# define __attribute__(Spec) /* empty */
+# endif
+/* The __-protected variants of `format' and `printf' attributes
+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __format__ format
+# define __printf__ printf
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined (__STDC__) && __STDC__
+
+/* Print a message with `fprintf (stderr, FORMAT, ...)';
+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+ If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
+
+extern void error (int status, int errnum, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern void error_at_line (int status, int errnum, const char *fname,
+ unsigned int lineno, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 5, 6)));
+
+/* If NULL, error will flush stdout, then print on stderr the program
+ name, a colon and a space. Otherwise, error will call this
+ function without parameters instead. */
+extern void (*error_print_progname) (void);
+
+#else
+void error ();
+void error_at_line ();
+extern void (*error_print_progname) ();
+#endif
+
+/* This variable is incremented each time `error' is called. */
+extern unsigned int error_message_count;
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+extern int error_one_per_line;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* error.h */
diff --git a/lib/fstrcmp.c b/lib/fstrcmp.c
new file mode 100644
index 0000000..b1f5971
--- /dev/null
+++ b/lib/fstrcmp.c
@@ -0,0 +1,636 @@
+/* Functions to make fuzzy comparisons between strings
+ Copyright (C) 1988, 1989, 1992, 1993, 1995 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ Derived from GNU diff 2.7, analyze.c et al.
+
+ The basic algorithm is described in:
+ "An O(ND) Difference Algorithm and its Variations", Eugene Myers,
+ Algorithmica Vol. 1 No. 2, 1986, pp. 251-266;
+ see especially section 4.2, which describes the variation used below.
+
+ The basic algorithm was independently discovered as described in:
+ "Algorithms for Approximate String Matching", E. Ukkonen,
+ Information and Control Vol. 64, 1985, pp. 100-118.
+
+ Modified to work on strings rather than files
+ by Peter Miller <pmiller@agso.gov.au>, October 1995 */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#else
+# define INT_MAX ((int)(~(unsigned)0 >> 1))
+#endif
+
+#include "system.h"
+#include "fstrcmp.h"
+
+
+/*
+ * Data on one input string being compared.
+ */
+struct string_data
+{
+ /* The string to be compared. */
+ const char *data;
+
+ /* The length of the string to be compared. */
+ int data_length;
+
+ /* The number of characters inserted or deleted. */
+ int edit_count;
+};
+
+static struct string_data string[2];
+
+
+#ifdef MINUS_H_FLAG
+
+/* This corresponds to the diff -H flag. With this heuristic, for
+ strings with a constant small density of changes, the algorithm is
+ linear in the strings size. This is unlikely in typical uses of
+ fstrcmp, and so is usually compiled out. Besides, there is no
+ interface to set it true. */
+static int heuristic;
+
+#endif
+
+
+/* Vector, indexed by diagonal, containing 1 + the X coordinate of the
+ point furthest along the given diagonal in the forward search of the
+ edit matrix. */
+static int *fdiag;
+
+/* Vector, indexed by diagonal, containing the X coordinate of the point
+ furthest along the given diagonal in the backward search of the edit
+ matrix. */
+static int *bdiag;
+
+/* Edit scripts longer than this are too expensive to compute. */
+static int too_expensive;
+
+/* Snakes bigger than this are considered `big'. */
+#define SNAKE_LIMIT 20
+
+struct partition
+{
+ /* Midpoints of this partition. */
+ int xmid, ymid;
+
+ /* Nonzero if low half will be analyzed minimally. */
+ int lo_minimal;
+
+ /* Likewise for high half. */
+ int hi_minimal;
+};
+
+
+/* NAME
+ diag - find diagonal path
+
+ SYNOPSIS
+ int diag(int xoff, int xlim, int yoff, int ylim, int minimal,
+ struct partition *part);
+
+ DESCRIPTION
+ Find the midpoint of the shortest edit script for a specified
+ portion of the two strings.
+
+ Scan from the beginnings of the strings, and simultaneously from
+ the ends, doing a breadth-first search through the space of
+ edit-sequence. When the two searches meet, we have found the
+ midpoint of the shortest edit sequence.
+
+ If MINIMAL is nonzero, find the minimal edit script regardless
+ of expense. Otherwise, if the search is too expensive, use
+ heuristics to stop the search and report a suboptimal answer.
+
+ RETURNS
+ Set PART->(XMID,YMID) to the midpoint (XMID,YMID). The diagonal
+ number XMID - YMID equals the number of inserted characters
+ minus the number of deleted characters (counting only characters
+ before the midpoint). Return the approximate edit cost; this is
+ the total number of characters inserted or deleted (counting
+ only characters before the midpoint), unless a heuristic is used
+ to terminate the search prematurely.
+
+ Set PART->LEFT_MINIMAL to nonzero iff the minimal edit script
+ for the left half of the partition is known; similarly for
+ PART->RIGHT_MINIMAL.
+
+ CAVEAT
+ This function assumes that the first characters of the specified
+ portions of the two strings do not match, and likewise that the
+ last characters do not match. The caller must trim matching
+ characters from the beginning and end of the portions it is
+ going to specify.
+
+ If we return the "wrong" partitions, the worst this can do is
+ cause suboptimal diff output. It cannot cause incorrect diff
+ output. */
+
+static int diag PARAMS ((int, int, int, int, int, struct partition *));
+
+static int
+diag (xoff, xlim, yoff, ylim, minimal, part)
+ int xoff;
+ int xlim;
+ int yoff;
+ int ylim;
+ int minimal;
+ struct partition *part;
+{
+ int *const fd = fdiag; /* Give the compiler a chance. */
+ int *const bd = bdiag; /* Additional help for the compiler. */
+ const char *const xv = string[0].data; /* Still more help for the compiler. */
+ const char *const yv = string[1].data; /* And more and more . . . */
+ const int dmin = xoff - ylim; /* Minimum valid diagonal. */
+ const int dmax = xlim - yoff; /* Maximum valid diagonal. */
+ const int fmid = xoff - yoff; /* Center diagonal of top-down search. */
+ const int bmid = xlim - ylim; /* Center diagonal of bottom-up search. */
+ int fmin = fmid;
+ int fmax = fmid; /* Limits of top-down search. */
+ int bmin = bmid;
+ int bmax = bmid; /* Limits of bottom-up search. */
+ int c; /* Cost. */
+ int odd = (fmid - bmid) & 1;
+
+ /*
+ * True if southeast corner is on an odd diagonal with respect
+ * to the northwest.
+ */
+ fd[fmid] = xoff;
+ bd[bmid] = xlim;
+ for (c = 1;; ++c)
+ {
+ int d; /* Active diagonal. */
+ int big_snake;
+
+ big_snake = 0;
+ /* Extend the top-down search by an edit step in each diagonal. */
+ if (fmin > dmin)
+ fd[--fmin - 1] = -1;
+ else
+ ++fmin;
+ if (fmax < dmax)
+ fd[++fmax + 1] = -1;
+ else
+ --fmax;
+ for (d = fmax; d >= fmin; d -= 2)
+ {
+ int x;
+ int y;
+ int oldx;
+ int tlo;
+ int thi;
+
+ tlo = fd[d - 1],
+ thi = fd[d + 1];
+
+ if (tlo >= thi)
+ x = tlo + 1;
+ else
+ x = thi;
+ oldx = x;
+ y = x - d;
+ while (x < xlim && y < ylim && xv[x] == yv[y])
+ {
+ ++x;
+ ++y;
+ }
+ if (x - oldx > SNAKE_LIMIT)
+ big_snake = 1;
+ fd[d] = x;
+ if (odd && bmin <= d && d <= bmax && bd[d] <= x)
+ {
+ part->xmid = x;
+ part->ymid = y;
+ part->lo_minimal = part->hi_minimal = 1;
+ return 2 * c - 1;
+ }
+ }
+ /* Similarly extend the bottom-up search. */
+ if (bmin > dmin)
+ bd[--bmin - 1] = INT_MAX;
+ else
+ ++bmin;
+ if (bmax < dmax)
+ bd[++bmax + 1] = INT_MAX;
+ else
+ --bmax;
+ for (d = bmax; d >= bmin; d -= 2)
+ {
+ int x;
+ int y;
+ int oldx;
+ int tlo;
+ int thi;
+
+ tlo = bd[d - 1],
+ thi = bd[d + 1];
+ if (tlo < thi)
+ x = tlo;
+ else
+ x = thi - 1;
+ oldx = x;
+ y = x - d;
+ while (x > xoff && y > yoff && xv[x - 1] == yv[y - 1])
+ {
+ --x;
+ --y;
+ }
+ if (oldx - x > SNAKE_LIMIT)
+ big_snake = 1;
+ bd[d] = x;
+ if (!odd && fmin <= d && d <= fmax && x <= fd[d])
+ {
+ part->xmid = x;
+ part->ymid = y;
+ part->lo_minimal = part->hi_minimal = 1;
+ return 2 * c;
+ }
+ }
+
+ if (minimal)
+ continue;
+
+#ifdef MINUS_H_FLAG
+ /* Heuristic: check occasionally for a diagonal that has made lots
+ of progress compared with the edit distance. If we have any
+ such, find the one that has made the most progress and return
+ it as if it had succeeded.
+
+ With this heuristic, for strings with a constant small density
+ of changes, the algorithm is linear in the strings size. */
+ if (c > 200 && big_snake && heuristic)
+ {
+ int best;
+
+ best = 0;
+ for (d = fmax; d >= fmin; d -= 2)
+ {
+ int dd;
+ int x;
+ int y;
+ int v;
+
+ dd = d - fmid;
+ x = fd[d];
+ y = x - d;
+ v = (x - xoff) * 2 - dd;
+
+ if (v > 12 * (c + (dd < 0 ? -dd : dd)))
+ {
+ if
+ (
+ v > best
+ &&
+ xoff + SNAKE_LIMIT <= x
+ &&
+ x < xlim
+ &&
+ yoff + SNAKE_LIMIT <= y
+ &&
+ y < ylim
+ )
+ {
+ /* We have a good enough best diagonal; now insist
+ that it end with a significant snake. */
+ int k;
+
+ for (k = 1; xv[x - k] == yv[y - k]; k++)
+ {
+ if (k == SNAKE_LIMIT)
+ {
+ best = v;
+ part->xmid = x;
+ part->ymid = y;
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (best > 0)
+ {
+ part->lo_minimal = 1;
+ part->hi_minimal = 0;
+ return 2 * c - 1;
+ }
+ best = 0;
+ for (d = bmax; d >= bmin; d -= 2)
+ {
+ int dd;
+ int x;
+ int y;
+ int v;
+
+ dd = d - bmid;
+ x = bd[d];
+ y = x - d;
+ v = (xlim - x) * 2 + dd;
+
+ if (v > 12 * (c + (dd < 0 ? -dd : dd)))
+ {
+ if (v > best && xoff < x && x <= xlim - SNAKE_LIMIT &&
+ yoff < y && y <= ylim - SNAKE_LIMIT)
+ {
+ /* We have a good enough best diagonal; now insist
+ that it end with a significant snake. */
+ int k;
+
+ for (k = 0; xv[x + k] == yv[y + k]; k++)
+ {
+ if (k == SNAKE_LIMIT - 1)
+ {
+ best = v;
+ part->xmid = x;
+ part->ymid = y;
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (best > 0)
+ {
+ part->lo_minimal = 0;
+ part->hi_minimal = 1;
+ return 2 * c - 1;
+ }
+ }
+#endif /* MINUS_H_FLAG */
+
+ /* Heuristic: if we've gone well beyond the call of duty, give up
+ and report halfway between our best results so far. */
+ if (c >= too_expensive)
+ {
+ int fxybest;
+ int fxbest;
+ int bxybest;
+ int bxbest;
+
+ /* Pacify `gcc -Wall'. */
+ fxbest = 0;
+ bxbest = 0;
+
+ /* Find forward diagonal that maximizes X + Y. */
+ fxybest = -1;
+ for (d = fmax; d >= fmin; d -= 2)
+ {
+ int x;
+ int y;
+
+ x = fd[d] < xlim ? fd[d] : xlim;
+ y = x - d;
+
+ if (ylim < y)
+ {
+ x = ylim + d;
+ y = ylim;
+ }
+ if (fxybest < x + y)
+ {
+ fxybest = x + y;
+ fxbest = x;
+ }
+ }
+ /* Find backward diagonal that minimizes X + Y. */
+ bxybest = INT_MAX;
+ for (d = bmax; d >= bmin; d -= 2)
+ {
+ int x;
+ int y;
+
+ x = xoff > bd[d] ? xoff : bd[d];
+ y = x - d;
+
+ if (y < yoff)
+ {
+ x = yoff + d;
+ y = yoff;
+ }
+ if (x + y < bxybest)
+ {
+ bxybest = x + y;
+ bxbest = x;
+ }
+ }
+ /* Use the better of the two diagonals. */
+ if ((xlim + ylim) - bxybest < fxybest - (xoff + yoff))
+ {
+ part->xmid = fxbest;
+ part->ymid = fxybest - fxbest;
+ part->lo_minimal = 1;
+ part->hi_minimal = 0;
+ }
+ else
+ {
+ part->xmid = bxbest;
+ part->ymid = bxybest - bxbest;
+ part->lo_minimal = 0;
+ part->hi_minimal = 1;
+ }
+ return 2 * c - 1;
+ }
+ }
+}
+
+
+/* NAME
+ compareseq - find edit sequence
+
+ SYNOPSIS
+ void compareseq(int xoff, int xlim, int yoff, int ylim, int minimal);
+
+ DESCRIPTION
+ Compare in detail contiguous subsequences of the two strings
+ which are known, as a whole, to match each other.
+
+ The subsequence of string 0 is [XOFF, XLIM) and likewise for
+ string 1.
+
+ Note that XLIM, YLIM are exclusive bounds. All character
+ numbers are origin-0.
+
+ If MINIMAL is nonzero, find a minimal difference no matter how
+ expensive it is. */
+
+static void compareseq PARAMS ((int, int, int, int, int));
+
+static void
+compareseq (xoff, xlim, yoff, ylim, minimal)
+ int xoff;
+ int xlim;
+ int yoff;
+ int ylim;
+ int minimal;
+{
+ const char *const xv = string[0].data; /* Help the compiler. */
+ const char *const yv = string[1].data;
+
+ /* Slide down the bottom initial diagonal. */
+ while (xoff < xlim && yoff < ylim && xv[xoff] == yv[yoff])
+ {
+ ++xoff;
+ ++yoff;
+ }
+
+ /* Slide up the top initial diagonal. */
+ while (xlim > xoff && ylim > yoff && xv[xlim - 1] == yv[ylim - 1])
+ {
+ --xlim;
+ --ylim;
+ }
+
+ /* Handle simple cases. */
+ if (xoff == xlim)
+ {
+ while (yoff < ylim)
+ {
+ ++string[1].edit_count;
+ ++yoff;
+ }
+ }
+ else if (yoff == ylim)
+ {
+ while (xoff < xlim)
+ {
+ ++string[0].edit_count;
+ ++xoff;
+ }
+ }
+ else
+ {
+ int c;
+ struct partition part;
+
+ /* Find a point of correspondence in the middle of the strings. */
+ c = diag (xoff, xlim, yoff, ylim, minimal, &part);
+ if (c == 1)
+ {
+#if 0
+ /* This should be impossible, because it implies that one of
+ the two subsequences is empty, and that case was handled
+ above without calling `diag'. Let's verify that this is
+ true. */
+ abort ();
+#else
+ /* The two subsequences differ by a single insert or delete;
+ record it and we are done. */
+ if (part.xmid - part.ymid < xoff - yoff)
+ ++string[1].edit_count;
+ else
+ ++string[0].edit_count;
+#endif
+ }
+ else
+ {
+ /* Use the partitions to split this problem into subproblems. */
+ compareseq (xoff, part.xmid, yoff, part.ymid, part.lo_minimal);
+ compareseq (part.xmid, xlim, part.ymid, ylim, part.hi_minimal);
+ }
+ }
+}
+
+
+/* NAME
+ fstrcmp - fuzzy string compare
+
+ SYNOPSIS
+ double fstrcmp(const char *, const char *);
+
+ DESCRIPTION
+ The fstrcmp function may be used to compare two string for
+ similarity. It is very useful in reducing "cascade" or
+ "secondary" errors in compilers or other situations where
+ symbol tables occur.
+
+ RETURNS
+ double; 0 if the strings are entirly dissimilar, 1 if the
+ strings are identical, and a number in between if they are
+ similar. */
+
+double
+fstrcmp (string1, string2)
+ const char *string1;
+ const char *string2;
+{
+ int i;
+
+ size_t fdiag_len;
+ static int *fdiag_buf;
+ static size_t fdiag_max;
+
+ /* set the info for each string. */
+ string[0].data = string1;
+ string[0].data_length = strlen (string1);
+ string[1].data = string2;
+ string[1].data_length = strlen (string2);
+
+ /* short-circuit obvious comparisons */
+ if (string[0].data_length == 0 && string[1].data_length == 0)
+ return 1.0;
+ if (string[0].data_length == 0 || string[1].data_length == 0)
+ return 0.0;
+
+ /* Set TOO_EXPENSIVE to be approximate square root of input size,
+ bounded below by 256. */
+ too_expensive = 1;
+ for (i = string[0].data_length + string[1].data_length; i != 0; i >>= 2)
+ too_expensive <<= 1;
+ if (too_expensive < 256)
+ too_expensive = 256;
+
+ /* Because fstrcmp is typically called multiple times, while scanning
+ symbol tables, etc, attempt to minimize the number of memory
+ allocations performed. Thus, we use a static buffer for the
+ diagonal vectors, and never free them. */
+ fdiag_len = string[0].data_length + string[1].data_length + 3;
+ if (fdiag_len > fdiag_max)
+ {
+ fdiag_max = fdiag_len;
+ fdiag_buf = xrealloc (fdiag_buf, fdiag_max * (2 * sizeof (int)));
+ }
+ fdiag = fdiag_buf + string[1].data_length + 1;
+ bdiag = fdiag + fdiag_len;
+
+ /* Now do the main comparison algorithm */
+ string[0].edit_count = 0;
+ string[1].edit_count = 0;
+ compareseq (0, string[0].data_length, 0, string[1].data_length, 0);
+
+ /* The result is
+ ((number of chars in common) / (average length of the strings)).
+ This is admittedly biased towards finding that the strings are
+ similar, however it does produce meaningful results. */
+ return ((double) (string[0].data_length + string[1].data_length -
+ string[1].edit_count - string[0].edit_count) / (string[0].data_length
+ + string[1].data_length));
+}
diff --git a/lib/fstrcmp.h b/lib/fstrcmp.h
new file mode 100644
index 0000000..0404717
--- /dev/null
+++ b/lib/fstrcmp.h
@@ -0,0 +1,25 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <pmiller@agso.gov.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _FSTRCMP_H
+#define _FSTRCMP_H
+
+double fstrcmp PARAMS ((const char *__s1, const char *__s2));
+
+#endif
diff --git a/lib/getline.c b/lib/getline.c
new file mode 100644
index 0000000..ba05abb
--- /dev/null
+++ b/lib/getline.c
@@ -0,0 +1,155 @@
+/* getline.c -- Replacement for GNU C library function getline
+
+Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* The `getdelim' function is only declared if the following symbol
+ is defined. */
+#define _GNU_SOURCE 1
+#include <stdio.h>
+#include <sys/types.h>
+
+#if defined __GNU_LIBRARY__ && HAVE_GETDELIM
+
+int
+getline (lineptr, n, stream)
+ char **lineptr;
+ size_t *n;
+ FILE *stream;
+{
+ return getdelim (lineptr, n, '\n', stream);
+}
+
+
+#else /* ! have getdelim */
+
+# define NDEBUG
+# include <assert.h>
+
+# if STDC_HEADERS
+# include <stdlib.h>
+# else
+char *malloc (), *realloc ();
+# endif
+
+/* Always add at least this many bytes when extending the buffer. */
+# define MIN_CHUNK 64
+
+/* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR
+ + OFFSET (and null-terminate it). *LINEPTR is a pointer returned from
+ malloc (or NULL), pointing to *N characters of space. It is realloc'd
+ as necessary. Return the number of characters read (not including the
+ null terminator), or -1 on error or EOF. */
+
+int
+getstr (lineptr, n, stream, terminator, offset)
+ char **lineptr;
+ size_t *n;
+ FILE *stream;
+ char terminator;
+ size_t offset;
+{
+ int nchars_avail; /* Allocated but unused chars in *LINEPTR. */
+ char *read_pos; /* Where we're reading into *LINEPTR. */
+ int ret;
+
+ if (!lineptr || !n || !stream)
+ return -1;
+
+ if (!*lineptr)
+ {
+ *n = MIN_CHUNK;
+ *lineptr = malloc (*n);
+ if (!*lineptr)
+ return -1;
+ }
+
+ nchars_avail = *n - offset;
+ read_pos = *lineptr + offset;
+
+ for (;;)
+ {
+ register int c = getc (stream);
+
+ /* We always want at least one char left in the buffer, since we
+ always (unless we get an error while reading the first char)
+ NUL-terminate the line buffer. */
+
+ assert(*n - nchars_avail == read_pos - *lineptr);
+ if (nchars_avail < 2)
+ {
+ if (*n > MIN_CHUNK)
+ *n *= 2;
+ else
+ *n += MIN_CHUNK;
+
+ nchars_avail = *n + *lineptr - read_pos;
+ *lineptr = realloc (*lineptr, *n);
+ if (!*lineptr)
+ return -1;
+ read_pos = *n - nchars_avail + *lineptr;
+ assert(*n - nchars_avail == read_pos - *lineptr);
+ }
+
+ if (c == EOF || ferror (stream))
+ {
+ /* Return partial line, if any. */
+ if (read_pos == *lineptr)
+ return -1;
+ else
+ break;
+ }
+
+ *read_pos++ = c;
+ nchars_avail--;
+
+ if (c == terminator)
+ /* Return the line. */
+ break;
+ }
+
+ /* Done - NUL terminate and return the number of chars read. */
+ *read_pos = '\0';
+
+ ret = read_pos - (*lineptr + offset);
+ return ret;
+}
+
+int
+getline (lineptr, n, stream)
+ char **lineptr;
+ size_t *n;
+ FILE *stream;
+{
+ return getstr (lineptr, n, stream, '\n', 0);
+}
+
+int
+getdelim (lineptr, n, delimiter, stream)
+ char **lineptr;
+ size_t *n;
+ int delimiter;
+ FILE *stream;
+{
+ return getstr (lineptr, n, stream, delimiter, 0);
+}
+#endif
diff --git a/lib/getline.h b/lib/getline.h
new file mode 100644
index 0000000..cc6466d
--- /dev/null
+++ b/lib/getline.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef GETLINE_H_
+# define GETLINE_H_ 1
+
+# include <stdio.h>
+
+# ifndef PARAMS
+# if defined (__GNUC__) || __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+# endif
+
+int
+getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
+
+int
+getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
+
+#endif /* not GETLINE_H_ */
diff --git a/lib/getopt.c b/lib/getopt.c
new file mode 100644
index 0000000..7da985f
--- /dev/null
+++ b/lib/getopt.c
@@ -0,0 +1,1052 @@
+/* Getopt for GNU.
+ NOTE: getopt is now part of the C library, so if you don't know what
+ "Keep this file name-space clean" means, talk to drepper@gnu.org
+ before changing it!
+
+ Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
+ Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
+ Ditto for AIX 3.2 and <stdlib.h>. */
+#ifndef _NO_PROTO
+# define _NO_PROTO
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if !defined __STDC__ || !__STDC__
+/* This is a separate conditional since some stdc systems
+ reject `defined (const)'. */
+# ifndef const
+# define const
+# endif
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. This code is part of the GNU C
+ Library, but also included in many other GNU distributions. Compiling
+ and linking in this code is a waste when using the GNU C library
+ (especially if it is a shared library). Rather than having every GNU
+ program understand `configure --with-gnu-libc' and omit the object files,
+ it is simpler to just do this in the source for each such file. */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
+# include <gnu-versions.h>
+# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+# define ELIDE_CODE
+# endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+ contain conflicting prototypes for getopt. */
+# include <stdlib.h>
+# include <unistd.h>
+#endif /* GNU C library. */
+
+#ifdef VMS
+# include <unixlib.h>
+# if HAVE_STRING_H - 0
+# include <string.h>
+# endif
+#endif
+
+#ifndef _
+/* This is for other GNU distributions with internationalized messages.
+ When compiling libc, the _ macro is predefined. */
+# ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# define _(msgid) gettext (msgid)
+# else
+# define _(msgid) (msgid)
+# endif
+#endif
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+ but it behaves differently for the user, since it allows the user
+ to intersperse the options with the other arguments.
+
+ As `getopt' works, it permutes the elements of ARGV so that,
+ when it is done, all the options precede everything else. Thus
+ all application programs are extended to handle flexible argument order.
+
+ Setting the environment variable POSIXLY_CORRECT disables permutation.
+ Then the behavior is completely standard.
+
+ GNU application programs can use a third alternative mode in which
+ they can distinguish the relative order of options and other arguments. */
+
+#include "getopt.h"
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+char *optarg = NULL;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+/* 1003.2 says this must be 1 before any call. */
+int optind = 1;
+
+/* Formerly, initialization of getopt depended on optind==0, which
+ causes problems with re-calling getopt as programs generally don't
+ know that. */
+
+int __getopt_initialized = 0;
+
+/* The next char to be scanned in the option-element
+ in which the last option character we returned was found.
+ This allows us to pick up the scan where we left off.
+
+ If this is zero, or a null string, it means resume the scan
+ by advancing to the next ARGV-element. */
+
+static char *nextchar;
+
+/* Callers store zero here to inhibit the error message
+ for unrecognized options. */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+ This must be initialized on some systems to avoid linking in the
+ system's own getopt implementation. */
+
+int optopt = '?';
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+ If the caller did not specify anything,
+ the default is REQUIRE_ORDER if the environment variable
+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+ REQUIRE_ORDER means don't recognize them as options;
+ stop option processing when the first non-option is seen.
+ This is what Unix does.
+ This mode of operation is selected by either setting the environment
+ variable POSIXLY_CORRECT, or using `+' as the first character
+ of the list of option characters.
+
+ PERMUTE is the default. We permute the contents of ARGV as we scan,
+ so that eventually all the non-options are at the end. This allows options
+ to be given in any order, even with programs that were not written to
+ expect this.
+
+ RETURN_IN_ORDER is an option available to programs that were written
+ to expect options and other ARGV-elements in any order and that care about
+ the ordering of the two. We describe each non-option ARGV-element
+ as if it were the argument of an option with character code 1.
+ Using `-' as the first character of the list of option characters
+ selects this mode of operation.
+
+ The special argument `--' forces an end of option-scanning regardless
+ of the value of `ordering'. In the case of RETURN_IN_ORDER, only
+ `--' can cause `getopt' to return -1 with `optind' != ARGC. */
+
+static enum
+{
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+/* Value of POSIXLY_CORRECT environment variable. */
+static char *posixly_correct;
+
+#ifdef __GNU_LIBRARY__
+/* We want to avoid inclusion of string.h with non-GNU libraries
+ because there are many ways it can cause trouble.
+ On some systems, it contains special magic macros that don't work
+ in GCC. */
+# include <string.h>
+# define my_index strchr
+#else
+
+# if HAVE_STRING_H
+# include <string.h>
+# else
+# include <strings.h>
+# endif
+
+/* Avoid depending on library functions or files
+ whose names are inconsistent. */
+
+#ifndef getenv
+extern char *getenv ();
+#endif
+
+static char *
+my_index (str, chr)
+ const char *str;
+ int chr;
+{
+ while (*str)
+ {
+ if (*str == chr)
+ return (char *) str;
+ str++;
+ }
+ return 0;
+}
+
+/* If using GCC, we can safely declare strlen this way.
+ If not using GCC, it is ok not to declare it. */
+#ifdef __GNUC__
+/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
+ That was relevant to code that was here before. */
+# if (!defined __STDC__ || !__STDC__) && !defined strlen
+/* gcc with -traditional declares the built-in strlen to return int,
+ and has done so at least since version 2.4.5. -- rms. */
+extern int strlen (const char *);
+# endif /* not __STDC__ */
+#endif /* __GNUC__ */
+
+#endif /* not __GNU_LIBRARY__ */
+
+/* Handle permutation of arguments. */
+
+/* Describe the part of ARGV that contains non-options that have
+ been skipped. `first_nonopt' is the index in ARGV of the first of them;
+ `last_nonopt' is the index after the last of them. */
+
+static int first_nonopt;
+static int last_nonopt;
+
+#ifdef _LIBC
+/* Bash 2.0 gives us an environment variable containing flags
+ indicating ARGV elements that should not be considered arguments. */
+
+/* Defined in getopt_init.c */
+extern char *__getopt_nonoption_flags;
+
+static int nonoption_flags_max_len;
+static int nonoption_flags_len;
+
+static int original_argc;
+static char *const *original_argv;
+
+/* Make sure the environment variable bash 2.0 puts in the environment
+ is valid for the getopt call we must make sure that the ARGV passed
+ to getopt is that one passed to the process. */
+static void
+__attribute__ ((unused))
+store_args_and_env (int argc, char *const *argv)
+{
+ /* XXX This is no good solution. We should rather copy the args so
+ that we can compare them later. But we must not use malloc(3). */
+ original_argc = argc;
+ original_argv = argv;
+}
+# ifdef text_set_element
+text_set_element (__libc_subinit, store_args_and_env);
+# endif /* text_set_element */
+
+# define SWAP_FLAGS(ch1, ch2) \
+ if (nonoption_flags_len > 0) \
+ { \
+ char __tmp = __getopt_nonoption_flags[ch1]; \
+ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
+ __getopt_nonoption_flags[ch2] = __tmp; \
+ }
+#else /* !_LIBC */
+# define SWAP_FLAGS(ch1, ch2)
+#endif /* _LIBC */
+
+/* Exchange two adjacent subsequences of ARGV.
+ One subsequence is elements [first_nonopt,last_nonopt)
+ which contains all the non-options that have been skipped so far.
+ The other is elements [last_nonopt,optind), which contains all
+ the options processed since those non-options were skipped.
+
+ `first_nonopt' and `last_nonopt' are relocated so that they describe
+ the new indices of the non-options in ARGV after they are moved. */
+
+#if defined __STDC__ && __STDC__
+static void exchange (char **);
+#endif
+
+static void
+exchange (argv)
+ char **argv;
+{
+ int bottom = first_nonopt;
+ int middle = last_nonopt;
+ int top = optind;
+ char *tem;
+
+ /* Exchange the shorter segment with the far end of the longer segment.
+ That puts the shorter segment into the right place.
+ It leaves the longer segment in the right place overall,
+ but it consists of two parts that need to be swapped next. */
+
+#ifdef _LIBC
+ /* First make sure the handling of the `__getopt_nonoption_flags'
+ string can work normally. Our top argument must be in the range
+ of the string. */
+ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
+ {
+ /* We must extend the array. The user plays games with us and
+ presents new arguments. */
+ char *new_str = malloc (top + 1);
+ if (new_str == NULL)
+ nonoption_flags_len = nonoption_flags_max_len = 0;
+ else
+ {
+ memset (__mempcpy (new_str, __getopt_nonoption_flags,
+ nonoption_flags_max_len),
+ '\0', top + 1 - nonoption_flags_max_len);
+ nonoption_flags_max_len = top + 1;
+ __getopt_nonoption_flags = new_str;
+ }
+ }
+#endif
+
+ while (top > middle && middle > bottom)
+ {
+ if (top - middle > middle - bottom)
+ {
+ /* Bottom segment is the short one. */
+ int len = middle - bottom;
+ register int i;
+
+ /* Swap it with the top part of the top segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[top - (middle - bottom) + i];
+ argv[top - (middle - bottom) + i] = tem;
+ SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
+ }
+ /* Exclude the moved bottom segment from further swapping. */
+ top -= len;
+ }
+ else
+ {
+ /* Top segment is the short one. */
+ int len = top - middle;
+ register int i;
+
+ /* Swap it with the bottom part of the bottom segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[middle + i];
+ argv[middle + i] = tem;
+ SWAP_FLAGS (bottom + i, middle + i);
+ }
+ /* Exclude the moved top segment from further swapping. */
+ bottom += len;
+ }
+ }
+
+ /* Update records for the slots the non-options now occupy. */
+
+ first_nonopt += (optind - last_nonopt);
+ last_nonopt = optind;
+}
+
+/* Initialize the internal data when the first call is made. */
+
+#if defined __STDC__ && __STDC__
+static const char *_getopt_initialize (int, char *const *, const char *);
+#endif
+static const char *
+_getopt_initialize (argc, argv, optstring)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+{
+ /* Start processing options with ARGV-element 1 (since ARGV-element 0
+ is the program name); the sequence of previously skipped
+ non-option ARGV-elements is empty. */
+
+ first_nonopt = last_nonopt = optind;
+
+ nextchar = NULL;
+
+ posixly_correct = getenv ("POSIXLY_CORRECT");
+
+ /* Determine how to handle the ordering of options and nonoptions. */
+
+ if (optstring[0] == '-')
+ {
+ ordering = RETURN_IN_ORDER;
+ ++optstring;
+ }
+ else if (optstring[0] == '+')
+ {
+ ordering = REQUIRE_ORDER;
+ ++optstring;
+ }
+ else if (posixly_correct != NULL)
+ ordering = REQUIRE_ORDER;
+ else
+ ordering = PERMUTE;
+
+#ifdef _LIBC
+ if (posixly_correct == NULL
+ && argc == original_argc && argv == original_argv)
+ {
+ if (nonoption_flags_max_len == 0)
+ {
+ if (__getopt_nonoption_flags == NULL
+ || __getopt_nonoption_flags[0] == '\0')
+ nonoption_flags_max_len = -1;
+ else
+ {
+ const char *orig_str = __getopt_nonoption_flags;
+ int len = nonoption_flags_max_len = strlen (orig_str);
+ if (nonoption_flags_max_len < argc)
+ nonoption_flags_max_len = argc;
+ __getopt_nonoption_flags =
+ (char *) malloc (nonoption_flags_max_len);
+ if (__getopt_nonoption_flags == NULL)
+ nonoption_flags_max_len = -1;
+ else
+ memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+ '\0', nonoption_flags_max_len - len);
+ }
+ }
+ nonoption_flags_len = nonoption_flags_max_len;
+ }
+ else
+ nonoption_flags_len = 0;
+#endif
+
+ return optstring;
+}
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+ given in OPTSTRING.
+
+ If an element of ARGV starts with '-', and is not exactly "-" or "--",
+ then it is an option element. The characters of this element
+ (aside from the initial '-') are option characters. If `getopt'
+ is called repeatedly, it returns successively each of the option characters
+ from each of the option elements.
+
+ If `getopt' finds another option character, it returns that character,
+ updating `optind' and `nextchar' so that the next call to `getopt' can
+ resume the scan with the following option character or ARGV-element.
+
+ If there are no more option characters, `getopt' returns -1.
+ Then `optind' is the index in ARGV of the first ARGV-element
+ that is not an option. (The ARGV-elements have been permuted
+ so that those that are not options now come last.)
+
+ OPTSTRING is a string containing the legitimate option characters.
+ If an option character is seen that is not listed in OPTSTRING,
+ return '?' after printing an error message. If you set `opterr' to
+ zero, the error message is suppressed but we still return '?'.
+
+ If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+ so the following text in the same ARGV-element, or the text of the following
+ ARGV-element, is returned in `optarg'. Two colons mean an option that
+ wants an optional arg; if there is text in the current ARGV-element,
+ it is returned in `optarg', otherwise `optarg' is set to zero.
+
+ If OPTSTRING starts with `-' or `+', it requests different methods of
+ handling the non-option ARGV-elements.
+ See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+ Long-named options begin with `--' instead of `-'.
+ Their names may be abbreviated as long as the abbreviation is unique
+ or is an exact match for some defined option. If they have an
+ argument, it follows the option name in the same ARGV-element, separated
+ from the option name by a `=', or else the in next ARGV-element.
+ When `getopt' finds a long-named option, it returns 0 if that option's
+ `flag' field is nonzero, the value of the option's `val' field
+ if the `flag' field is zero.
+
+ The elements of ARGV aren't really const, because we permute them.
+ But we pretend they're const in the prototype to be compatible
+ with other systems.
+
+ LONGOPTS is a vector of `struct option' terminated by an
+ element containing a name which is zero.
+
+ LONGIND returns the index in LONGOPT of the long-named option found.
+ It is only valid when a long-named option has been found by the most
+ recent call.
+
+ If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+ long-named options. */
+
+int
+_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+ const struct option *longopts;
+ int *longind;
+ int long_only;
+{
+ optarg = NULL;
+
+ if (optind == 0 || !__getopt_initialized)
+ {
+ if (optind == 0)
+ optind = 1; /* Don't scan ARGV[0], the program name. */
+ optstring = _getopt_initialize (argc, argv, optstring);
+ __getopt_initialized = 1;
+ }
+
+ /* Test whether ARGV[optind] points to a non-option argument.
+ Either it does not have option syntax, or there is an environment flag
+ from the shell indicating it is not an option. The later information
+ is only used when the used in the GNU libc. */
+#ifdef _LIBC
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
+ || (optind < nonoption_flags_len \
+ && __getopt_nonoption_flags[optind] == '1'))
+#else
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+#endif
+
+ if (nextchar == NULL || *nextchar == '\0')
+ {
+ /* Advance to the next ARGV-element. */
+
+ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
+ moved back by the user (who may also have changed the arguments). */
+ if (last_nonopt > optind)
+ last_nonopt = optind;
+ if (first_nonopt > optind)
+ first_nonopt = optind;
+
+ if (ordering == PERMUTE)
+ {
+ /* If we have just processed some options following some non-options,
+ exchange them so that the options come first. */
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (last_nonopt != optind)
+ first_nonopt = optind;
+
+ /* Skip any additional non-options
+ and extend the range of non-options previously skipped. */
+
+ while (optind < argc && NONOPTION_P)
+ optind++;
+ last_nonopt = optind;
+ }
+
+ /* The special ARGV-element `--' means premature end of options.
+ Skip it like a null option,
+ then exchange with previous non-options as if it were an option,
+ then skip everything else like a non-option. */
+
+ if (optind != argc && !strcmp (argv[optind], "--"))
+ {
+ optind++;
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (first_nonopt == last_nonopt)
+ first_nonopt = optind;
+ last_nonopt = argc;
+
+ optind = argc;
+ }
+
+ /* If we have done all the ARGV-elements, stop the scan
+ and back over any non-options that we skipped and permuted. */
+
+ if (optind == argc)
+ {
+ /* Set the next-arg-index to point at the non-options
+ that we previously skipped, so the caller will digest them. */
+ if (first_nonopt != last_nonopt)
+ optind = first_nonopt;
+ return -1;
+ }
+
+ /* If we have come to a non-option and did not permute it,
+ either stop the scan or describe it to the caller and pass it by. */
+
+ if (NONOPTION_P)
+ {
+ if (ordering == REQUIRE_ORDER)
+ return -1;
+ optarg = argv[optind++];
+ return 1;
+ }
+
+ /* We have found another option-ARGV-element.
+ Skip the initial punctuation. */
+
+ nextchar = (argv[optind] + 1
+ + (longopts != NULL && argv[optind][1] == '-'));
+ }
+
+ /* Decode the current option-ARGV-element. */
+
+ /* Check whether the ARGV-element is a long option.
+
+ If long_only and the ARGV-element has the form "-f", where f is
+ a valid short option, don't consider it an abbreviated form of
+ a long option that starts with f. Otherwise there would be no
+ way to give the -f short option.
+
+ On the other hand, if there's a long option "fubar" and
+ the ARGV-element is "-fu", do consider that an abbreviation of
+ the long option, just like "--fu", and not "-f" with arg "u".
+
+ This distinction seems to be the most useful approach. */
+
+ if (longopts != NULL
+ && (argv[optind][1] == '-'
+ || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = -1;
+ int option_index;
+
+ for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, nextchar, nameend - nextchar))
+ {
+ if ((unsigned int) (nameend - nextchar)
+ == (unsigned int) strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+ if (opterr)
+ fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[optind]);
+ nextchar += strlen (nextchar);
+ optind++;
+ optopt = 0;
+ return '?';
+ }
+
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ optind++;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ optarg = nameend + 1;
+ else
+ {
+ if (opterr)
+ if (argv[optind - 1][1] == '-')
+ /* --option */
+ fprintf (stderr,
+ _("%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+ else
+ /* +option or -option */
+ fprintf (stderr,
+ _("%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[optind - 1][0], pfound->name);
+
+ nextchar += strlen (nextchar);
+
+ optopt = pfound->val;
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (opterr)
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+ nextchar += strlen (nextchar);
+ optopt = pfound->val;
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen (nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+
+ /* Can't find it as a long option. If this is not getopt_long_only,
+ or the option starts with '--' or is not a valid short
+ option, then it's an error.
+ Otherwise interpret it as a short option. */
+ if (!long_only || argv[optind][1] == '-'
+ || my_index (optstring, *nextchar) == NULL)
+ {
+ if (opterr)
+ {
+ if (argv[optind][1] == '-')
+ /* --option */
+ fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
+ argv[0], nextchar);
+ else
+ /* +option or -option */
+ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[optind][0], nextchar);
+ }
+ nextchar = (char *) "";
+ optind++;
+ optopt = 0;
+ return '?';
+ }
+ }
+
+ /* Look at and handle the next short option-character. */
+
+ {
+ char c = *nextchar++;
+ char *temp = my_index (optstring, c);
+
+ /* Increment `optind' when we start to process its last character. */
+ if (*nextchar == '\0')
+ ++optind;
+
+ if (temp == NULL || c == ':')
+ {
+ if (opterr)
+ {
+ if (posixly_correct)
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, _("%s: illegal option -- %c\n"),
+ argv[0], c);
+ else
+ fprintf (stderr, _("%s: invalid option -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ return '?';
+ }
+ /* Convenience. Treat POSIX -W foo same as long option --foo */
+ if (temp[0] == 'W' && temp[1] == ';')
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = 0;
+ int option_index;
+
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (opterr)
+ {
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ return c;
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+
+ /* optarg is now the argument, see if it's in the
+ table of longopts. */
+
+ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, nextchar, nameend - nextchar))
+ {
+ if ((unsigned int) (nameend - nextchar) == strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+ if (ambig && !exact)
+ {
+ if (opterr)
+ fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[optind]);
+ nextchar += strlen (nextchar);
+ optind++;
+ return '?';
+ }
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ optarg = nameend + 1;
+ else
+ {
+ if (opterr)
+ fprintf (stderr, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+
+ nextchar += strlen (nextchar);
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (opterr)
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+ nextchar += strlen (nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen (nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+ nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
+ }
+ if (temp[1] == ':')
+ {
+ if (temp[2] == ':')
+ {
+ /* This is an option that accepts an argument optionally. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ optind++;
+ }
+ else
+ optarg = NULL;
+ nextchar = NULL;
+ }
+ else
+ {
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (opterr)
+ {
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr,
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+ nextchar = NULL;
+ }
+ }
+ return c;
+ }
+}
+
+int
+getopt (argc, argv, optstring)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+{
+ return _getopt_internal (argc, argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0);
+}
+
+#endif /* Not ELIDE_CODE. */
+
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+ the above definition of `getopt'. */
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+
+ c = getopt (argc, argv, "abc:d:0123456789");
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value `%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/lib/getopt.h b/lib/getopt.h
new file mode 100644
index 0000000..c4adc30
--- /dev/null
+++ b/lib/getopt.h
@@ -0,0 +1,133 @@
+/* Declarations for getopt.
+ Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef _GETOPT_H
+#define _GETOPT_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern int optopt;
+
+/* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+struct option
+{
+#if defined (__STDC__) && __STDC__
+ const char *name;
+#else
+ char *name;
+#endif
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'. */
+
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+#if defined (__STDC__) && __STDC__
+#ifdef __GNU_LIBRARY__
+/* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+ errors, only prototype getopt for the GNU C library. */
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+#else /* not __GNU_LIBRARY__ */
+extern int getopt ();
+#endif /* __GNU_LIBRARY__ */
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+ const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind);
+
+/* Internal only. Users should not call this directly. */
+extern int _getopt_internal (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind,
+ int long_only);
+#else /* not __STDC__ */
+extern int getopt ();
+extern int getopt_long ();
+extern int getopt_long_only ();
+
+extern int _getopt_internal ();
+#endif /* __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* getopt.h */
diff --git a/lib/getopt1.c b/lib/getopt1.c
new file mode 100644
index 0000000..4ce1065
--- /dev/null
+++ b/lib/getopt1.c
@@ -0,0 +1,190 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+ Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
+ Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "getopt.h"
+
+#if !defined __STDC__ || !__STDC__
+/* This is a separate conditional since some stdc systems
+ reject `defined (const)'. */
+#ifndef const
+#define const
+#endif
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. This code is part of the GNU C
+ Library, but also included in many other GNU distributions. Compiling
+ and linking in this code is a waste when using the GNU C library
+ (especially if it is a shared library). Rather than having every GNU
+ program understand `configure --with-gnu-libc' and omit the object files,
+ it is simpler to just do this in the source for each such file. */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
+#include <gnu-versions.h>
+#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+#include <stdlib.h>
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+int
+getopt_long (argc, argv, options, long_options, opt_index)
+ int argc;
+ char *const *argv;
+ const char *options;
+ const struct option *long_options;
+ int *opt_index;
+{
+ return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
+}
+
+/* Like getopt_long, but '-' as well as '--' can indicate a long option.
+ If an option that starts with '-' (not '--') doesn't match a long option,
+ but does match a short option, it is parsed as a short option
+ instead. */
+
+int
+getopt_long_only (argc, argv, options, long_options, opt_index)
+ int argc;
+ char *const *argv;
+ const char *options;
+ const struct option *long_options;
+ int *opt_index;
+{
+ return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
+}
+
+
+#endif /* Not ELIDE_CODE. */
+
+#ifdef TEST
+
+#include <stdio.h>
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+ int option_index = 0;
+ static struct option long_options[] =
+ {
+ {"add", 1, 0, 0},
+ {"append", 0, 0, 0},
+ {"delete", 1, 0, 0},
+ {"verbose", 0, 0, 0},
+ {"create", 0, 0, 0},
+ {"file", 1, 0, 0},
+ {0, 0, 0, 0}
+ };
+
+ c = getopt_long (argc, argv, "abc:d:0123456789",
+ long_options, &option_index);
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case 0:
+ printf ("option %s", long_options[option_index].name);
+ if (optarg)
+ printf (" with arg %s", optarg);
+ printf ("\n");
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value `%s'\n", optarg);
+ break;
+
+ case 'd':
+ printf ("option d with value `%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/lib/hash.c b/lib/hash.c
new file mode 100644
index 0000000..dcf223c
--- /dev/null
+++ b/lib/hash.c
@@ -0,0 +1,385 @@
+/* hash - implement simple hashing table with string based keys.
+ Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, October 1994.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#else
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# endif
+#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#if HAVE_OBSTACK
+# include <obstack.h>
+#else
+# include "obstack.h"
+#endif
+
+#if HAVE_VALUES_H
+# include <values.h>
+#endif
+
+#include "hash.h"
+
+#define obstack_chunk_alloc xmalloc
+#define obstack_chunk_free free
+
+#ifndef BITSPERBYTE
+# define BITSPERBYTE 8
+#endif
+
+#ifndef LONGBITS
+# define LONGBITS (sizeof (long) * BITSPERBYTE)
+#endif
+
+#ifndef bcopy
+# define bcopy(S, D, N) memcpy ((D), (S), (N))
+#endif
+
+void *xmalloc PARAMS ((size_t __n));
+
+typedef struct hash_entry
+{
+ unsigned long used;
+ const char *key;
+ void *data;
+ struct hash_entry *next;
+}
+hash_entry;
+
+/* Prototypes for local functions. */
+static void insert_entry_2 PARAMS ((hash_table *htab, const char *key,
+ unsigned long hval, size_t idx,
+ void *data));
+static size_t lookup PARAMS ((hash_table *htab, const char *key, size_t keylen,
+ unsigned long hval));
+static size_t lookup_2 PARAMS ((hash_table *htab, const char *key,
+ unsigned long hval));
+static unsigned long compute_hashval PARAMS ((const char *key, size_t keylen));
+static int is_prime PARAMS ((unsigned long candidate));
+
+
+int
+init_hash (htab, init_size)
+ hash_table *htab;
+ unsigned long init_size;
+{
+ /* We need the size to be a prime. */
+ init_size = next_prime (init_size);
+
+ /* Initialize the data structure. */
+ htab->size = init_size;
+ htab->filled = 0;
+ htab->first = NULL;
+ htab->table = (void *) xmalloc ((init_size + 1) * sizeof (hash_entry));
+ if (htab->table == NULL)
+ return -1;
+
+ memset (htab->table, '\0', (init_size + 1) * sizeof (hash_entry));
+ obstack_init (&htab->mem_pool);
+
+ return 0;
+}
+
+
+int
+delete_hash (htab)
+ hash_table *htab;
+{
+ free (htab->table);
+ obstack_free (&htab->mem_pool, NULL);
+ return 0;
+}
+
+
+int
+insert_entry (htab, key, keylen, data)
+ hash_table *htab;
+ const char *key;
+ size_t keylen;
+ void *data;
+{
+ unsigned long hval = compute_hashval (key, keylen);
+ hash_entry *table = (hash_entry *) htab->table;
+ size_t idx = lookup (htab, key, keylen, hval);
+
+ if (table[idx].used)
+ /* We don't want to overwrite the old value. */
+ return -1;
+ else
+ {
+ /* An empty bucket has been found. */
+ insert_entry_2 (htab, obstack_copy0 (&htab->mem_pool, key, keylen),
+ hval, idx, data);
+ return 0;
+ }
+}
+
+static void
+insert_entry_2 (htab, key, hval, idx, data)
+ hash_table *htab;
+ const char *key;
+ unsigned long hval;
+ size_t idx;
+ void *data;
+{
+ hash_entry *table = (hash_entry *) htab->table;
+
+ table[idx].used = hval;
+ table[idx].key = key;
+ table[idx].data = data;
+
+ /* List the new value in the list. */
+ if ((hash_entry *) htab->first == NULL)
+ {
+ table[idx].next = &table[idx];
+ *(hash_entry **) &htab->first = &table[idx];
+ }
+ else
+ {
+ table[idx].next = ((hash_entry *) htab->first)->next;
+ ((hash_entry *) htab->first)->next = &table[idx];
+ *(hash_entry **) &htab->first = &table[idx];
+ }
+
+ ++htab->filled;
+ if (100 * htab->filled > 90 * htab->size)
+ {
+ /* Table is filled more than 90%. Resize the table. */
+ unsigned long old_size = htab->size;
+
+ htab->size = next_prime (htab->size * 2);
+ htab->filled = 0;
+ htab->first = NULL;
+ htab->table = (void *) xmalloc ((1 + htab->size)
+ * sizeof (hash_entry));
+ memset (htab->table, '\0', (1 + htab->size) * sizeof (hash_entry));
+
+ for (idx = 1; idx <= old_size; ++idx)
+ if (table[idx].used)
+ insert_entry_2 (htab, table[idx].key, table[idx].used,
+ lookup_2 (htab, table[idx].key, table[idx].used),
+ table[idx].data);
+
+ free (table);
+ }
+}
+
+
+int
+find_entry (htab, key, keylen, result)
+ hash_table *htab;
+ const char *key;
+ size_t keylen;
+ void **result;
+{
+ hash_entry *table = (hash_entry *) htab->table;
+ size_t idx = lookup (htab, key, keylen, compute_hashval (key, keylen));
+
+ if (table[idx].used == 0)
+ return -1;
+
+ *result = table[idx].data;
+ return 0;
+}
+
+
+int
+iterate_table (htab, ptr, key, data)
+ hash_table *htab;
+ void **ptr;
+ const void **key;
+ void **data;
+{
+ if (*ptr == NULL)
+ {
+ if (htab->first == NULL)
+ return -1;
+ *ptr = (void *) ((hash_entry *) htab->first)->next;
+ }
+ else
+ {
+ if (*ptr == htab->first)
+ return -1;
+ *ptr = (void *) (((hash_entry *) *ptr)->next);
+ }
+
+ *key = ((hash_entry *) *ptr)->key;
+ *data = ((hash_entry *) *ptr)->data;
+ return 0;
+}
+
+
+static size_t
+lookup (htab, key, keylen, hval)
+ hash_table *htab;
+ const char *key;
+ size_t keylen;
+ unsigned long hval;
+{
+ unsigned long hash;
+ size_t idx;
+ hash_entry *table = (hash_entry *) htab->table;
+
+ /* First hash function: simply take the modul but prevent zero. */
+ hash = 1 + hval % htab->size;
+
+ idx = hash;
+
+ if (table[idx].used)
+ {
+ if (table[idx].used == hval && table[idx].key[keylen] == '\0'
+ && strncmp (key, table[idx].key, keylen) == 0)
+ return idx;
+
+ /* Second hash function as suggested in [Knuth]. */
+ hash = 1 + hval % (htab->size - 2);
+
+ do
+ {
+ if (idx <= hash)
+ idx = htab->size + idx - hash;
+ else
+ idx -= hash;
+
+ /* If entry is found use it. */
+ if (table[idx].used == hval && table[idx].key[keylen] == '\0'
+ && strncmp (key, table[idx].key, keylen) == 0)
+ return idx;
+ }
+ while (table[idx].used);
+ }
+ return idx;
+}
+
+
+/* References:
+ [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
+ [Knuth] The Art of Computer Programming, part3 (6.4) */
+
+static size_t
+lookup_2 (htab, key, hval)
+ hash_table *htab;
+ const char *key;
+ unsigned long hval;
+{
+ unsigned long hash;
+ size_t idx;
+ hash_entry *table = (hash_entry *) htab->table;
+
+ /* First hash function: simply take the modul but prevent zero. */
+ hash = 1 + hval % htab->size;
+
+ idx = hash;
+
+ if (table[idx].used)
+ {
+ if (table[idx].used == hval && strcmp (key, table[idx].key) == 0)
+ return idx;
+
+ /* Second hash function as suggested in [Knuth]. */
+ hash = 1 + hval % (htab->size - 2);
+
+ do
+ {
+ if (idx <= hash)
+ idx = htab->size + idx - hash;
+ else
+ idx -= hash;
+
+ /* If entry is found use it. */
+ if (table[idx].used == hval && strcmp (key, table[idx].key) == 0)
+ return idx;
+ }
+ while (table[idx].used);
+ }
+ return idx;
+}
+
+
+static unsigned long
+compute_hashval (key, keylen)
+ const char *key;
+ size_t keylen;
+{
+ size_t cnt;
+ unsigned long hval, g;
+
+ /* Compute the hash value for the given string. The algorithm
+ is taken from [Aho,Sethi,Ullman]. */
+ cnt = 0;
+ hval = keylen;
+ while (cnt < keylen)
+ {
+ hval <<= 4;
+ hval += key[cnt++];
+ g = hval & ((unsigned long) 0xf << (LONGBITS - 4));
+ if (g != 0)
+ {
+ hval ^= g >> (LONGBITS - 8);
+ hval ^= g;
+ }
+ }
+ return hval != 0 ? hval : ~((unsigned long) 0);
+}
+
+
+unsigned long
+next_prime (seed)
+ unsigned long seed;
+{
+ /* Make it definitely odd. */
+ seed |= 1;
+
+ while (!is_prime (seed))
+ seed += 2;
+
+ return seed;
+}
+
+
+static int
+is_prime (candidate)
+ unsigned long candidate;
+{
+ /* No even number and none less than 10 will be passed here. */
+ unsigned long divn = 3;
+ unsigned long sq = divn * divn;
+
+ while (sq < candidate && candidate % divn != 0)
+ {
+ ++divn;
+ sq += 4 * divn;
+ ++divn;
+ }
+
+ return candidate % divn != 0;
+}
diff --git a/lib/hash.h b/lib/hash.h
new file mode 100644
index 0000000..238d6ca
--- /dev/null
+++ b/lib/hash.h
@@ -0,0 +1,53 @@
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 59 Temple Place
+ - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _HASH_H
+# define _HASH_H
+
+# include <obstack.h>
+
+typedef struct hash_table
+{
+ unsigned long size;
+ unsigned long filled;
+ void *first;
+ void *table;
+ struct obstack mem_pool;
+}
+hash_table;
+
+# ifndef PARAMS
+# if defined (__GNUC__) || __STDC__
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+# endif
+
+int init_hash PARAMS ((hash_table *htab, unsigned long init_size));
+int delete_hash PARAMS ((hash_table *htab));
+int insert_entry PARAMS ((hash_table *htab, const char *key, size_t keylen,
+ void *data));
+int find_entry PARAMS ((hash_table *htab, const char *key, size_t keylen,
+ void **result));
+
+int iterate_table PARAMS ((hash_table *htab, void **ptr,
+ const void **key, void **data));
+
+unsigned long next_prime PARAMS ((unsigned long seed));
+
+#endif /* not _HASH_H */
diff --git a/lib/memmove.c b/lib/memmove.c
new file mode 100644
index 0000000..4115aa3
--- /dev/null
+++ b/lib/memmove.c
@@ -0,0 +1,108 @@
+/* Copy memory to memory until the specified number of bytes
+ has been copied. Overlap is handled correctly.
+ Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Contributed by Torbjorn Granlund (tege@sics.se).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <string.h>
+#include <memcopy.h>
+#include <pagecopy.h>
+
+/* All this is so that bcopy.c can #include
+ this file after defining some things. */
+#ifndef a1
+#define a1 dest /* First arg is DEST. */
+#define a1const
+#define a2 src /* Second arg is SRC. */
+#define a2const const
+#undef memmove
+#endif
+#if !defined(RETURN) || !defined(rettype)
+#define RETURN(s) return (s) /* Return DEST. */
+#define rettype void *
+#endif
+
+
+rettype
+memmove (a1, a2, len)
+ a1const void *a1;
+ a2const void *a2;
+ size_t len;
+{
+ unsigned long int dstp = (long int) dest;
+ unsigned long int srcp = (long int) src;
+
+ /* This test makes the forward copying code be used whenever possible.
+ Reduces the working set. */
+ if (dstp - srcp >= len) /* *Unsigned* compare! */
+ {
+ /* Copy from the beginning to the end. */
+
+ /* If there not too few bytes to copy, use word copy. */
+ if (len >= OP_T_THRES)
+ {
+ /* Copy just a few bytes to make DSTP aligned. */
+ len -= (-dstp) % OPSIZ;
+ BYTE_COPY_FWD (dstp, srcp, (-dstp) % OPSIZ);
+
+ /* Copy whole pages from SRCP to DSTP by virtual address
+ manipulation, as much as possible. */
+
+ PAGE_COPY_FWD_MAYBE (dstp, srcp, len, len);
+
+ /* Copy from SRCP to DSTP taking advantage of the known
+ alignment of DSTP. Number of bytes remaining is put
+ in the third argument, i.e. in LEN. This number may
+ vary from machine to machine. */
+
+ WORD_COPY_FWD (dstp, srcp, len, len);
+
+ /* Fall out and copy the tail. */
+ }
+
+ /* There are just a few bytes to copy. Use byte memory operations. */
+ BYTE_COPY_FWD (dstp, srcp, len);
+ }
+ else
+ {
+ /* Copy from the end to the beginning. */
+ srcp += len;
+ dstp += len;
+
+ /* If there not too few bytes to copy, use word copy. */
+ if (len >= OP_T_THRES)
+ {
+ /* Copy just a few bytes to make DSTP aligned. */
+ len -= dstp % OPSIZ;
+ BYTE_COPY_BWD (dstp, srcp, dstp % OPSIZ);
+
+ /* Copy from SRCP to DSTP taking advantage of the known
+ alignment of DSTP. Number of bytes remaining is put
+ in the third argument, i.e. in LEN. This number may
+ vary from machine to machine. */
+
+ WORD_COPY_BWD (dstp, srcp, len, len);
+
+ /* Fall out and copy the tail. */
+ }
+
+ /* There are just a few bytes to copy. Use byte memory operations. */
+ BYTE_COPY_BWD (dstp, srcp, len);
+ }
+
+ RETURN (dest);
+}
diff --git a/lib/memset.c b/lib/memset.c
new file mode 100644
index 0000000..239dc21
--- /dev/null
+++ b/lib/memset.c
@@ -0,0 +1,90 @@
+/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <string.h>
+#include <memcopy.h>
+
+#undef memset
+
+void *
+memset (dstpp, c, len)
+ void *dstpp;
+ int c;
+ size_t len;
+{
+ long int dstp = (long int) dstpp;
+
+ if (len >= 8)
+ {
+ size_t xlen;
+ op_t cccc;
+
+ cccc = (unsigned char) c;
+ cccc |= cccc << 8;
+ cccc |= cccc << 16;
+ if (OPSIZ > 4)
+ /* Do the shift in two steps to avoid warning if long has 32 bits. */
+ cccc |= (cccc << 16) << 16;
+
+ /* There are at least some bytes to set.
+ No need to test for LEN == 0 in this alignment loop. */
+ while (dstp % OPSIZ != 0)
+ {
+ ((byte *) dstp)[0] = c;
+ dstp += 1;
+ len -= 1;
+ }
+
+ /* Write 8 `op_t' per iteration until less than 8 `op_t' remain. */
+ xlen = len / (OPSIZ * 8);
+ while (xlen > 0)
+ {
+ ((op_t *) dstp)[0] = cccc;
+ ((op_t *) dstp)[1] = cccc;
+ ((op_t *) dstp)[2] = cccc;
+ ((op_t *) dstp)[3] = cccc;
+ ((op_t *) dstp)[4] = cccc;
+ ((op_t *) dstp)[5] = cccc;
+ ((op_t *) dstp)[6] = cccc;
+ ((op_t *) dstp)[7] = cccc;
+ dstp += 8 * OPSIZ;
+ xlen -= 1;
+ }
+ len %= OPSIZ * 8;
+
+ /* Write 1 `op_t' per iteration until less than OPSIZ bytes remain. */
+ xlen = len / OPSIZ;
+ while (xlen > 0)
+ {
+ ((op_t *) dstp)[0] = cccc;
+ dstp += OPSIZ;
+ xlen -= 1;
+ }
+ len %= OPSIZ;
+ }
+
+ /* Write the last few bytes. */
+ while (len > 0)
+ {
+ ((byte *) dstp)[0] = c;
+ dstp += 1;
+ len -= 1;
+ }
+
+ return dstpp;
+}
diff --git a/lib/obstack.c b/lib/obstack.c
new file mode 100644
index 0000000..e5b5d4f
--- /dev/null
+++ b/lib/obstack.c
@@ -0,0 +1,593 @@
+/* obstack.c - subroutines used implicitly by object stack macros
+ Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "obstack.h"
+
+/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
+ incremented whenever callers compiled using an old obstack.h can no
+ longer properly call the functions in this obstack.c. */
+#define OBSTACK_INTERFACE_VERSION 1
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself, and the installed library
+ supports the same library interface we do. This code is part of the GNU
+ C Library, but also included in many other GNU distributions. Compiling
+ and linking in this code is a waste when using the GNU C library
+ (especially if it is a shared library). Rather than having every GNU
+ program understand `configure --with-gnu-libc' and omit the object
+ files, it is simpler to just do this in the source for each such file. */
+
+#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
+#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
+#include <gnu-versions.h>
+#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+
+#ifndef ELIDE_CODE
+
+
+#if defined (__STDC__) && __STDC__
+#define POINTER void *
+#else
+#define POINTER char *
+#endif
+
+/* Determine default alignment. */
+struct fooalign {char x; double d;};
+#define DEFAULT_ALIGNMENT \
+ ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
+/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
+ But in fact it might be less smart and round addresses to as much as
+ DEFAULT_ROUNDING. So we prepare for it to do that. */
+union fooround {long x; double d;};
+#define DEFAULT_ROUNDING (sizeof (union fooround))
+
+/* When we copy a long block of data, this is the unit to do it with.
+ On some machines, copying successive ints does not work;
+ in such a case, redefine COPYING_UNIT to `long' (if that works)
+ or `char' as a last resort. */
+#ifndef COPYING_UNIT
+#define COPYING_UNIT int
+#endif
+
+
+/* The functions allocating more room by calling `obstack_chunk_alloc'
+ jump to the handler pointed to by `obstack_alloc_failed_handler'.
+ This variable by default points to the internal function
+ `print_and_abort'. */
+#if defined (__STDC__) && __STDC__
+static void print_and_abort (void);
+void (*obstack_alloc_failed_handler) (void) = print_and_abort;
+#else
+static void print_and_abort ();
+void (*obstack_alloc_failed_handler) () = print_and_abort;
+#endif
+
+/* Exit value used when `print_and_abort' is used. */
+#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+int obstack_exit_failure = EXIT_FAILURE;
+
+/* The non-GNU-C macros copy the obstack into this global variable
+ to avoid multiple evaluation. */
+
+struct obstack *_obstack;
+
+/* Define a macro that either calls functions with the traditional malloc/free
+ calling interface, or calls functions with the mmalloc/mfree interface
+ (that adds an extra first argument), based on the state of use_extra_arg.
+ For free, do not use ?:, since some compilers, like the MIPS compilers,
+ do not allow (expr) ? void : void. */
+
+#if defined (__STDC__) && __STDC__
+#define CALL_CHUNKFUN(h, size) \
+ (((h) -> use_extra_arg) \
+ ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
+ : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
+
+#define CALL_FREEFUN(h, old_chunk) \
+ do { \
+ if ((h) -> use_extra_arg) \
+ (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
+ else \
+ (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
+ } while (0)
+#else
+#define CALL_CHUNKFUN(h, size) \
+ (((h) -> use_extra_arg) \
+ ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
+ : (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
+
+#define CALL_FREEFUN(h, old_chunk) \
+ do { \
+ if ((h) -> use_extra_arg) \
+ (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
+ else \
+ (*(void (*) ()) (h)->freefun) ((old_chunk)); \
+ } while (0)
+#endif
+
+
+/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
+ Objects start on multiples of ALIGNMENT (0 means use default).
+ CHUNKFUN is the function to use to allocate chunks,
+ and FREEFUN the function to free them.
+
+ Return nonzero if successful, zero if out of memory.
+ To recover from an out of memory error,
+ free up some memory, then call this again. */
+
+int
+_obstack_begin (h, size, alignment, chunkfun, freefun)
+ struct obstack *h;
+ int size;
+ int alignment;
+#if defined (__STDC__) && __STDC__
+ POINTER (*chunkfun) (long);
+ void (*freefun) (void *);
+#else
+ POINTER (*chunkfun) ();
+ void (*freefun) ();
+#endif
+{
+ register struct _obstack_chunk *chunk; /* points to new chunk */
+
+ if (alignment == 0)
+ alignment = (int) DEFAULT_ALIGNMENT;
+ if (size == 0)
+ /* Default size is what GNU malloc can fit in a 4096-byte block. */
+ {
+ /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
+ Use the values for range checking, because if range checking is off,
+ the extra bytes won't be missed terribly, but if range checking is on
+ and we used a larger request, a whole extra 4096 bytes would be
+ allocated.
+
+ These number are irrelevant to the new GNU malloc. I suspect it is
+ less sensitive to the size of the request. */
+ int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
+ + 4 + DEFAULT_ROUNDING - 1)
+ & ~(DEFAULT_ROUNDING - 1));
+ size = 4096 - extra;
+ }
+
+#if defined (__STDC__) && __STDC__
+ h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
+ h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
+#else
+ h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
+ h->freefun = freefun;
+#endif
+ h->chunk_size = size;
+ h->alignment_mask = alignment - 1;
+ h->use_extra_arg = 0;
+
+ chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
+ if (!chunk)
+ (*obstack_alloc_failed_handler) ();
+ h->next_free = h->object_base = chunk->contents;
+ h->chunk_limit = chunk->limit
+ = (char *) chunk + h->chunk_size;
+ chunk->prev = 0;
+ /* The initial chunk now contains no empty object. */
+ h->maybe_empty_object = 0;
+ h->alloc_failed = 0;
+ return 1;
+}
+
+int
+_obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
+ struct obstack *h;
+ int size;
+ int alignment;
+#if defined (__STDC__) && __STDC__
+ POINTER (*chunkfun) (POINTER, long);
+ void (*freefun) (POINTER, POINTER);
+#else
+ POINTER (*chunkfun) ();
+ void (*freefun) ();
+#endif
+ POINTER arg;
+{
+ register struct _obstack_chunk *chunk; /* points to new chunk */
+
+ if (alignment == 0)
+ alignment = (int) DEFAULT_ALIGNMENT;
+ if (size == 0)
+ /* Default size is what GNU malloc can fit in a 4096-byte block. */
+ {
+ /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
+ Use the values for range checking, because if range checking is off,
+ the extra bytes won't be missed terribly, but if range checking is on
+ and we used a larger request, a whole extra 4096 bytes would be
+ allocated.
+
+ These number are irrelevant to the new GNU malloc. I suspect it is
+ less sensitive to the size of the request. */
+ int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
+ + 4 + DEFAULT_ROUNDING - 1)
+ & ~(DEFAULT_ROUNDING - 1));
+ size = 4096 - extra;
+ }
+
+#if defined(__STDC__) && __STDC__
+ h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
+ h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
+#else
+ h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
+ h->freefun = freefun;
+#endif
+ h->chunk_size = size;
+ h->alignment_mask = alignment - 1;
+ h->extra_arg = arg;
+ h->use_extra_arg = 1;
+
+ chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
+ if (!chunk)
+ (*obstack_alloc_failed_handler) ();
+ h->next_free = h->object_base = chunk->contents;
+ h->chunk_limit = chunk->limit
+ = (char *) chunk + h->chunk_size;
+ chunk->prev = 0;
+ /* The initial chunk now contains no empty object. */
+ h->maybe_empty_object = 0;
+ h->alloc_failed = 0;
+ return 1;
+}
+
+/* Allocate a new current chunk for the obstack *H
+ on the assumption that LENGTH bytes need to be added
+ to the current object, or a new object of length LENGTH allocated.
+ Copies any partial object from the end of the old chunk
+ to the beginning of the new one. */
+
+void
+_obstack_newchunk (h, length)
+ struct obstack *h;
+ int length;
+{
+ register struct _obstack_chunk *old_chunk = h->chunk;
+ register struct _obstack_chunk *new_chunk;
+ register long new_size;
+ register long obj_size = h->next_free - h->object_base;
+ register long i;
+ long already;
+
+ /* Compute size for new chunk. */
+ new_size = (obj_size + length) + (obj_size >> 3) + 100;
+ if (new_size < h->chunk_size)
+ new_size = h->chunk_size;
+
+ /* Allocate and initialize the new chunk. */
+ new_chunk = CALL_CHUNKFUN (h, new_size);
+ if (!new_chunk)
+ (*obstack_alloc_failed_handler) ();
+ h->chunk = new_chunk;
+ new_chunk->prev = old_chunk;
+ new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
+
+ /* Move the existing object to the new chunk.
+ Word at a time is fast and is safe if the object
+ is sufficiently aligned. */
+ if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
+ {
+ for (i = obj_size / sizeof (COPYING_UNIT) - 1;
+ i >= 0; i--)
+ ((COPYING_UNIT *)new_chunk->contents)[i]
+ = ((COPYING_UNIT *)h->object_base)[i];
+ /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
+ but that can cross a page boundary on a machine
+ which does not do strict alignment for COPYING_UNITS. */
+ already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
+ }
+ else
+ already = 0;
+ /* Copy remaining bytes one by one. */
+ for (i = already; i < obj_size; i++)
+ new_chunk->contents[i] = h->object_base[i];
+
+ /* If the object just copied was the only data in OLD_CHUNK,
+ free that chunk and remove it from the chain.
+ But not if that chunk might contain an empty object. */
+ if (h->object_base == old_chunk->contents && ! h->maybe_empty_object)
+ {
+ new_chunk->prev = old_chunk->prev;
+ CALL_FREEFUN (h, old_chunk);
+ }
+
+ h->object_base = new_chunk->contents;
+ h->next_free = h->object_base + obj_size;
+ /* The new chunk certainly contains no empty object yet. */
+ h->maybe_empty_object = 0;
+}
+
+/* Return nonzero if object OBJ has been allocated from obstack H.
+ This is here for debugging.
+ If you use it in a program, you are probably losing. */
+
+#if defined (__STDC__) && __STDC__
+/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
+ obstack.h because it is just for debugging. */
+int _obstack_allocated_p (struct obstack *h, POINTER obj);
+#endif
+
+int
+_obstack_allocated_p (h, obj)
+ struct obstack *h;
+ POINTER obj;
+{
+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ register struct _obstack_chunk *plp; /* point to previous chunk if any */
+
+ lp = (h)->chunk;
+ /* We use >= rather than > since the object cannot be exactly at
+ the beginning of the chunk but might be an empty object exactly
+ at the end of an adjacent chunk. */
+ while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
+ {
+ plp = lp->prev;
+ lp = plp;
+ }
+ return lp != 0;
+}
+
+/* Free objects in obstack H, including OBJ and everything allocate
+ more recently than OBJ. If OBJ is zero, free everything in H. */
+
+#undef obstack_free
+
+/* This function has two names with identical definitions.
+ This is the first one, called from non-ANSI code. */
+
+void
+_obstack_free (h, obj)
+ struct obstack *h;
+ POINTER obj;
+{
+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ register struct _obstack_chunk *plp; /* point to previous chunk if any */
+
+ lp = h->chunk;
+ /* We use >= because there cannot be an object at the beginning of a chunk.
+ But there can be an empty object at that address
+ at the end of another chunk. */
+ while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
+ {
+ plp = lp->prev;
+ CALL_FREEFUN (h, lp);
+ lp = plp;
+ /* If we switch chunks, we can't tell whether the new current
+ chunk contains an empty object, so assume that it may. */
+ h->maybe_empty_object = 1;
+ }
+ if (lp)
+ {
+ h->object_base = h->next_free = (char *) (obj);
+ h->chunk_limit = lp->limit;
+ h->chunk = lp;
+ }
+ else if (obj != 0)
+ /* obj is not in any of the chunks! */
+ abort ();
+}
+
+/* This function is used from ANSI code. */
+
+void
+obstack_free (h, obj)
+ struct obstack *h;
+ POINTER obj;
+{
+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ register struct _obstack_chunk *plp; /* point to previous chunk if any */
+
+ lp = h->chunk;
+ /* We use >= because there cannot be an object at the beginning of a chunk.
+ But there can be an empty object at that address
+ at the end of another chunk. */
+ while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
+ {
+ plp = lp->prev;
+ CALL_FREEFUN (h, lp);
+ lp = plp;
+ /* If we switch chunks, we can't tell whether the new current
+ chunk contains an empty object, so assume that it may. */
+ h->maybe_empty_object = 1;
+ }
+ if (lp)
+ {
+ h->object_base = h->next_free = (char *) (obj);
+ h->chunk_limit = lp->limit;
+ h->chunk = lp;
+ }
+ else if (obj != 0)
+ /* obj is not in any of the chunks! */
+ abort ();
+}
+
+int
+_obstack_memory_used (h)
+ struct obstack *h;
+{
+ register struct _obstack_chunk* lp;
+ register int nbytes = 0;
+
+ for (lp = h->chunk; lp != 0; lp = lp->prev)
+ {
+ nbytes += lp->limit - (char *) lp;
+ }
+ return nbytes;
+}
+
+/* Define the error handler. */
+#ifndef _
+# ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# ifndef _
+# define _(Str) gettext (Str)
+# endif
+# else
+# define _(Str) (Str)
+# endif
+#endif
+
+static void
+print_and_abort ()
+{
+ fputs (_("memory exhausted\n"), stderr);
+ exit (obstack_exit_failure);
+}
+
+#if 0
+/* These are now turned off because the applications do not use it
+ and it uses bcopy via obstack_grow, which causes trouble on sysV. */
+
+/* Now define the functional versions of the obstack macros.
+ Define them to simply use the corresponding macros to do the job. */
+
+#if defined (__STDC__) && __STDC__
+/* These function definitions do not work with non-ANSI preprocessors;
+ they won't pass through the macro names in parentheses. */
+
+/* The function names appear in parentheses in order to prevent
+ the macro-definitions of the names from being expanded there. */
+
+POINTER (obstack_base) (obstack)
+ struct obstack *obstack;
+{
+ return obstack_base (obstack);
+}
+
+POINTER (obstack_next_free) (obstack)
+ struct obstack *obstack;
+{
+ return obstack_next_free (obstack);
+}
+
+int (obstack_object_size) (obstack)
+ struct obstack *obstack;
+{
+ return obstack_object_size (obstack);
+}
+
+int (obstack_room) (obstack)
+ struct obstack *obstack;
+{
+ return obstack_room (obstack);
+}
+
+int (obstack_make_room) (obstack, length)
+ struct obstack *obstack;
+ int length;
+{
+ return obstack_make_room (obstack, length);
+}
+
+void (obstack_grow) (obstack, pointer, length)
+ struct obstack *obstack;
+ POINTER pointer;
+ int length;
+{
+ obstack_grow (obstack, pointer, length);
+}
+
+void (obstack_grow0) (obstack, pointer, length)
+ struct obstack *obstack;
+ POINTER pointer;
+ int length;
+{
+ obstack_grow0 (obstack, pointer, length);
+}
+
+void (obstack_1grow) (obstack, character)
+ struct obstack *obstack;
+ int character;
+{
+ obstack_1grow (obstack, character);
+}
+
+void (obstack_blank) (obstack, length)
+ struct obstack *obstack;
+ int length;
+{
+ obstack_blank (obstack, length);
+}
+
+void (obstack_1grow_fast) (obstack, character)
+ struct obstack *obstack;
+ int character;
+{
+ obstack_1grow_fast (obstack, character);
+}
+
+void (obstack_blank_fast) (obstack, length)
+ struct obstack *obstack;
+ int length;
+{
+ obstack_blank_fast (obstack, length);
+}
+
+POINTER (obstack_finish) (obstack)
+ struct obstack *obstack;
+{
+ return obstack_finish (obstack);
+}
+
+POINTER (obstack_alloc) (obstack, length)
+ struct obstack *obstack;
+ int length;
+{
+ return obstack_alloc (obstack, length);
+}
+
+POINTER (obstack_copy) (obstack, pointer, length)
+ struct obstack *obstack;
+ POINTER pointer;
+ int length;
+{
+ return obstack_copy (obstack, pointer, length);
+}
+
+POINTER (obstack_copy0) (obstack, pointer, length)
+ struct obstack *obstack;
+ POINTER pointer;
+ int length;
+{
+ return obstack_copy0 (obstack, pointer, length);
+}
+
+#endif /* __STDC__ */
+
+#endif /* 0 */
+
+#endif /* !ELIDE_CODE */
diff --git a/lib/obstack.h b/lib/obstack.h
new file mode 100644
index 0000000..144998c
--- /dev/null
+++ b/lib/obstack.h
@@ -0,0 +1,593 @@
+/* obstack.h - object stack macros
+ Copyright (C) 1988,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
+
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* Summary:
+
+All the apparent functions defined here are macros. The idea
+is that you would use these pre-tested macros to solve a
+very specific set of problems, and they would run fast.
+Caution: no side-effects in arguments please!! They may be
+evaluated MANY times!!
+
+These macros operate a stack of objects. Each object starts life
+small, and may grow to maturity. (Consider building a word syllable
+by syllable.) An object can move while it is growing. Once it has
+been "finished" it never changes address again. So the "top of the
+stack" is typically an immature growing object, while the rest of the
+stack is of mature, fixed size and fixed address objects.
+
+These routines grab large chunks of memory, using a function you
+supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
+by calling `obstack_chunk_free'. You must define them and declare
+them before using any obstack macros.
+
+Each independent stack is represented by a `struct obstack'.
+Each of the obstack macros expects a pointer to such a structure
+as the first argument.
+
+One motivation for this package is the problem of growing char strings
+in symbol tables. Unless you are "fascist pig with a read-only mind"
+--Gosper's immortal quote from HAKMEM item 154, out of context--you
+would not like to put any arbitrary upper limit on the length of your
+symbols.
+
+In practice this often means you will build many short symbols and a
+few long symbols. At the time you are reading a symbol you don't know
+how long it is. One traditional method is to read a symbol into a
+buffer, realloc()ating the buffer every time you try to read a symbol
+that is longer than the buffer. This is beaut, but you still will
+want to copy the symbol from the buffer to a more permanent
+symbol-table entry say about half the time.
+
+With obstacks, you can work differently. Use one obstack for all symbol
+names. As you read a symbol, grow the name in the obstack gradually.
+When the name is complete, finalize it. Then, if the symbol exists already,
+free the newly read name.
+
+The way we do this is to take a large chunk, allocating memory from
+low addresses. When you want to build a symbol in the chunk you just
+add chars above the current "high water mark" in the chunk. When you
+have finished adding chars, because you got to the end of the symbol,
+you know how long the chars are, and you can create a new object.
+Mostly the chars will not burst over the highest address of the chunk,
+because you would typically expect a chunk to be (say) 100 times as
+long as an average object.
+
+In case that isn't clear, when we have enough chars to make up
+the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
+so we just point to it where it lies. No moving of chars is
+needed and this is the second win: potentially long strings need
+never be explicitly shuffled. Once an object is formed, it does not
+change its address during its lifetime.
+
+When the chars burst over a chunk boundary, we allocate a larger
+chunk, and then copy the partly formed object from the end of the old
+chunk to the beginning of the new larger chunk. We then carry on
+accreting characters to the end of the object as we normally would.
+
+A special macro is provided to add a single char at a time to a
+growing object. This allows the use of register variables, which
+break the ordinary 'growth' macro.
+
+Summary:
+ We allocate large chunks.
+ We carve out one object at a time from the current chunk.
+ Once carved, an object never moves.
+ We are free to append data of any size to the currently
+ growing object.
+ Exactly one object is growing in an obstack at any one time.
+ You can run one obstack per control block.
+ You may have as many control blocks as you dare.
+ Because of the way we do it, you can `unwind' an obstack
+ back to a previous state. (You may remove objects much
+ as you would with a stack.)
+*/
+
+
+/* Don't do the contents of this file more than once. */
+
+#ifndef _OBSTACK_H
+#define _OBSTACK_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* We use subtraction of (char *) 0 instead of casting to int
+ because on word-addressable machines a simple cast to int
+ may ignore the byte-within-word field of the pointer. */
+
+#ifndef __PTR_TO_INT
+# define __PTR_TO_INT(P) ((P) - (char *) 0)
+#endif
+
+#ifndef __INT_TO_PTR
+# define __INT_TO_PTR(P) ((P) + (char *) 0)
+#endif
+
+/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
+ defined, as with GNU C, use that; that way we don't pollute the
+ namespace with <stddef.h>'s symbols. Otherwise, if <stddef.h> is
+ available, include it and use ptrdiff_t. In traditional C, long is
+ the best that we can do. */
+
+#ifdef __PTRDIFF_TYPE__
+# define PTR_INT_TYPE __PTRDIFF_TYPE__
+#else
+# ifdef HAVE_STDDEF_H
+# include <stddef.h>
+# define PTR_INT_TYPE ptrdiff_t
+# else
+# define PTR_INT_TYPE long
+# endif
+#endif
+
+#if defined _LIBC || defined HAVE_STRING_H
+# include <string.h>
+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
+#else
+# ifdef memcpy
+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
+# else
+# define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
+# endif
+#endif
+
+struct _obstack_chunk /* Lives at front of each chunk. */
+{
+ char *limit; /* 1 past end of this chunk */
+ struct _obstack_chunk *prev; /* address of prior chunk or NULL */
+ char contents[4]; /* objects begin here */
+};
+
+struct obstack /* control current object in current chunk */
+{
+ long chunk_size; /* preferred size to allocate chunks in */
+ struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
+ char *object_base; /* address of object we are building */
+ char *next_free; /* where to add next char to current object */
+ char *chunk_limit; /* address of char after current chunk */
+ PTR_INT_TYPE temp; /* Temporary for some macros. */
+ int alignment_mask; /* Mask of alignment for each object. */
+#if defined __STDC__ && __STDC__
+ /* These prototypes vary based on `use_extra_arg', and we use
+ casts to the prototypeless function type in all assignments,
+ but having prototypes here quiets -Wstrict-prototypes. */
+ struct _obstack_chunk *(*chunkfun) (void *, long);
+ void (*freefun) (void *, struct _obstack_chunk *);
+ void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
+#else
+ struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
+ void (*freefun) (); /* User's function to free a chunk. */
+ char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
+#endif
+ unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
+ unsigned maybe_empty_object:1;/* There is a possibility that the current
+ chunk contains a zero-length object. This
+ prevents freeing the chunk if we allocate
+ a bigger chunk to replace it. */
+ unsigned alloc_failed:1; /* No longer used, as we now call the failed
+ handler on error, but retained for binary
+ compatibility. */
+};
+
+/* Declare the external functions we use; they are in obstack.c. */
+
+#if defined __STDC__ && __STDC__
+extern void _obstack_newchunk (struct obstack *, int);
+extern void _obstack_free (struct obstack *, void *);
+extern int _obstack_begin (struct obstack *, int, int,
+ void *(*) (long), void (*) (void *));
+extern int _obstack_begin_1 (struct obstack *, int, int,
+ void *(*) (void *, long),
+ void (*) (void *, void *), void *);
+extern int _obstack_memory_used (struct obstack *);
+#else
+extern void _obstack_newchunk ();
+extern void _obstack_free ();
+extern int _obstack_begin ();
+extern int _obstack_begin_1 ();
+extern int _obstack_memory_used ();
+#endif
+
+#if defined __STDC__ && __STDC__
+
+/* Do the function-declarations after the structs
+ but before defining the macros. */
+
+void obstack_init (struct obstack *obstack);
+
+void * obstack_alloc (struct obstack *obstack, int size);
+
+void * obstack_copy (struct obstack *obstack, void *address, int size);
+void * obstack_copy0 (struct obstack *obstack, void *address, int size);
+
+void obstack_free (struct obstack *obstack, void *block);
+
+void obstack_blank (struct obstack *obstack, int size);
+
+void obstack_grow (struct obstack *obstack, void *data, int size);
+void obstack_grow0 (struct obstack *obstack, void *data, int size);
+
+void obstack_1grow (struct obstack *obstack, int data_char);
+void obstack_ptr_grow (struct obstack *obstack, void *data);
+void obstack_int_grow (struct obstack *obstack, int data);
+
+void * obstack_finish (struct obstack *obstack);
+
+int obstack_object_size (struct obstack *obstack);
+
+int obstack_room (struct obstack *obstack);
+void obstack_make_room (struct obstack *obstack, int size);
+void obstack_1grow_fast (struct obstack *obstack, int data_char);
+void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
+void obstack_int_grow_fast (struct obstack *obstack, int data);
+void obstack_blank_fast (struct obstack *obstack, int size);
+
+void * obstack_base (struct obstack *obstack);
+void * obstack_next_free (struct obstack *obstack);
+int obstack_alignment_mask (struct obstack *obstack);
+int obstack_chunk_size (struct obstack *obstack);
+int obstack_memory_used (struct obstack *obstack);
+
+#endif /* __STDC__ */
+
+/* Non-ANSI C cannot really support alternative functions for these macros,
+ so we do not declare them. */
+
+/* Error handler called when `obstack_chunk_alloc' failed to allocate
+ more memory. This can be set to a user defined function. The
+ default action is to print a message and abort. */
+#if defined __STDC__ && __STDC__
+extern void (*obstack_alloc_failed_handler) (void);
+#else
+extern void (*obstack_alloc_failed_handler) ();
+#endif
+
+/* Exit value used when `print_and_abort' is used. */
+extern int obstack_exit_failure;
+
+/* Pointer to beginning of object being allocated or to be allocated next.
+ Note that this might not be the final address of the object
+ because a new chunk might be needed to hold the final size. */
+
+#define obstack_base(h) ((h)->object_base)
+
+/* Size for allocating ordinary chunks. */
+
+#define obstack_chunk_size(h) ((h)->chunk_size)
+
+/* Pointer to next byte not yet allocated in current chunk. */
+
+#define obstack_next_free(h) ((h)->next_free)
+
+/* Mask specifying low bits that should be clear in address of an object. */
+
+#define obstack_alignment_mask(h) ((h)->alignment_mask)
+
+/* To prevent prototype warnings provide complete argument list in
+ standard C version. */
+#if defined __STDC__ && __STDC__
+
+# define obstack_init(h) \
+ _obstack_begin ((h), 0, 0, \
+ (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
+
+# define obstack_begin(h, size) \
+ _obstack_begin ((h), (size), 0, \
+ (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
+
+# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+ _obstack_begin ((h), (size), (alignment), \
+ (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
+
+# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+ _obstack_begin_1 ((h), (size), (alignment), \
+ (void *(*) (void *, long)) (chunkfun), \
+ (void (*) (void *, void *)) (freefun), (arg))
+
+# define obstack_chunkfun(h, newchunkfun) \
+ ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
+
+# define obstack_freefun(h, newfreefun) \
+ ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
+
+#else
+
+# define obstack_init(h) \
+ _obstack_begin ((h), 0, 0, \
+ (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
+
+# define obstack_begin(h, size) \
+ _obstack_begin ((h), (size), 0, \
+ (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
+
+# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+ _obstack_begin ((h), (size), (alignment), \
+ (void *(*) ()) (chunkfun), (void (*) ()) (freefun))
+
+# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+ _obstack_begin_1 ((h), (size), (alignment), \
+ (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
+
+# define obstack_chunkfun(h, newchunkfun) \
+ ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
+
+# define obstack_freefun(h, newfreefun) \
+ ((h) -> freefun = (void (*)()) (newfreefun))
+
+#endif
+
+#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
+
+#define obstack_blank_fast(h,n) ((h)->next_free += (n))
+
+#define obstack_memory_used(h) _obstack_memory_used (h)
+
+#if defined __GNUC__ && defined __STDC__ && __STDC__
+/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
+ does not implement __extension__. But that compiler doesn't define
+ __GNUC_MINOR__. */
+# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+# define __extension__
+# endif
+
+/* For GNU C, if not -traditional,
+ we can define these macros to compute all args only once
+ without using a global variable.
+ Also, we can avoid using the `temp' slot, to make faster code. */
+
+# define obstack_object_size(OBSTACK) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ (unsigned) (__o->next_free - __o->object_base); })
+
+# define obstack_room(OBSTACK) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ (unsigned) (__o->chunk_limit - __o->next_free); })
+
+# define obstack_make_room(OBSTACK,length) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ int __len = (length); \
+ if (__o->chunk_limit - __o->next_free < __len) \
+ _obstack_newchunk (__o, __len); \
+ (void) 0; })
+
+# define obstack_empty_p(OBSTACK) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
+
+# define obstack_grow(OBSTACK,where,length) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ int __len = (length); \
+ if (__o->next_free + __len > __o->chunk_limit) \
+ _obstack_newchunk (__o, __len); \
+ _obstack_memcpy (__o->next_free, (char *) (where), __len); \
+ __o->next_free += __len; \
+ (void) 0; })
+
+# define obstack_grow0(OBSTACK,where,length) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ int __len = (length); \
+ if (__o->next_free + __len + 1 > __o->chunk_limit) \
+ _obstack_newchunk (__o, __len + 1); \
+ _obstack_memcpy (__o->next_free, (char *) (where), __len); \
+ __o->next_free += __len; \
+ *(__o->next_free)++ = 0; \
+ (void) 0; })
+
+# define obstack_1grow(OBSTACK,datum) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ if (__o->next_free + 1 > __o->chunk_limit) \
+ _obstack_newchunk (__o, 1); \
+ *(__o->next_free)++ = (datum); \
+ (void) 0; })
+
+/* These assume that the obstack alignment is good enough for pointers or ints,
+ and that the data added so far to the current object
+ shares that much alignment. */
+
+# define obstack_ptr_grow(OBSTACK,datum) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
+ _obstack_newchunk (__o, sizeof (void *)); \
+ *((void **)__o->next_free)++ = ((void *)datum); \
+ (void) 0; })
+
+# define obstack_int_grow(OBSTACK,datum) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ if (__o->next_free + sizeof (int) > __o->chunk_limit) \
+ _obstack_newchunk (__o, sizeof (int)); \
+ *((int *)__o->next_free)++ = ((int)datum); \
+ (void) 0; })
+
+# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
+# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+
+# define obstack_blank(OBSTACK,length) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ int __len = (length); \
+ if (__o->chunk_limit - __o->next_free < __len) \
+ _obstack_newchunk (__o, __len); \
+ __o->next_free += __len; \
+ (void) 0; })
+
+# define obstack_alloc(OBSTACK,length) \
+__extension__ \
+({ struct obstack *__h = (OBSTACK); \
+ obstack_blank (__h, (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy(OBSTACK,where,length) \
+__extension__ \
+({ struct obstack *__h = (OBSTACK); \
+ obstack_grow (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy0(OBSTACK,where,length) \
+__extension__ \
+({ struct obstack *__h = (OBSTACK); \
+ obstack_grow0 (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+/* The local variable is named __o1 to avoid a name conflict
+ when obstack_blank is called. */
+# define obstack_finish(OBSTACK) \
+__extension__ \
+({ struct obstack *__o1 = (OBSTACK); \
+ void *value; \
+ value = (void *) __o1->object_base; \
+ if (__o1->next_free == value) \
+ __o1->maybe_empty_object = 1; \
+ __o1->next_free \
+ = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
+ & ~ (__o1->alignment_mask)); \
+ if (__o1->next_free - (char *)__o1->chunk \
+ > __o1->chunk_limit - (char *)__o1->chunk) \
+ __o1->next_free = __o1->chunk_limit; \
+ __o1->object_base = __o1->next_free; \
+ value; })
+
+# define obstack_free(OBSTACK, OBJ) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ void *__obj = (OBJ); \
+ if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
+ __o->next_free = __o->object_base = __obj; \
+ else (obstack_free) (__o, __obj); })
+
+#else /* not __GNUC__ or not __STDC__ */
+
+# define obstack_object_size(h) \
+ (unsigned) ((h)->next_free - (h)->object_base)
+
+# define obstack_room(h) \
+ (unsigned) ((h)->chunk_limit - (h)->next_free)
+
+# define obstack_empty_p(h) \
+ ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
+
+/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
+ so that we can avoid having void expressions
+ in the arms of the conditional expression.
+ Casting the third operand to void was tried before,
+ but some compilers won't accept it. */
+
+# define obstack_make_room(h,length) \
+( (h)->temp = (length), \
+ (((h)->next_free + (h)->temp > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
+
+# define obstack_grow(h,where,length) \
+( (h)->temp = (length), \
+ (((h)->next_free + (h)->temp > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
+ _obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp), \
+ (h)->next_free += (h)->temp)
+
+# define obstack_grow0(h,where,length) \
+( (h)->temp = (length), \
+ (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
+ _obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp), \
+ (h)->next_free += (h)->temp, \
+ *((h)->next_free)++ = 0)
+
+# define obstack_1grow(h,datum) \
+( (((h)->next_free + 1 > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), 1), 0) : 0), \
+ (*((h)->next_free)++ = (datum)))
+
+# define obstack_ptr_grow(h,datum) \
+( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
+ (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum)))
+
+# define obstack_int_grow(h,datum) \
+( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
+ (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum)))
+
+# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
+# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+
+# define obstack_blank(h,length) \
+( (h)->temp = (length), \
+ (((h)->chunk_limit - (h)->next_free < (h)->temp) \
+ ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
+ ((h)->next_free += (h)->temp))
+
+# define obstack_alloc(h,length) \
+ (obstack_blank ((h), (length)), obstack_finish ((h)))
+
+# define obstack_copy(h,where,length) \
+ (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_copy0(h,where,length) \
+ (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_finish(h) \
+( ((h)->next_free == (h)->object_base \
+ ? (((h)->maybe_empty_object = 1), 0) \
+ : 0), \
+ (h)->temp = __PTR_TO_INT ((h)->object_base), \
+ (h)->next_free \
+ = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
+ & ~ ((h)->alignment_mask)), \
+ (((h)->next_free - (char *) (h)->chunk \
+ > (h)->chunk_limit - (char *) (h)->chunk) \
+ ? ((h)->next_free = (h)->chunk_limit) : 0), \
+ (h)->object_base = (h)->next_free, \
+ __INT_TO_PTR ((h)->temp))
+
+# if defined __STDC__ && __STDC__
+# define obstack_free(h,obj) \
+( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
+ (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
+ ? (int) ((h)->next_free = (h)->object_base \
+ = (h)->temp + (char *) (h)->chunk) \
+ : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
+# else
+# define obstack_free(h,obj) \
+( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
+ (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
+ ? (int) ((h)->next_free = (h)->object_base \
+ = (h)->temp + (char *) (h)->chunk) \
+ : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
+# endif
+
+#endif /* not __GNUC__ or not __STDC__ */
+
+#ifdef __cplusplus
+} /* C++ */
+#endif
+
+#endif /* obstack.h */
diff --git a/lib/pathmax.h b/lib/pathmax.h
new file mode 100644
index 0000000..74f5792
--- /dev/null
+++ b/lib/pathmax.h
@@ -0,0 +1,53 @@
+/* Define PATH_MAX somehow. Requires sys/types.h.
+ Copyright (C) 1992 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _PATHMAX_H
+#define _PATHMAX_H
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
+ PATH_MAX but might cause redefinition warnings when sys/param.h is
+ later included (as on MORE/BSD 4.3). */
+#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
+#include <limits.h>
+#endif
+
+#ifndef _POSIX_PATH_MAX
+#define _POSIX_PATH_MAX 255
+#endif
+
+#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
+#define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+#endif
+
+/* Don't include sys/param.h if it already has been. */
+#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
+#include <sys/param.h>
+#endif
+
+#if !defined(PATH_MAX) && defined(MAXPATHLEN)
+#define PATH_MAX MAXPATHLEN
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+#endif /* _PATHMAX_H */
diff --git a/lib/po-mode.el b/lib/po-mode.el
new file mode 100644
index 0000000..69643cd
--- /dev/null
+++ b/lib/po-mode.el
@@ -0,0 +1,2599 @@
+;;; po-mode.el -- for helping GNU gettext lovers to edit PO files.
+;;; Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+;;; François Pinard <pinard@iro.umontreal.ca>, 1995.
+;;; Helped by Greg McGary <gkm@magilla.cichlid.com>.
+
+;; This file is part of GNU gettext.
+
+;; GNU gettext is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU gettext is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+;; MA 02111-1307, USA.
+
+;;; This package provides the tools meant to help editing PO files,
+;;; as documented in the GNU gettext user's manual. See this manual
+;;; for user documentation, which is not repeated here.
+
+;;; To install, merely put this file somewhere GNU Emacs will find it,
+;;; then add the following lines to your .emacs file:
+;;;
+;;; (autoload 'po-mode "po-mode")
+;;; (setq auto-mode-alist (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode)
+;;; auto-mode-alist))
+;;;
+;;; To automatically use proper fonts under Emacs 20, also add:
+;;;
+;;; (autoload 'po-find-file-coding-system "po-mode")
+;;; (modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
+;;; 'po-find-file-coding-system)
+;;;
+;;; You may also adjust some variables, below, by defining them in your
+;;; `.emacs' file, either directly or through command `M-x customize'.
+
+;;; Emacs portability matters.
+
+;;; Most portability matters are addressed in this page. All other cases
+;;; involve one of `eval-and-compile' or `fboundp', just search for these.
+
+;; Identify which Emacs variety is being used.
+(eval-and-compile
+ (cond ((string-match "Lucid\\|XEmacs" emacs-version)
+ (setq po-EMACS20 nil po-XEMACS t))
+ ((and (string-lessp "19" emacs-version) (featurep 'faces))
+ (setq po-EMACS20 t po-XEMACS nil))
+ (t (setq po-EMACS20 nil po-XEMACS nil))))
+
+;; Experiment with Emacs LISP message internationalisation.
+(eval-and-compile
+ (or (fboundp 'set-translation-domain)
+ (defsubst set-translation-domain (string) nil))
+ (or (fboundp 'translate-string)
+ (defsubst translate-string (string) string)))
+(defsubst _ (string) (translate-string string))
+(defsubst N_ (string) string)
+
+;; Handle missing `customs' package.
+(eval-and-compile
+ (condition-case ()
+ (require 'custom)
+ (error nil))
+ (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
+ nil
+ (defmacro defgroup (&rest args)
+ nil)
+ (defmacro defcustom (var value doc &rest args)
+ (` (defvar (, var) (, value) (, doc))))))
+
+;; Protect string comparisons from text properties.
+(eval-and-compile
+ (fset 'po-buffer-substring
+ (symbol-function (if (fboundp 'buffer-substring-no-properties)
+ 'buffer-substring-no-properties
+ 'buffer-substring))))
+
+;; Handle missing `with-temp-buffer' function.
+(eval-and-compile
+ (if nil ; FIXME: just testing... (fboundp 'with-temp-buffer)
+
+ (fset 'po-with-temp-buffer (symbol-function 'with-temp-buffer))
+
+ (defmacro po-with-temp-buffer (&rest forms)
+ "Create a temporary buffer, and evaluate FORMS there like `progn'."
+ (let ((curr-buffer (make-symbol "curr-buffer"))
+ (temp-buffer (make-symbol "temp-buffer")))
+ `(let ((,curr-buffer (current-buffer))
+ (,temp-buffer (get-buffer-create
+ (generate-new-buffer-name " *po-temp*"))))
+ (unwind-protect
+ (progn
+ (set-buffer ,temp-buffer)
+ ,@forms)
+ (set-buffer ,curr-buffer)
+ (and (buffer-name ,temp-buffer)
+ (kill-buffer ,temp-buffer))))))))
+
+;; Handle missing `kill-new' function.
+(eval-and-compile
+ (if (fboundp 'kill-new)
+
+ (fset 'po-kill-new (symbol-function 'kill-new))
+
+ (defun po-kill-new (string)
+ "Push STRING onto the kill ring, for Emacs 18 where kill-new is missing."
+ (po-with-temp-buffer
+ (insert string)
+ (kill-region (point-min) (point-max))))))
+
+;; Handle missing `read-event' function.
+(eval-and-compile
+ (fset 'po-read-event
+ (cond ((fboundp 'read-event)
+ ;; GNU Emacs.
+ 'read-event)
+ ((fboundp 'next-command-event)
+ ;; XEmacs.
+ 'next-command-event)
+ (t
+ ;; Older Emacses.
+ 'read-char))))
+
+;; Handle missing `force-mode-line-update' function.
+(eval-and-compile
+ (if (fboundp 'force-mode-line-update)
+
+ (fset 'po-force-mode-line-update
+ (symbol-function 'force-mode-line-update))
+
+ (defun po-force-mode-line-update ()
+ "Force the mode-line of the current buffer to be redisplayed."
+ (set-buffer-modified-p (buffer-modified-p)))))
+
+;; Handle portable highlighting. Code has been adapted (OK... stolen! :-)
+;; from `ispell.el'.
+(eval-and-compile
+ (cond
+ (po-EMACS20
+
+ (defun po-create-overlay ()
+ "Create and return a deleted overlay structure.
+The variable `po-highlight-face' selects the face to use for highlighting."
+ (let ((overlay (make-overlay (point) (point))))
+ (overlay-put overlay 'face po-highlight-face)
+ ;; The fun thing is that a deleted overlay retains its face, and is
+ ;; movable.
+ (delete-overlay overlay)
+ overlay))
+
+ (defun po-highlight (overlay start end &optional buffer)
+ "Use OVERLAY to highlight the string from START to END.
+If limits are not relative to the current buffer, use optional BUFFER."
+ (move-overlay overlay start end (or buffer (current-buffer))))
+
+ (defun po-rehighlight (overlay)
+ "Ensure OVERLAY is highlighted."
+ ;; There is nothing to do, as GNU Emacs allows multiple highlights.
+ nil)
+
+ (defun po-dehighlight (overlay)
+ "Display normally the last string which OVERLAY highlighted.
+The current buffer should be in PO mode, when this function is called."
+ (delete-overlay overlay)))
+
+ (po-XEMACS
+
+ (defun po-create-overlay (overlay)
+ "Create and return a deleted overlay structure."
+ (cons (make-marker) (make-marker)))
+
+ (defun po-highlight (overlay start end &optional buffer)
+ "Use OVERLAY to highlight the string from START to END.
+If limits are not relative to the current buffer, use optional BUFFER."
+ (if buffer
+ (save-excursion
+ (set-buffer buffer)
+ (isearch-highlight start end))
+ (isearch-highlight start end))
+ (set-marker (car overlay) start (or buffer (current-buffer)))
+ (set-marker (cdr overlay) end (or buffer (current-buffer))))
+
+ (defun po-rehighlight (overlay)
+ "Ensure OVERLAY is highlighted."
+ (let ((buffer (marker-buffer (car overlay)))
+ (start (marker-position (car overlay)))
+ (end (marker-position (cdr overlay))))
+ (and buffer
+ (name-buffer buffer)
+ (po-highlight overlay start end buffer))))
+
+ (defun po-dehighlight (overlay)
+ "Display normally the last string which OVERLAY highlighted."
+ (isearch-dehighlight t)
+ (setcar overlay (make-marker))
+ (setcdr overlay (make-marker))))
+
+ (t
+
+ (defun po-create-overlay ()
+ "Create and return a deleted overlay structure."
+ (cons (make-marker) (make-marker)))
+
+ (defun po-highlight (overlay start end &optional buffer)
+ "Use OVERLAY to highlight the string from START to END.
+If limits are not relative to the current buffer, use optional BUFFER.
+No doubt that highlighting, when Emacs does not allow it, is a kludge."
+ (save-excursion
+ (and buffer (set-buffer buffer))
+ (let ((modified (buffer-modified-p))
+ (buffer-read-only nil)
+ (inhibit-quit t)
+ (buffer-undo-list t)
+ (text (buffer-substring start end)))
+ (goto-char start)
+ (delete-region start end)
+ (insert-char ? (- end start))
+ (sit-for 0)
+ (setq inverse-video (not inverse-video))
+ (delete-region start end)
+ (insert text)
+ (sit-for 0)
+ (setq inverse-video (not inverse-video))
+ (set-buffer-modified-p modified)))
+ (set-marker (car overlay) start (or buffer (current-buffer)))
+ (set-marker (cdr overlay) end (or buffer (current-buffer))))
+
+ (defun po-rehighlight (overlay)
+ "Ensure OVERLAY is highlighted."
+ (let ((buffer (marker-buffer (car overlay)))
+ (start (marker-position (car overlay)))
+ (end (marker-position (cdr overlay))))
+ (and buffer
+ (name-buffer buffer)
+ (po-highlight overlay start end buffer))))
+
+ (defun po-dehighlight (overlay)
+ "Display normally the last string which OVERLAY highlighted."
+ (let ((buffer (marker-buffer (car overlay)))
+ (start (marker-position (car overlay)))
+ (end (marker-position (cdr overlay))))
+ (if buffer
+ (save-excursion
+ (set-buffer buffer)
+ (let ((modified (buffer-modified-p))
+ (buffer-read-only nil)
+ (inhibit-quit t)
+ (buffer-undo-list t))
+ (let ((text (buffer-substring start end)))
+ (goto-char start)
+ (delete-region start end)
+ (insert-char ? (- end start))
+ (sit-for 0)
+ (delete-region start end)
+ (insert text)
+ (sit-for 0)
+ (set-buffer-modified-p modified)))))
+ (setcar overlay (make-marker))
+ (setcdr overlay (make-marker))))
+
+ )))
+
+;;; Customisation.
+
+(defgroup po nil
+ "Major mode for editing PO files"
+ :group 'i18n)
+
+(defcustom po-auto-edit-with-msgid nil
+ "*Automatically use msgid when editing untranslated entries."
+ :type 'boolean
+ :group 'po)
+
+(defcustom po-auto-fuzzy-on-edit nil
+ "*Automatically mark entries fuzzy when being edited."
+ :type 'boolean
+ :group 'po)
+
+(defcustom po-auto-select-on-unfuzzy nil
+ "*Automatically select some new entry while making an entry not fuzzy."
+ :type 'boolean
+ :group 'po)
+
+(defcustom po-auto-replace-revision-date 'ask
+ "*Automatically revise date in headers. Value is nil, t, or ask."
+ :type '(choice (const nil)
+ (const t)
+ (const ask))
+ :group 'po)
+
+(defcustom po-default-file-header "\
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid \"\"
+msgstr \"\"
+\"Project-Id-Version: PACKAGE VERSION\\n\"
+\"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\\n\"
+\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"
+\"Language-Team: LANGUAGE <LL@li.org>\\n\"
+\"MIME-Version: 1.0\\n\"
+\"Content-Type: text/plain; charset=CHARSET\\n\"
+\"Content-Transfer-Encoding: ENCODING\\n\"
+"
+ "*Default PO file header."
+ :type 'string
+ :group 'po)
+
+(defcustom po-highlighting (or po-EMACS20 po-XEMACS)
+ "*Highlight text whenever appropriate, when non-nil. However, on older
+Emacses, a yet unexplained highlighting bug causes files to get mangled."
+ :type 'boolean
+ :group 'po)
+
+(defcustom po-highlight-face 'highlight
+ "*The face used for PO mode highlighting. For Emacses with overlays.
+Possible values are `highlight', `modeline', `secondary-selection',
+`region', and `underline'.
+This variable can be set by the user to whatever face they desire.
+It's most convenient if the cursor color and highlight color are
+slightly different."
+ :type 'face
+ :group 'po)
+
+(defcustom po-gzip-uuencode-command "gzip -9 | uuencode -m"
+ "*The filter to use for preparing a mail invoice of the PO file.
+Normally \"gzip -9 | uuencode -m\", remove the -9 for lesser compression,
+or remove the -m if you are not using the GNU version of `uuencode'."
+ :type 'string
+ :group 'po)
+
+;;; The following block of declarations has the main purpose of avoiding
+;;; byte compiler warnings. It also introduces some documentation for
+;;; each of these variables, all meant to be local to PO mode buffers.
+
+;; Flag telling that MODE-LINE-STRING should be displayed. See `Window'
+;; page below. Exceptionally, this variable is local to *all* buffers.
+
+(defvar po-mode-flag)
+
+;; PO buffers are kept read-only to prevent random modifications. READ-ONLY
+;; holds the value of the read-only flag before PO mode was entered.
+
+(defvar po-read-only)
+
+;; The current entry extends from START-OF-ENTRY to END-OF-ENTRY, it
+;; includes preceding whitespace and excludes following whitespace. The
+;; start of keyword lines are START-OF-MSGID and START-OF-MSGSTR.
+;; ENTRY-TYPE classifies the entry.
+
+(defvar po-start-of-entry)
+(defvar po-start-of-msgid)
+(defvar po-start-of-msgstr)
+(defvar po-end-of-entry)
+(defvar po-entry-type)
+
+;; A few counters are usefully shown in the Emacs mode line.
+
+(defvar po-translated-counter)
+(defvar po-fuzzy-counter)
+(defvar po-untranslated-counter)
+(defvar po-obsolete-counter)
+(defvar po-mode-line-string)
+
+;; PO mode keeps track of fields being edited, for one given field should
+;; have one editing buffer at most, and for exiting a PO buffer properly
+;; should offer to close all pending edits. Variable EDITED-FIELDS holds an
+;; an list of "slots" of the form: (ENTRY-MARKER EDIT-BUFFER OVERLAY-INFO).
+;; To allow simultaneous edition of the comment and the msgstr of an entry,
+;; ENTRY-MARKER points to the msgid line if a comment is being edited, or to
+;; the msgstr line if the msgstr is being edited. EDIT-BUFFER is the
+;; temporary Emacs buffer used to edit the string. OVERLAY-INFO, when not
+;; nil, holds an overlay (or if overlays are not supported, a cons of two
+;; markers) for this msgid string which became highlighted for the edit.
+
+(defvar po-edited-fields)
+
+;; We maintain a set of movable pointers for returning to entries.
+
+(defvar po-marker-stack)
+
+;; SEARCH path contains a list of directories where files may be found,
+;; in a format suitable for read completion. Each directory includes
+;; its trailing slash. PO mode starts with "./" and "../".
+
+(defvar po-search-path)
+
+;; The following variables are meaningful only when REFERENCE-CHECK
+;; is identical to START-OF-ENTRY, else they should be recomputed.
+;; REFERENCE-ALIST contains all known references for the current
+;; entry, each list element is (PROMPT FILE LINE), where PROMPT may
+;; be used for completing read, FILE is a string and LINE is a number.
+;; REFERENCE-CURSOR is a cycling cursor into REFERENCE-ALIST.
+
+(defvar po-reference-alist)
+(defvar po-reference-cursor)
+(defvar po-reference-check)
+
+;; The following variables are for marking translatable strings in program
+;; sources. KEYWORDS is the list of keywords for marking translatable
+;; strings, kept in a format suitable for reading with completion.
+;; NEXT-FILE-LIST is the list of source files to visit, gotten from the tags
+;; table. STRING-START is the position for the beginning of the last found
+;; string, or nil if the string is invalidated. STRING-END is the position
+;; for the end of the string and indicates where the search should be
+;; resumed, or nil for the beginning of the current file. MARKING-OVERLAY,
+;; if not `nil', holds the overlay which highlight the last found string;
+;; for older Emacses, it holds the cons of two markers around the
+;; highlighted region.
+
+(defvar po-keywords)
+(defvar po-next-file-list)
+(defvar po-string-start)
+(defvar po-string-end)
+(defvar po-marking-overlay)
+
+;;; PO mode variables and constants (usually not to customize).
+
+;; The textdomain should really be "gettext", only trying it for now.
+;; All this requires more thinking, we cannot just do this like that.
+(set-translation-domain "po-mode")
+
+(defun po-mode-version ()
+ "Show Emacs PO mode version."
+ (interactive)
+ (message (_"Emacs PO mode, version %s") (substring "$Revision: 1.1 $" 11 -2)))
+
+(defconst po-help-display-string
+ (_"\
+PO Mode Summary Next Previous Miscellaneous
+*: Later, /: Docum n p Any type . Redisplay
+ /t /M-t Translated /v Version info
+Moving around f M-f Fuzzy ?, h This help
+< First if any o M-o Obsolete = Current index
+> Last if any u M-u Untranslated O Other window
+/SPC Auto select V Validate
+ Msgstr Comments M Mail officially
+Modifying entries RET # Call editor U Undo
+TAB Remove fuzzy mark k K Kill to E Edit out full
+/DEL Fuzzy or fade out w W Copy to Q Forceful quit
+LFD Init with msgid y Y Yank from q Confirm and quit
+
+gettext Keyword Marking Position Stack
+, Find next string Compendiums m Mark and push current
+M-, Mark translatable *c To compendium r Pop and return
+M-. Change mark, mark *M-C Select, save x Exchange current/top
+
+Program Sources Auxiliary Files Lexicography
+s Cycle reference a Cycle file *l Lookup translation
+M-s Select reference M-a Select file *M-l Add/edit translation
+S Consider path A Consider PO file *L Consider lexicon
+M-S Ignore path M-A Ignore PO file *M-L Ignore lexicon
+")
+ "Help page for PO mode.")
+
+(defconst po-mode-menu-layout
+ '("PO"
+ ("Moving around"
+ ["Auto select" po-auto-select-entry t]
+ "---"
+ "Forward"
+ ["Any next" po-next-entry t]
+ ["Next translated" po-next-translated-entry t]
+ ["Next fuzzy" po-next-fuzzy-entry t]
+ ["Next obsolete" po-next-obsolete-entry t]
+ ["Next untranslated" po-next-untranslated-entry t]
+ ["Last file entry" po-last-entry t]
+ "---"
+ "Backward"
+ ["Any previous" po-previous-entry t]
+ ["Previous translated" po-previous-translated-entry t]
+ ["Previous fuzzy" po-previous-fuzzy-entry t]
+ ["Previous obsolete" po-previous-obsolete-entry t]
+ ["Previous untranslated" po-previous-untranslated-entry t]
+ ["First file entry" po-first-entry t]
+ "---"
+ "Position stack"
+ ["Mark and push current" po-push-location t]
+ ["Pop and return" po-pop-location t]
+ ["Exchange current/top" po-exchange-location t]
+ "---"
+ ["Redisplay" po-current-entry t]
+ ["Current index" po-statistics t])
+ ("Modifying entries"
+ ["Undo" po-undo t]
+ "---"
+ "Msgstr"
+ ["Edit msgstr" po-edit-msgstr t]
+ ["Kill msgstr" po-kill-msgstr t]
+ ["Save msgstr" po-kill-ring-save-msgstr t]
+ ["Yank msgstr" po-yank-msgstr t]
+ "---"
+ "Comments"
+ ["Edit comment" po-edit-comment t]
+ ["Kill comment" po-kill-comment t]
+ ["Save comment" po-kill-ring-save-comment t]
+ ["Yank comment" po-yank-comment t]
+ "---"
+ ["Remove fuzzy mark" po-unfuzzy t]
+ ["Fuzzy or fade out" po-fade-out-entry t]
+ ["Init with msgid" po-msgid-to-msgstr t])
+ ("Other files"
+ ["Other window" po-other-window t]
+ "---"
+ "Program sources"
+ ["Cycle reference" po-cycle-source-reference t]
+ ["Select reference" po-select-source-reference t]
+ ["Consider path" po-consider-source-path t]
+ ["Ignore path" po-ignore-source-path t]
+ "---"
+ "Compendiums"
+ ["To compendium" po-save-entry nil]
+ ["Select, save" po-select-and-save-entry nil]
+ "---"
+ "Auxiliary files"
+ ["Cycle file" po-cycle-auxiliary nil]
+ ["Select file" po-select-auxiliary nil]
+ ["Consider file" po-consider-as-auxiliary nil]
+ ["Ignore file" po-ignore-as-auxiliary nil]
+ "---"
+ "Lexicography"
+ ["Lookup translation" po-lookup-lexicons nil]
+ ["Add/edit translation" po-edit-lexicon-entry nil]
+ ["Consider lexicon" po-consider-lexicon-file nil]
+ ["Ignore lexicon" po-ignore-lexicon-file nil])
+ "---"
+ "Source marking"
+ ["Find first string" (po-tags-search '(nil)) t]
+ ["Prefer keyword" (po-select-mark-and-mark '(nil)) t]
+ ["Find next string" po-tags-search t]
+ ["Mark preferred" po-mark-translatable t]
+ ["Mark with keyword" po-select-mark-and-mark t]
+ "---"
+ ["Version info" po-mode-version t]
+ ["Help page" po-help t]
+ ["Validate" po-validate t]
+ ["Mail officially" po-send-mail t]
+ ["Edit out full" po-edit-out-full t]
+ "---"
+ ["Forceful quit" po-quit t]
+ ["Soft quit" po-confirm-and-quit t])
+ "Menu layout for PO mode.")
+
+(defconst po-subedit-message
+ (_"Type `C-c C-c' once done, or `C-c C-k' to abort edit")
+ "Message to post in the minibuffer when an edit buffer is displayed.")
+
+(defconst po-content-type-charset-alist
+ '((euc . japanese-iso-8bit))
+ "How to convert Content-Type into a Mule coding system.")
+
+(defvar po-auxiliary-list nil
+ "List of auxiliary PO files, in completing read format.")
+
+(defvar po-auxiliary-cursor nil
+ "Cursor into the `po-auxiliary-list'.")
+
+(defvar po-translation-project-address
+ "translation@iro.umontreal.ca"
+ "Electronic mail address of the Translation Project.")
+
+(defvar po-compose-mail-function
+ (let ((functions '(compose-mail-other-window
+ message-mail-other-window
+ compose-mail
+ message-mail))
+ result)
+ (while (and (not result) functions)
+ (if (fboundp (car functions))
+ (setq result (car functions))
+ (setq functions (cdr functions))))
+ (cond (result)
+ ((fboundp 'mail-other-window)
+ (function (lambda (to subject)
+ (mail-other-window nil to subject))))
+ ((fboundp 'mail)
+ (function (lambda (to subject)
+ (mail nil to subject))))
+ (t (function (lambda (to subject)
+ (error (_"I do not know how to mail to `%s'") to))))))
+ "Function to start composing an electronic message.")
+
+(defvar po-any-msgid-regexp
+ "^\\(#~?[ \t]*\\)?msgid.*\n\\(\\(#~?[ \t]*\\)?\".*\n\\)*"
+ "Regexp matching a whole msgid field, whether obsolete or not.")
+
+(defvar po-any-msgstr-regexp
+ "^\\(#~?[ \t]*\\)?msgstr.*\n\\(\\(#~?[ \t]*\\)?\".*\n\\)*"
+ "Regexp matching a whole msgstr field, whether obsolete or not.")
+
+(defvar po-msgfmt-program "msgfmt"
+ "Path to msgfmt program from GNU gettext package.")
+
+;; Font lock based highlighting code.
+(defconst po-font-lock-keywords
+ '(
+ ("^\\(msgid \\|msgstr \\)?\"\\|\"$" . font-lock-keyword-face)
+ ("\\\\.\\|%[-.0-9ul]*[a-zA-Z]" . font-lock-variable-name-face)
+ ("^# .*\\|^#[:,]?" . font-lock-comment-face)
+ ("^#:\\(.*\\)" 1 font-lock-reference-face)
+ ;; The following line does not work, and I wonder why.
+ ;;("^#,\\(.*\\)" 1 font-function-name-reference-face)
+ )
+ "Additional expressions to highlight in PO mode.")
+
+;; Old activator for `font lock'. Is it still useful? I don't think so.
+;;
+;;(if (boundp 'font-lock-keywords)
+;; (put 'po-mode 'font-lock-keywords 'po-font-lock-keywords))
+
+;; `hilit19' based highlighting code has been disabled, as most probably
+;; nobody really needs it (it also generates ugly byte-compiler warnings).
+;;
+;;(if (fboundp 'hilit-set-mode-patterns)
+;; (hilit-set-mode-patterns 'po-mode
+;; '(("^# .*\\|^#$" nil comment)
+;; ("^#[.,:].*" nil include)
+;; ("^\\(msgid\\|msgstr\\) *\"" nil keyword)
+;; ("^\"\\|\"$" nil keyword))))
+
+;;; Mode activation.
+
+(eval-and-compile
+ (if po-EMACS20
+
+ (defun po-find-file-coding-system (arg-list)
+ "Return a Mule (DECODING . ENCODING) pair, according to PO file charset.
+Called through file-coding-system-alist, before the file is visited for real."
+ (and (eq (car arg-list) 'insert-file-contents)
+ (with-temp-buffer
+ (let ((coding-system-for-read 'no-conversion))
+ ;; Is 4096 enough? FIXME: See archives to decide! Some
+ ;; translators insert looong comments for the header entry.
+ (insert-file-contents (nth 1 arg-list) nil 0 4096)
+ (if (re-search-forward
+ "^\"Content-Type: text/plain;[ \t]*charset=\\([^\\]+\\)"
+ nil t)
+ (let* ((charset (intern (downcase (buffer-substring
+ (match-beginning 1)
+ (match-end 1)))))
+ (slot (assq charset
+ po-content-type-charset-alist)))
+ (list (cond (slot (cdr slot))
+ ((memq charset (coding-system-list)) charset)
+ (t 'no-conversion))))
+ '(no-conversion))))))
+
+ ))
+
+(defvar po-mode-map nil
+ "Keymap for PO mode.")
+(if po-mode-map
+ ()
+ ;; The following line because (make-sparse-keymap) does not work on Demacs.
+ (setq po-mode-map (make-keymap))
+ (suppress-keymap po-mode-map)
+ (define-key po-mode-map "\C-i" 'po-unfuzzy)
+ (define-key po-mode-map "\C-j" 'po-msgid-to-msgstr)
+ (define-key po-mode-map "\C-m" 'po-edit-msgstr)
+ (define-key po-mode-map " " 'po-auto-select-entry)
+ (define-key po-mode-map "?" 'po-help)
+ (define-key po-mode-map "#" 'po-edit-comment)
+ (define-key po-mode-map "," 'po-tags-search)
+ (define-key po-mode-map "." 'po-current-entry)
+ (define-key po-mode-map "<" 'po-first-entry)
+ (define-key po-mode-map "=" 'po-statistics)
+ (define-key po-mode-map ">" 'po-last-entry)
+ (define-key po-mode-map "a" 'po-cycle-auxiliary)
+;;;; (define-key po-mode-map "c" 'po-save-entry)
+ (define-key po-mode-map "f" 'po-next-fuzzy-entry)
+ (define-key po-mode-map "h" 'po-help)
+ (define-key po-mode-map "k" 'po-kill-msgstr)
+;;;; (define-key po-mode-map "l" 'po-lookup-lexicons)
+ (define-key po-mode-map "m" 'po-push-location)
+ (define-key po-mode-map "n" 'po-next-entry)
+ (define-key po-mode-map "o" 'po-next-obsolete-entry)
+ (define-key po-mode-map "p" 'po-previous-entry)
+ (define-key po-mode-map "q" 'po-confirm-and-quit)
+ (define-key po-mode-map "r" 'po-pop-location)
+ (define-key po-mode-map "s" 'po-cycle-source-reference)
+ (define-key po-mode-map "t" 'po-next-translated-entry)
+ (define-key po-mode-map "u" 'po-next-untranslated-entry)
+ (define-key po-mode-map "v" 'po-mode-version)
+ (define-key po-mode-map "w" 'po-kill-ring-save-msgstr)
+ (define-key po-mode-map "x" 'po-exchange-location)
+ (define-key po-mode-map "y" 'po-yank-msgstr)
+ (define-key po-mode-map "A" 'po-consider-as-auxiliary)
+ (define-key po-mode-map "E" 'po-edit-out-full)
+ (define-key po-mode-map "K" 'po-kill-comment)
+;;;; (define-key po-mode-map "L" 'po-consider-lexicon-file)
+ (define-key po-mode-map "M" 'po-send-mail)
+ (define-key po-mode-map "O" 'po-other-window)
+ (define-key po-mode-map "Q" 'po-quit)
+ (define-key po-mode-map "S" 'po-consider-source-path)
+ (define-key po-mode-map "U" 'po-undo)
+ (define-key po-mode-map "V" 'po-validate)
+ (define-key po-mode-map "W" 'po-kill-ring-save-comment)
+ (define-key po-mode-map "Y" 'po-yank-comment)
+ (define-key po-mode-map "\177" 'po-fade-out-entry)
+ (define-key po-mode-map "\M-," 'po-mark-translatable)
+ (define-key po-mode-map "\M-." 'po-select-mark-and-mark)
+ (define-key po-mode-map "\M-a" 'po-select-auxiliary)
+;;;; (define-key po-mode-map "\M-c" 'po-select-and-save-entry)
+ (define-key po-mode-map "\M-f" 'po-previous-fuzzy-entry)
+;;;; (define-key po-mode-map "\M-l" 'po-edit-lexicon-entry)
+ (define-key po-mode-map "\M-o" 'po-previous-obsolete-entry)
+ (define-key po-mode-map "\M-t" 'po-previous-translated-entry)
+ (define-key po-mode-map "\M-u" 'po-previous-untranslated-entry)
+ (define-key po-mode-map "\M-s" 'po-select-source-reference)
+ (define-key po-mode-map "\M-A" 'po-ignore-as-auxiliary)
+;;;; (define-key po-mode-map "\M-L" 'po-ignore-lexicon-file)
+ (define-key po-mode-map "\M-S" 'po-ignore-source-path)
+ )
+
+(defun po-mode ()
+ "Major mode for translators when they edit PO files.
+Special commands:\\{po-mode-map}
+Turning on PO mode calls the value of the variable `po-mode-hook',
+if that value is non-nil. Behaviour may be adjusted through some variables,
+all reachable through `M-x customize', in group `Emacs.Editing.I18n.Po'."
+
+ (interactive)
+ (kill-all-local-variables)
+ (setq major-mode 'po-mode
+ mode-name "PO")
+ (use-local-map po-mode-map)
+ (if (fboundp 'easy-menu-define)
+ (easy-menu-define po-mode-menu po-mode-map "" po-mode-menu-layout))
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults '(po-font-lock-keywords t))
+
+ (make-local-variable 'po-read-only)
+ (setq po-read-only buffer-read-only
+ buffer-read-only t)
+
+ (make-local-variable 'po-start-of-entry)
+ (make-local-variable 'po-start-of-msgid)
+ (make-local-variable 'po-start-of-msgstr)
+ (make-local-variable 'po-end-of-entry)
+ (make-local-variable 'po-entry-type)
+
+ (make-local-variable 'po-translated-counter)
+ (make-local-variable 'po-fuzzy-counter)
+ (make-local-variable 'po-untranslated-counter)
+ (make-local-variable 'po-obsolete-counter)
+ (make-local-variable 'po-mode-line-string)
+
+ (setq po-mode-flag t)
+
+ (po-check-file-header)
+ (po-compute-counters nil)
+
+ (make-local-variable 'po-edited-fields)
+ (setq po-edited-fields nil)
+
+ (make-local-variable 'po-marker-stack)
+ (setq po-marker-stack nil)
+
+ (make-local-variable 'po-search-path)
+ (setq po-search-path '(("./") ("../")))
+
+ (make-local-variable 'po-reference-alist)
+ (make-local-variable 'po-reference-cursor)
+ (make-local-variable 'po-reference-check)
+ (setq po-reference-alist nil
+ po-reference-cursor nil
+ po-reference-check 0)
+
+ (make-local-variable 'po-keywords)
+ (make-local-variable 'po-next-file-list)
+ (make-local-variable 'po-string-start)
+ (make-local-variable 'po-string-end)
+ (make-local-variable 'po-marking-overlay)
+ (setq po-keywords '(("gettext") ("gettext_noop") ("_") ("N_"))
+ po-next-file-list nil
+ po-string-start nil
+ po-string-end nil
+ po-marking-overlay (po-create-overlay))
+
+ (message (_"You may type `h' or `?' for a short PO mode reminder."))
+ (run-hooks 'po-mode-hook))
+
+;;; Window management.
+
+(make-variable-buffer-local 'po-mode-flag)
+
+(defvar po-mode-line-entry '(po-mode-flag (" " po-mode-line-string))
+ "Mode line format entry displaying MODE-LINE-STRING.")
+
+;; Insert MODE-LINE-ENTRY in mode line, but on first load only.
+(or (member po-mode-line-entry mode-line-format)
+ (let ((entry (member 'global-mode-string mode-line-format)))
+ (setcdr entry (cons po-mode-line-entry (cdr entry)))))
+
+(defun po-update-mode-line-string ()
+ "Compute a new statistics string to display in mode line."
+ (setq po-mode-line-string
+ (concat (format "%dt" po-translated-counter)
+ (if (> po-fuzzy-counter 0)
+ (format "+%df" po-fuzzy-counter))
+ (if (> po-untranslated-counter 0)
+ (format "+%du" po-untranslated-counter))
+ (if (> po-obsolete-counter 0)
+ (format "+%do" po-obsolete-counter))))
+ (po-force-mode-line-update))
+
+(defun po-type-counter ()
+ "Return the symbol name of the counter appropriate for the current entry."
+ (cond ((eq po-entry-type 'obsolete) 'po-obsolete-counter)
+ ((eq po-entry-type 'fuzzy) 'po-fuzzy-counter)
+ ((eq po-entry-type 'translated) 'po-translated-counter)
+ ((eq po-entry-type 'untranslated) 'po-untranslated-counter)
+ (t (error (_"Unknown entry type")))))
+
+(defun po-decrease-type-counter ()
+ "Decrease the counter corresponding to the nature of the current entry."
+ (let ((counter (po-type-counter)))
+ (set counter (1- (eval counter)))))
+
+(defun po-increase-type-counter ()
+ "Increase the counter corresponding to the nature of the current entry.
+Then, update the mode line counters."
+ (let ((counter (po-type-counter)))
+ (set counter (1+ (eval counter))))
+ (po-update-mode-line-string))
+
+;; Avoid byte compiler warnings.
+(defvar po-fuzzy-regexp)
+(defvar po-untranslated-regexp)
+
+(defun po-compute-counters (flag)
+ "Prepare counters for mode line display. If FLAG, also echo entry position."
+ (and flag (po-find-span-of-entry))
+ (setq po-translated-counter 0
+ po-fuzzy-counter 0
+ po-untranslated-counter 0
+ po-obsolete-counter 0)
+ (let ((position 0) (total 0) here)
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward po-any-msgstr-regexp nil t)
+ (and (= (% total 20) 0)
+ (if flag
+ (message (_"Position %d/%d") position total)
+ (message (_"Position %d") total)))
+ (setq here (point))
+ (goto-char (match-beginning 0))
+ (setq total (1+ total))
+ (and flag (eq (point) po-start-of-msgstr) (setq position total))
+ (cond ((eq (following-char) ?#)
+ (setq po-obsolete-counter (1+ po-obsolete-counter)))
+ ((looking-at po-untranslated-regexp)
+ (setq po-untranslated-counter (1+ po-untranslated-counter)))
+ (t (setq po-translated-counter (1+ po-translated-counter))))
+ (goto-char here))
+
+ ;; Make another pass just for the fuzzy entries, kind of kludgey.
+ ;; FIXME: Counts will be wrong if untranslated entries are fuzzy, yet
+ ;; this should not normally happen.
+ (goto-char (point-min))
+ (while (re-search-forward po-fuzzy-regexp nil t)
+ (setq po-fuzzy-counter (1+ po-fuzzy-counter)))
+ (setq po-translated-counter (- po-translated-counter po-fuzzy-counter)))
+
+ ;; Push the results out.
+ (if flag
+ (message (_"\
+Position %d/%d; %d translated, %d fuzzy, %d untranslated, %d obsolete")
+ position total po-translated-counter po-fuzzy-counter
+ po-untranslated-counter po-obsolete-counter)
+ (message "")))
+ (po-update-mode-line-string))
+
+(defun po-redisplay ()
+ "Redisplay the current entry."
+ ;; FIXME: Should try to fit the whole entry on the window. If this is not
+ ;; possible, should try to fit the comment and the msgid. Otherwise,
+ ;; should try to fit the msgid. Else, the first line of the msgid should
+ ;; be at the top of the window.
+ (goto-char po-start-of-msgid))
+
+(defun po-other-window ()
+ "Get the cursor into another window, out of PO mode."
+ (interactive)
+ (if (one-window-p t)
+ (progn
+ (split-window)
+ (switch-to-buffer (other-buffer)))
+ (other-window 1)))
+
+;;; Processing the PO file header entry.
+
+(defun po-check-file-header ()
+ "Create a missing PO mode file header, or replace an oldish one."
+ (save-excursion
+ (let ((buffer-read-only po-read-only)
+ insert-flag end-of-header)
+ (goto-char (point-min))
+ (if (re-search-forward po-any-msgstr-regexp nil t)
+ (progn
+
+ ;; There is at least one entry.
+ (goto-char (match-beginning 0))
+ (previous-line 1)
+ (setq end-of-header (match-end 0))
+ (if (looking-at "msgid \"\"\n")
+
+ ;; There is indeed a PO file header.
+ (if (re-search-forward "\n\"PO-Revision-Date: "
+ end-of-header t)
+ nil
+
+ ;; This is an oldish header. Replace it all.
+ (goto-char end-of-header)
+ (while (> (point) (point-min))
+ (previous-line 1)
+ (insert "#~ ")
+ (beginning-of-line))
+ (beginning-of-line)
+ (setq insert-flag t))
+
+ ;; The first entry is not a PO file header, insert one.
+ (setq insert-flag t)))
+
+ ;; Not a single entry found.
+ (setq insert-flag t))
+
+ (goto-char (point-min))
+ (and insert-flag (insert po-default-file-header "\n")))))
+
+(defun po-replace-revision-date ()
+ "Replace the revision date by current time in the PO file header."
+ (if (fboundp 'format-time-string)
+ (if (or (eq po-auto-replace-revision-date t)
+ (and (eq po-auto-replace-revision-date 'ask)
+ (y-or-n-p (_"May I set PO-Revision-Date? "))))
+ (save-excursion
+ (goto-char (point-min))
+ (if (re-search-forward "^\"PO-Revision-Date:.*" nil t)
+ (let* ((buffer-read-only po-read-only)
+ (time (current-time))
+ (seconds (or (car (current-time-zone time)) 0))
+ (minutes (/ (abs seconds) 60))
+ (zone (format "%c%02d:%02d"
+ (if (< seconds 0) ?- ?+)
+ (/ minutes 60)
+ (% minutes 60))))
+ (replace-match
+ (concat "\"PO-Revision-Date: "
+ (format-time-string "%Y-%m-%d %H:%M" time)
+ zone "\\n\"")
+ t t))))
+ (message ""))
+ (message (_"PO-Revision-Date should be adjusted..."))))
+
+;;; Handling span of entry, entry type and entry attributes.
+
+(defun po-find-span-of-entry ()
+ "Find the extent of the PO file entry where the cursor is. Set variables
+PO-START-OF-ENTRY, PO-START-OF-MSGID, PO-START-OF-MSGSTR, PO-END-OF-ENTRY
+and PO-ENTRY-TYPE to meaningful values. Decreasing priority of type
+interpretation is: obsolete, fuzzy, untranslated or translated."
+ (let ((here (point)))
+ (if (re-search-backward po-any-msgstr-regexp nil t)
+ (progn
+
+ ;; After a backward match, (match-end 0) will not extend
+ ;; beyond point, in case point was *inside* the regexp. We
+ ;; need a dependable (match-end 0), so we redo the match in
+ ;; the forward direction.
+ (re-search-forward po-any-msgstr-regexp)
+ (if (<= (match-end 0) here)
+ (progn
+
+ ;; We most probably found the msgstr of the previous
+ ;; entry. The current entry then starts just after
+ ;; its end, save this information just in case.
+ (setq po-start-of-entry (match-end 0))
+
+ ;; However, it is also possible that we are located in
+ ;; the crumb after the last entry in the file. If
+ ;; yes, we know the middle and end of last PO entry.
+ (setq po-start-of-msgstr (match-beginning 0)
+ po-end-of-entry (match-end 0))
+
+ (if (re-search-forward po-any-msgstr-regexp nil t)
+ (progn
+
+ ;; We definitely were not in the crumb.
+ (setq po-start-of-msgstr (match-beginning 0)
+ po-end-of-entry (match-end 0)))
+
+ ;; We were in the crumb. The start of the last PO
+ ;; file entry is the end of the previous msgstr if
+ ;; any, or else, the beginning of the file.
+ (goto-char po-start-of-msgstr)
+ (setq po-start-of-entry
+ (if (re-search-backward po-any-msgstr-regexp nil t)
+ (match-end 0)
+ (point-min)))))
+
+ ;; The cursor was inside msgstr of the current entry.
+ (setq po-start-of-msgstr (match-beginning 0)
+ po-end-of-entry (match-end 0))
+ ;; The start of this entry is the end of the previous
+ ;; msgstr if any, or else, the beginning of the file.
+ (goto-char po-start-of-msgstr)
+ (setq po-start-of-entry
+ (if (re-search-backward po-any-msgstr-regexp nil t)
+ (match-end 0)
+ (point-min)))))
+
+ ;; The cursor was before msgstr in the first entry in the file.
+ (setq po-start-of-entry (point-min))
+ (goto-char po-start-of-entry)
+ ;; There is at least the PO file header, so this should match.
+ (re-search-forward po-any-msgstr-regexp)
+ (setq po-start-of-msgstr (match-beginning 0)
+ po-end-of-entry (match-end 0)))
+
+ ;; Find start of msgid.
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgid-regexp)
+ (setq po-start-of-msgid (match-beginning 0))
+
+ ;; Classify the entry.
+ (setq po-entry-type
+ (if (eq (following-char) ?#)
+ 'obsolete
+ (goto-char po-start-of-entry)
+ (if (re-search-forward po-fuzzy-regexp po-start-of-msgid t)
+ 'fuzzy
+ (goto-char po-start-of-msgstr)
+ (if (looking-at po-untranslated-regexp)
+ 'untranslated
+ 'translated))))
+
+ ;; Put the cursor back where it was.
+ (goto-char here)))
+
+(defun po-add-attribute (name)
+ "Add attribute NAME to the current entry, unless it is already there."
+ (save-excursion
+ (let ((buffer-read-only po-read-only))
+ (goto-char po-start-of-entry)
+ (if (re-search-forward "\n#[,!] .*" po-start-of-msgid t)
+ (save-restriction
+ (narrow-to-region (match-beginning 0) (match-end 0))
+ (goto-char (point-min))
+ (if (re-search-forward (concat "\\b" name "\\b") nil t)
+ nil
+ (goto-char (point-max))
+ (insert ", " name)))
+ (skip-chars-forward "\n")
+ (while (eq (following-char) ?#)
+ (next-line 1))
+ (insert "#, " name "\n")))))
+
+(defun po-delete-attribute (name)
+ "Delete attribute NAME from the current entry, if any."
+ (save-excursion
+ (let ((buffer-read-only po-read-only))
+ (goto-char po-start-of-entry)
+ (if (re-search-forward "\n#[,!] .*" po-start-of-msgid t)
+ (save-restriction
+ (narrow-to-region (match-beginning 0) (match-end 0))
+ (goto-char (point-min))
+ (if (re-search-forward
+ (concat "\\(\n#[,!] " name "$\\|, " name "$\\| " name ",\\)")
+ nil t)
+ (replace-match "" t t)))))))
+
+;;; Entry positionning.
+
+(defun po-say-location-depth ()
+ "Tell how many entries in the entry location stack."
+ (let ((depth (length po-marker-stack)))
+ (cond ((= depth 0) (message (_"Empty location stack")))
+ ((= depth 1) (message (_"One entry in location stack")))
+ (t (message (_"%d entries in location stack") depth)))))
+
+(defun po-push-location ()
+ "Stack the location of the current entry, for later return."
+ (interactive)
+ (po-find-span-of-entry)
+ (save-excursion
+ (goto-char po-start-of-msgid)
+ (setq po-marker-stack (cons (point-marker) po-marker-stack)))
+ (po-say-location-depth))
+
+(defun po-pop-location ()
+ "Unstack a saved location, and return to the corresponding entry."
+ (interactive)
+ (if po-marker-stack
+ (progn
+ (goto-char (car po-marker-stack))
+ (setq po-marker-stack (cdr po-marker-stack))
+ (po-current-entry)
+ (po-say-location-depth))
+ (error (_"The entry location stack is empty"))))
+
+(defun po-exchange-location ()
+ "Exchange the location of the current entry with the top of stack."
+ (interactive)
+ (if po-marker-stack
+ (progn
+ (po-find-span-of-entry)
+ (goto-char po-start-of-msgid)
+ (let ((location (point-marker)))
+ (goto-char (car po-marker-stack))
+ (setq po-marker-stack (cons location (cdr po-marker-stack))))
+ (po-current-entry)
+ (po-say-location-depth))
+ (error (_"The entry location stack is empty"))))
+
+(defun po-current-entry ()
+ "Display the current entry."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-redisplay))
+
+(defun po-first-entry-with-regexp (regexp)
+ "Display the first entry in the file which msgstr matches REGEXP."
+ (let ((here (point)))
+ (goto-char (point-min))
+ (if (re-search-forward regexp nil t)
+ (progn
+ (goto-char (match-beginning 0))
+ (po-current-entry))
+ (goto-char here)
+ (error (_"There is no such entry")))))
+
+(defun po-last-entry-with-regexp (regexp)
+ "Display the last entry in the file which msgstr matches REGEXP."
+ (let ((here (point)))
+ (goto-char (point-max))
+ (if (re-search-backward regexp nil t)
+ (po-current-entry)
+ (goto-char here)
+ (error (_"There is no such entry")))))
+
+(defun po-next-entry-with-regexp (regexp wrap)
+ "Display the entry following the current entry which msgstr matches REGEXP.
+If WRAP is not nil, the search may wrap around the buffer."
+ (po-find-span-of-entry)
+ (let ((here (point)))
+ (goto-char po-end-of-entry)
+ (if (re-search-forward regexp nil t)
+ (progn
+ (goto-char (match-beginning 0))
+ (po-current-entry))
+ (if (and wrap
+ (progn
+ (goto-char (point-min))
+ (re-search-forward regexp po-start-of-entry t)))
+ (progn
+ (goto-char (match-beginning 0))
+ (po-current-entry)
+ (message (_"Wrapping around the buffer")))
+ (goto-char here)
+ (error (_"There is no such entry"))))))
+
+(defun po-previous-entry-with-regexp (regexp wrap)
+ "Redisplay the entry preceding the current entry which msgstr matches REGEXP.
+If WRAP is not nil, the search may wrap around the buffer."
+ (po-find-span-of-entry)
+ (let ((here (point)))
+ (goto-char po-start-of-entry)
+ (if (re-search-backward regexp nil t)
+ (po-current-entry)
+ (if (and wrap
+ (progn
+ (goto-char (point-max))
+ (re-search-backward regexp po-end-of-entry t)))
+ (progn
+ (po-current-entry)
+ (message (_"Wrapping around the buffer")))
+ (goto-char here)
+ (error (_"There is no such entry"))))))
+
+;; Any entries.
+
+(defun po-first-entry ()
+ "Display the first entry."
+ (interactive)
+ (po-first-entry-with-regexp po-any-msgstr-regexp))
+
+(defun po-last-entry ()
+ "Display the last entry."
+ (interactive)
+ (po-last-entry-with-regexp po-any-msgstr-regexp))
+
+(defun po-next-entry ()
+ "Display the entry following the current entry."
+ (interactive)
+ (po-next-entry-with-regexp po-any-msgstr-regexp nil))
+
+(defun po-previous-entry ()
+ "Display the entry preceding the current entry."
+ (interactive)
+ (po-previous-entry-with-regexp po-any-msgstr-regexp nil))
+
+;; Untranslated entries.
+
+(defvar po-after-entry-regexp
+ "\\(\\'\\|\\(#[ \t]*\\)?[^\"]\\)"
+ "Regexp which should be true after a full msgstr string matched.")
+
+(defvar po-untranslated-regexp
+ (concat "^msgstr[ \t]*\"\"\n" po-after-entry-regexp)
+ "Regexp matching a whole msgstr field, but only if active and empty.")
+
+(defun po-next-untranslated-entry ()
+ "Find the next untranslated entry, wrapping around if necessary."
+ (interactive)
+ (po-next-entry-with-regexp po-untranslated-regexp t))
+
+(defun po-previous-untranslated-entry ()
+ "Find the previous untranslated entry, wrapping around if necessary."
+ (interactive)
+ (po-previous-entry-with-regexp po-untranslated-regexp t))
+
+(defun po-msgid-to-msgstr ()
+ "Use another window to edit msgstr reinitialized with msgid."
+ (interactive)
+ (po-find-span-of-entry)
+ (if (or (eq po-entry-type 'untranslated)
+ (eq po-entry-type 'obsolete)
+ (y-or-n-p (_"Really loose previous translation? ")))
+ (po-set-msgstr (po-get-msgid nil)))
+ (message ""))
+
+;; Obsolete entries.
+
+(defvar po-obsolete-msgstr-regexp
+ "^#~?[ \t]*msgstr.*\n\\(#~?[ \t]*\".*\n\\)*"
+ "Regexp matching a whole msgstr field of an obsolete entry.")
+
+(defun po-next-obsolete-entry ()
+ "Find the next obsolete entry, wrapping around if necessary."
+ (interactive)
+ (po-next-entry-with-regexp po-obsolete-msgstr-regexp t))
+
+(defun po-previous-obsolete-entry ()
+ "Find the previous obsolete entry, wrapping around if necessary."
+ (interactive)
+ (po-previous-entry-with-regexp po-obsolete-msgstr-regexp t))
+
+;; Fuzzy entries.
+
+(defvar po-fuzzy-regexp "^#[,!] .*fuzzy"
+ "Regexp matching the string inserted by msgmerge for translations
+which does not match exactly.")
+
+(defun po-next-fuzzy-entry ()
+ "Find the next fuzzy entry, wrapping around if necessary."
+ (interactive)
+ (po-next-entry-with-regexp po-fuzzy-regexp t))
+
+(defun po-previous-fuzzy-entry ()
+ "Find the next fuzzy entry, wrapping around if necessary."
+ (interactive)
+ (po-previous-entry-with-regexp po-fuzzy-regexp t))
+
+(defun po-unfuzzy ()
+ "Remove the fuzzy attribute for the current entry."
+ (interactive)
+ (po-find-span-of-entry)
+ (cond ((eq po-entry-type 'fuzzy)
+ (po-decrease-type-counter)
+ (po-delete-attribute "fuzzy")
+ (po-current-entry)
+ (po-increase-type-counter)))
+ (if po-auto-select-on-unfuzzy
+ (po-auto-select-entry))
+ (po-update-mode-line-string))
+
+;; Translated entries.
+
+(defun po-next-translated-entry ()
+ "Find the next untranslated entry, wrapping around if necessary."
+ (interactive)
+ (if (= po-translated-counter 0)
+ (error (_"There is no such entry"))
+ (po-next-entry-with-regexp po-untranslated-regexp t)
+ (po-find-span-of-entry)
+ (while (not (eq po-entry-type 'translated))
+ (po-next-entry-with-regexp po-any-msgstr-regexp t)
+ (po-find-span-of-entry))))
+
+(defun po-previous-translated-entry ()
+ "Find the previous untranslated entry, wrapping around if necessary."
+ (interactive)
+ (if (= po-translated-counter 0)
+ (error (_"There is no such entry"))
+ (po-previous-entry-with-regexp po-any-msgstr-regexp t)
+ (po-find-span-of-entry)
+ (while (not (eq po-entry-type 'translated))
+ (po-previous-entry-with-regexp po-untranslated-regexp t)
+ (po-find-span-of-entry))))
+
+;; Auto-selection feature.
+
+(defun po-auto-select-entry ()
+ "Select the next entry having the same type as the current one.
+If none, wrap from the beginning of the buffer with another type,
+going from untranslated to fuzzy, and from fuzzy to obsolete.
+Plain translated entries are always disregarded unless there are
+no entries of the other types."
+ (interactive)
+ (po-find-span-of-entry)
+ (goto-char po-end-of-entry)
+ (if (and (= po-untranslated-counter 0)
+ (= po-fuzzy-counter 0)
+ (= po-obsolete-counter 0))
+
+ ;; All entries are plain translated. Next entry will do, or
+ ;; wrap around if there is none.
+ (if (re-search-forward po-any-msgstr-regexp nil t)
+ (goto-char (match-beginning 0))
+ (goto-char (point-min)))
+
+ ;; If over a translated entry, look for an untranslated one first.
+ ;; Else, look for an entry of the same type first.
+ (let ((goal (if (eq po-entry-type 'translated)
+ 'untranslated
+ po-entry-type)))
+ (while goal
+
+ ;; Find an untranslated entry, or wrap up for a fuzzy entry.
+ (if (eq goal 'untranslated)
+ (if (and (> po-untranslated-counter 0)
+ (re-search-forward po-untranslated-regexp nil t))
+ (progn
+ (goto-char (match-beginning 0))
+ (setq goal nil))
+ (goto-char (point-min))
+ (setq goal 'fuzzy)))
+
+ ;; Find a fuzzy entry, or wrap up for an obsolete entry.
+ (if (eq goal 'fuzzy)
+ (if (and (> po-fuzzy-counter 0)
+ (re-search-forward po-fuzzy-regexp nil t))
+ (progn
+ (goto-char (match-beginning 0))
+ (setq goal nil))
+ (goto-char (point-min))
+ (setq goal 'obsolete)))
+
+ ;; Find an obsolete entry, or wrap up for an untranslated entry.
+ (if (eq goal 'obsolete)
+ (if (and (> po-obsolete-counter 0)
+ (re-search-forward po-obsolete-msgstr-regexp nil t))
+ (progn
+ (goto-char (match-beginning 0))
+ (setq goal nil))
+ (goto-char (point-min))
+ (setq goal 'untranslated))))))
+
+ ;; Display this entry nicely.
+ (po-current-entry))
+
+;;; Killing and yanking fields.
+
+(defun po-extract-unquoted (buffer start end)
+ "Extract and return the unquoted string in BUFFER going from START to END.
+Crumb preceding or following the quoted string is ignored."
+ (po-with-temp-buffer
+ (insert-buffer-substring buffer start end)
+ ;; Remove preceding crumb.
+ (goto-char (point-min))
+ (search-forward "\"")
+ (delete-region (point-min) (point))
+ ;; Remove following crumb.
+ (goto-char (point-max))
+ (search-backward "\"")
+ (delete-region (point) (point-max))
+ ;; Glue concatenated strings.
+ (goto-char (point-min))
+ (while (re-search-forward "\"[ \t]*\\\\?\n\\(#~?\\)?[ \t]*\"" nil t)
+ (replace-match "" t t))
+ ;; Remove escaped newlines.
+ (goto-char (point-min))
+ (while (re-search-forward "\\\\[ \t]*\n" nil t)
+ (replace-match "" t t))
+ ;; Unquote individual characters.
+ (goto-char (point-min))
+ (while (re-search-forward "\\\\[\"abfnt\\0-7]" nil t)
+ (cond ((eq (preceding-char) ?\") (replace-match "\"" t t))
+ ((eq (preceding-char) ?a) (replace-match "\a" t t))
+ ((eq (preceding-char) ?b) (replace-match "\b" t t))
+ ((eq (preceding-char) ?f) (replace-match "\f" t t))
+ ((eq (preceding-char) ?n) (replace-match "\n" t t))
+ ((eq (preceding-char) ?t) (replace-match "\t" t t))
+ ((eq (preceding-char) ?\\) (replace-match "\\" t t))
+ (t (let ((value (- (preceding-char) ?0)))
+ (replace-match "" t t)
+ (while (looking-at "[0-7]")
+ (setq value (+ (* 8 value) (- (following-char) ?0)))
+ (replace-match "" t t))
+ (insert value)))))
+ (buffer-string)))
+
+(defun po-eval-requoted (form prefix obsolete)
+ "Eval FORM, which inserts a string, and return the string fully requoted.
+If PREFIX, precede the result with its contents. If OBSOLETE, comment all
+generated lines in the returned string. Evaluating FORM should insert the
+wanted string in the buffer which is current at the time of evaluation.
+If FORM is itself a string, then this string is used for insertion."
+ (po-with-temp-buffer
+ (if (stringp form)
+ (insert form)
+ (push-mark)
+ (eval form))
+ (goto-char (point-min))
+ (let ((multi-line (re-search-forward "[^\n]\n+[^\n]" nil t)))
+ (goto-char (point-min))
+ (while (re-search-forward "[\"\a\b\f\n\t\\]" nil t)
+ (cond ((eq (preceding-char) ?\") (replace-match "\\\"" t t))
+ ((eq (preceding-char) ?\a) (replace-match "\\a" t t))
+ ((eq (preceding-char) ?\b) (replace-match "\\b" t t))
+ ((eq (preceding-char) ?\f) (replace-match "\\f" t t))
+ ((eq (preceding-char) ?\n)
+ (replace-match (if (or (not multi-line) (eobp))
+ "\\n"
+ "\\n\"\n\"")
+ t t))
+ ((eq (preceding-char) ?\t) (replace-match "\\t" t t))
+ ((eq (preceding-char) ?\\) (replace-match "\\\\" t t))))
+ (goto-char (point-min))
+ (if prefix (insert prefix " "))
+ (insert (if multi-line "\"\"\n\"" "\""))
+ (goto-char (point-max))
+ (insert "\"")
+ (if prefix (insert "\n"))
+ (if obsolete
+ (progn
+ (goto-char (point-min))
+ (while (not (eobp))
+ (or (eq (following-char) ?\n) (insert "#~ "))
+ (search-forward "\n"))))
+ (buffer-string))))
+
+(defun po-get-msgid (kill)
+ "Extract and return the unquoted msgid string.
+If KILL, then add the unquoted string to the kill ring."
+ (let ((string (po-extract-unquoted (current-buffer)
+ po-start-of-msgid po-start-of-msgstr)))
+ (if kill (po-kill-new string))
+ string))
+
+(defun po-get-msgstr (kill)
+ "Extract and return the unquoted msgstr string.
+If KILL, then add the unquoted string to the kill ring."
+ (let ((string (po-extract-unquoted (current-buffer)
+ po-start-of-msgstr po-end-of-entry)))
+ (if kill (po-kill-new string))
+ string))
+
+(defun po-set-msgid (form)
+ "Replace the current msgid, using FORM to get a string.
+Evaluating FORM should insert the wanted string in the current buffer. If
+FORM is itself a string, then this string is used for insertion. The string
+is properly requoted before the replacement occurs.
+
+Returns `nil' if the buffer has not been modified, for if the new msgid
+described by FORM is merely identical to the msgid already in place."
+ (let ((string (po-eval-requoted form "msgid" (eq po-entry-type 'obsolete))))
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgid-regexp po-start-of-msgstr)
+ (and (not (string-equal (po-buffer-substring (match-beginning 0)
+ (match-end 0))
+ string))
+ (let ((buffer-read-only po-read-only))
+ (replace-match string t t)
+ (goto-char po-start-of-msgid)
+ (po-find-span-of-entry)
+ t)))))
+
+(defun po-set-msgstr (form)
+ "Replace the current msgstr, using FORM to get a string.
+Evaluating FORM should insert the wanted string in the current buffer. If
+FORM is itself a string, then this string is used for insertion. The string
+is properly requoted before the replacement occurs.
+
+Returns `nil' if the buffer has not been modified, for if the new msgstr
+described by FORM is merely identical to the msgstr already in place."
+ (let ((string (po-eval-requoted form "msgstr" (eq po-entry-type 'obsolete))))
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgstr-regexp po-end-of-entry)
+ (and (not (string-equal (po-buffer-substring (match-beginning 0)
+ (match-end 0))
+ string))
+ (let ((buffer-read-only po-read-only))
+ (po-decrease-type-counter)
+ (replace-match string t t)
+ (goto-char po-start-of-msgid)
+ (po-find-span-of-entry)
+ (po-increase-type-counter)
+ t)))))
+
+(defun po-kill-ring-save-msgstr ()
+ "Push the msgstr string from current entry on the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-get-msgstr t))
+
+(defun po-kill-msgstr ()
+ "Empty the msgstr string from current entry, pushing it on the kill ring."
+ (interactive)
+ (po-kill-ring-save-msgstr)
+ (po-set-msgstr ""))
+
+(defun po-yank-msgstr ()
+ "Replace the current msgstr string by the top of the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-set-msgstr (if (eq last-command 'yank) '(yank-pop 1) '(yank)))
+ (setq this-command 'yank))
+
+(defun po-fade-out-entry ()
+ "Mark an active entry as fuzzy; obsolete a fuzzy or untranslated entry;
+or completely delete an obsolete entry, saving its msgstr on the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+
+ (cond ((eq po-entry-type 'translated)
+ (po-decrease-type-counter)
+ (po-add-attribute "fuzzy")
+ (po-current-entry)
+ (po-increase-type-counter))
+
+ ((or (eq po-entry-type 'fuzzy)
+ (eq po-entry-type 'untranslated))
+ (if (yes-or-no-p (_"Should I really obsolete this entry? "))
+ (progn
+ (po-decrease-type-counter)
+ (save-excursion
+ (save-restriction
+ (narrow-to-region po-start-of-entry po-end-of-entry)
+ (let ((buffer-read-only po-read-only))
+ (goto-char (point-min))
+ (skip-chars-forward "\n")
+ (while (not (eobp))
+ (insert "#~ ")
+ (search-forward "\n")))))
+ (po-current-entry)
+ (po-increase-type-counter)))
+ (message ""))
+
+ ((and (eq po-entry-type 'obsolete)
+ (po-check-for-pending-edit po-start-of-msgid)
+ (po-check-for-pending-edit po-start-of-msgstr))
+ (po-decrease-type-counter)
+ (po-update-mode-line-string)
+ (po-get-msgstr t)
+ (let ((buffer-read-only po-read-only))
+ (delete-region po-start-of-entry po-end-of-entry))
+ (goto-char po-start-of-entry)
+ (if (re-search-forward po-any-msgstr-regexp nil t)
+ (goto-char (match-beginning 0))
+ (re-search-backward po-any-msgstr-regexp nil t))
+ (po-current-entry)
+ (message ""))))
+
+;;; Killing and yanking comments.
+
+(defvar po-active-comment-regexp
+ "^\\(#\n\\|# .*\n\\)+"
+ "Regexp matching the whole editable comment part of an active entry.")
+
+(defvar po-obsolete-comment-regexp
+ "^\\(#~? #\n\\|#~? # .*\n\\)+"
+ "Regexp matching the whole editable comment part of an obsolete entry.")
+
+(defun po-get-comment (kill-flag)
+ "Extract and return the editable comment string, uncommented.
+If KILL-FLAG, then add the unquoted comment to the kill ring."
+ (let ((buffer (current-buffer))
+ (obsolete (eq po-entry-type 'obsolete)))
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (if (re-search-forward (if obsolete po-obsolete-comment-regexp
+ po-active-comment-regexp)
+ po-end-of-entry t)
+ (po-with-temp-buffer
+ (insert-buffer-substring buffer (match-beginning 0) (match-end 0))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (if (looking-at (if obsolete "#~? # ?" "#~? ?"))
+ (replace-match "" t t))
+ (forward-line 1))
+ (and kill-flag (copy-region-as-kill (point-min) (point-max)))
+ (buffer-string))
+ ""))))
+
+(defun po-set-comment (form)
+ "Using FORM to get a string, replace the current editable comment.
+Evaluating FORM should insert the wanted string in the current buffer.
+If FORM is itself a string, then this string is used for insertion.
+The string is properly recommented before the replacement occurs."
+ (let ((obsolete (eq po-entry-type 'obsolete))
+ string)
+ (po-with-temp-buffer
+ (if (stringp form)
+ (insert form)
+ (push-mark)
+ (eval form))
+ (if (not (or (bobp) (= (preceding-char) ?\n)))
+ (insert "\n"))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (insert (if (= (following-char) ?\n)
+ (if obsolete "#~ #" "#")
+ (if obsolete "#~ # " "# ")))
+ (search-forward "\n"))
+ (setq string (buffer-string)))
+ (goto-char po-start-of-entry)
+ (if (re-search-forward
+ (if obsolete po-obsolete-comment-regexp po-active-comment-regexp)
+ po-end-of-entry t)
+ (if (not (string-equal (po-buffer-substring (match-beginning 0)
+ (match-end 0))
+ string))
+ (let ((buffer-read-only po-read-only))
+ (replace-match string t t)))
+ (skip-chars-forward " \t\n")
+ (let ((buffer-read-only po-read-only))
+ (insert string))))
+ (po-current-entry))
+
+(defun po-kill-ring-save-comment ()
+ "Push the msgstr string from current entry on the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-get-comment t))
+
+(defun po-kill-comment ()
+ "Empty the msgstr string from current entry, pushing it on the kill ring."
+ (interactive)
+ (po-kill-ring-save-comment)
+ (po-set-comment "")
+ (po-redisplay))
+
+(defun po-yank-comment ()
+ "Replace the current comment string by the top of the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-set-comment (if (eq last-command 'yank) '(yank-pop 1) '(yank)))
+ (setq this-command 'yank)
+ (po-redisplay))
+
+;;; Editing management and submode.
+
+;; In a string edit buffer, BACK-POINTER points to one of the slots of the
+;; list EDITED-FIELDS kept in the PO buffer. See its description elsewhere.
+;; Reminder: slots have the form (ENTRY-MARKER EDIT-BUFFER OVERLAY-INFO).
+
+(defvar po-subedit-back-pointer)
+
+(defun po-clean-out-killed-edits ()
+ "From EDITED-FIELDS, clean out any edit having a killed edit buffer."
+ (while (and po-edited-fields
+ (null (buffer-name (nth 1 (car po-edited-fields)))))
+ (let ((overlay (nth 2 (car po-edited-fields))))
+ (and overlay (po-dehighlight overlay)))
+ (setq po-edited-fields (cdr po-edited-fields)))
+ (let ((cursor po-edited-fields))
+ (while cursor
+ (let ((slot (car cursor)))
+ (setq cursor (cdr cursor))
+ (if (buffer-name (nth 1 slot))
+ nil
+ (let ((overlay (nth 2 slot)))
+ (and overlay (po-dehighlight overlay)))
+ (setq po-edited-fields (delete slot po-edited-fields)))))))
+
+(defun po-check-all-pending-edits ()
+ "Resume any pending edit. Return nil if some remains."
+ (po-clean-out-killed-edits)
+ (or (null po-edited-fields)
+ (let ((slot (car po-edited-fields)))
+ (goto-char (nth 0 slot))
+ (pop-to-buffer (nth 1 slot))
+ (let ((overlay (nth 2 slot)))
+ (and overlay (po-rehighlight overlay)))
+ (message po-subedit-message)
+ nil)))
+
+(defun po-check-for-pending-edit (position)
+ "Resume any pending edit at POSITION. Return nil if such edit exists."
+ (po-clean-out-killed-edits)
+ (let ((marker (make-marker)))
+ (set-marker marker position)
+ (let ((slot (assoc marker po-edited-fields)))
+ (if slot
+ (progn
+ (goto-char marker)
+ (pop-to-buffer (nth 1 slot))
+ (let ((overlay (nth 2 slot)))
+ (and overlay (po-rehighlight overlay)))
+ (message po-subedit-message)))
+ (not slot))))
+
+(defun po-edit-out-full ()
+ "Get out of PO mode, leaving PO file buffer in fundamental mode."
+ (interactive)
+ (if (and (po-check-all-pending-edits)
+ (yes-or-no-p (_"Should I let you edit the whole PO file? ")))
+ (progn
+ (setq buffer-read-only po-read-only)
+ (fundamental-mode)
+ (message (_"Type `M-x po-mode RET' once done")))))
+
+(defvar po-subedit-mode-map nil
+ "Keymap while editing a PO mode entry (or the full PO file).")
+(if po-subedit-mode-map
+ ()
+ (setq po-subedit-mode-map (make-sparse-keymap))
+ (define-key po-subedit-mode-map "\C-c\C-a" 'po-subedit-cycle-auxiliary)
+ (define-key po-subedit-mode-map "\C-c\C-c" 'po-subedit-exit)
+ (define-key po-subedit-mode-map "\C-c\C-k" 'po-subedit-abort))
+
+(defun po-subedit-abort ()
+ "Exit the subedit buffer, merely discarding its contents."
+ (interactive)
+ (let* ((edit-buffer (current-buffer))
+ (back-pointer po-subedit-back-pointer)
+ (marker (nth 0 back-pointer))
+ (overlay (nth 2 back-pointer))
+ (buffer (marker-buffer marker)))
+ (if (null buffer)
+ (error (_"Corresponding PO buffer does not exist anymore"))
+ (or (one-window-p) (delete-window))
+ (switch-to-buffer buffer)
+ (goto-char marker)
+ (and overlay (po-dehighlight overlay))
+ (kill-buffer edit-buffer)
+ (setq po-edited-fields (delete back-pointer po-edited-fields)))))
+
+(defun po-subedit-exit ()
+ "Exit the subedit buffer, replacing the string in the PO buffer."
+ (interactive)
+ (goto-char (point-max))
+ (skip-chars-backward " \t\n")
+ (if (eq (preceding-char) ?<)
+ (delete-region (1- (point)) (point-max)))
+ (let ((string (buffer-string)))
+ (po-subedit-abort)
+ (po-find-span-of-entry)
+ (cond ((= (point) po-start-of-msgid)
+ (po-set-comment string)
+ (po-redisplay))
+ ((= (point) po-start-of-msgstr)
+ (let ((replaced (po-set-msgstr string)))
+ (if (and replaced
+ po-auto-fuzzy-on-edit
+ (eq po-entry-type 'translated))
+ (progn
+ (po-decrease-type-counter)
+ (po-add-attribute "fuzzy")
+ (po-current-entry)
+ (po-increase-type-counter)))))
+ (t (debug)))))
+
+(defun po-edit-string (string type expand-tabs)
+ "Prepare a pop up buffer for editing STRING, which is of a given TYPE.
+TYPE may be 'comment or 'msgstr. If EXPAND-TABS, expand tabs to spaces.
+Run functions on po-subedit-mode-hook."
+ (let ((marker (make-marker)))
+ (set-marker marker (cond ((eq type 'comment) po-start-of-msgid)
+ ((eq type 'msgstr) po-start-of-msgstr)))
+ (if (po-check-for-pending-edit marker)
+ (let ((edit-buffer (generate-new-buffer
+ (concat "*" (buffer-name) "*")))
+ (buffer (current-buffer))
+ overlay slot)
+ (if (and (eq type 'msgstr) po-highlighting)
+ ;; ;; Try showing all of msgid in the upper window while editing.
+ ;; (goto-char (1- po-start-of-msgstr))
+ ;; (recenter -1)
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgid-regexp nil t)
+ (let ((end (1- (match-end 0))))
+ (goto-char (match-beginning 0))
+ (re-search-forward "msgid +" nil t)
+ (setq overlay (po-create-overlay))
+ (po-highlight overlay (point) end buffer))))
+ (setq slot (list marker edit-buffer overlay)
+ po-edited-fields (cons slot po-edited-fields))
+ (pop-to-buffer edit-buffer)
+ (make-local-variable 'po-subedit-back-pointer)
+ (setq po-subedit-back-pointer slot)
+ (erase-buffer)
+ (insert string "<")
+ (goto-char (point-min))
+ (and expand-tabs (setq indent-tabs-mode nil))
+ (use-local-map po-subedit-mode-map)
+ (run-hooks 'po-subedit-mode-hook)
+ (message po-subedit-message)))))
+
+(defun po-edit-comment ()
+ "Use another window to edit the current translator comment."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-edit-string (po-get-comment nil) 'comment nil))
+
+(defun po-edit-msgstr ()
+ "Use another window to edit the current msgstr."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-edit-string (if (and po-auto-edit-with-msgid
+ (eq po-entry-type 'untranslated))
+ (po-get-msgid nil)
+ (po-get-msgstr nil))
+ 'msgstr
+ t))
+
+;;; String normalization and searching.
+
+(defun po-normalize-old-style (explain)
+ "Normalize old gettext style fields using K&R C multiline string syntax.
+To minibuffer messages sent while normalizing, add the EXPLAIN string."
+ (let ((here (point-marker))
+ (counter 0)
+ (buffer-read-only po-read-only))
+ (goto-char (point-min))
+ (message (_"Normalizing %d, %s") counter explain)
+ (while (re-search-forward
+ "\\(^#?[ \t]*msg\\(id\\|str\\)[ \t]*\"\\|[^\" \t][ \t]*\\)\\\\\n"
+ nil t)
+ (if (= (% counter 10) 0)
+ (message (_"Normalizing %d, %s") counter explain))
+ (replace-match "\\1\"\n\"" t nil)
+ (setq counter (1+ counter)))
+ (goto-char here)
+ (message (_"Normalizing %d...done") counter)))
+
+(defun po-normalize-field (field explain)
+ "Normalize FIELD of all entries. FIELD is either the symbol msgid or msgstr.
+To minibuffer messages sent while normalizing, add the EXPLAIN string."
+ (let ((here (point-marker))
+ (counter 0))
+ (goto-char (point-min))
+ (while (re-search-forward po-any-msgstr-regexp nil t)
+ (if (= (% counter 10) 0)
+ (message (_"Normalizing %d, %s") counter explain))
+ (goto-char (match-beginning 0))
+ (po-find-span-of-entry)
+ (cond ((eq field 'msgid) (po-set-msgid (po-get-msgid nil)))
+ ((eq field 'msgstr) (po-set-msgstr (po-get-msgstr nil))))
+ (goto-char po-end-of-entry)
+ (setq counter (1+ counter)))
+ (goto-char here)
+ (message (_"Normalizing %d...done") counter)))
+
+;; Normalize, but the British way! :-)
+(defsubst po-normalise () (po-normalize))
+
+(defun po-normalize ()
+ "Normalize all entries in the PO file."
+ (interactive)
+ (po-normalize-old-style (_"pass 1/3"))
+ (po-normalize-field t (_"pass 2/3"))
+ (po-normalize-field nil (_"pass 3/3"))
+ ;; The last PO file entry has just been processed.
+ (if (not (= po-end-of-entry (point-max)))
+ (let ((buffer-read-only po-read-only))
+ (kill-region po-end-of-entry (point-max))))
+ ;; A bizarre format might have fooled the counters, so recompute
+ ;; them to make sure their value is dependable.
+ (po-compute-counters nil))
+
+;;; Multiple PO files.
+
+(defun po-show-auxiliary-list ()
+ "Echo the current auxiliary list in the message area."
+ (if po-auxiliary-list
+ (let ((cursor po-auxiliary-cursor)
+ string)
+ (while cursor
+ (setq string (concat string (if string " ") (car (car cursor)))
+ cursor (cdr cursor)))
+ (setq cursor po-auxiliary-list)
+ (while (not (eq cursor po-auxiliary-cursor))
+ (setq string (concat string (if string " ") (car (car cursor)))
+ cursor (cdr cursor)))
+ (message string))
+ (message (_"No auxiliary files."))))
+
+(defun po-consider-as-auxiliary ()
+ "Add the current PO file to the list of auxiliary files."
+ (interactive)
+ (if (member (list buffer-file-name) po-auxiliary-list)
+ nil
+ (setq po-auxiliary-list
+ (nconc po-auxiliary-list (list (list buffer-file-name))))
+ (or po-auxiliary-cursor
+ (setq po-auxiliary-cursor po-auxiliary-list)))
+ (po-show-auxiliary-list))
+
+(defun po-ignore-as-auxiliary ()
+ "Delete the current PO file from the list of auxiliary files."
+ (interactive)
+ (setq po-auxiliary-list (delete (list buffer-file-name) po-auxiliary-list)
+ po-auxiliary-cursor po-auxiliary-list)
+ (po-show-auxiliary-list))
+
+(defun po-seek-equivalent-translation (name string)
+ "Search a PO file NAME for a `msgid' STRING having a non-empty `msgstr'.
+STRING is the full quoted msgid field, including the `msgid' keyword. When
+found, display the file over the current window, with the `msgstr' field
+possibly highlighted, the cursor at start of msgid, then return `t'.
+Otherwise, move nothing, and just return `nil'."
+ (let ((current (current-buffer))
+ (buffer (find-file-noselect name)))
+ (set-buffer buffer)
+ (let ((start (point))
+ found)
+ (goto-char (point-min))
+ (while (and (not found) (search-forward string nil t))
+ ;; Screen out longer `msgid's.
+ (if (looking-at "^msgstr ")
+ (progn
+ (po-find-span-of-entry)
+ ;; Ignore an untranslated entry.
+ (or (string-equal
+ (buffer-substring po-start-of-msgstr po-end-of-entry)
+ "msgstr \"\"\n")
+ (setq found t)))))
+ (if found
+ (progn
+ (switch-to-buffer buffer)
+ (po-find-span-of-entry)
+ (if po-highlighting
+ (progn
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgstr-regexp nil t)
+ (let ((end (1- (match-end 0))))
+ (goto-char (match-beginning 0))
+ (re-search-forward "msgstr +" nil t)
+ ;; FIXME:
+ (po-highlight (point) end))))
+ (goto-char po-start-of-msgid))
+ (goto-char start)
+ (po-find-span-of-entry)
+ (select-buffer current))
+ found)))
+
+(defun po-cycle-auxiliary ()
+ "Select the next auxiliary file having an entry with same `msgid'."
+ (interactive)
+ (po-find-span-of-entry)
+ (if po-auxiliary-list
+ (let ((string (buffer-substring po-start-of-msgid po-start-of-msgstr))
+ (cursor po-auxiliary-cursor)
+ found name)
+ (while (and (not found) cursor)
+ (setq name (car (car cursor)))
+ (if (and (not (string-equal buffer-file-name name))
+ (po-seek-equivalent-translation name string))
+ (setq found t
+ po-auxiliary-cursor cursor))
+ (setq cursor (cdr cursor)))
+ (setq cursor po-auxiliary-list)
+ (while (and (not found) cursor)
+ (setq name (car (car cursor)))
+ (if (and (not (string-equal buffer-file-name name))
+ (po-seek-equivalent-translation name string))
+ (setq found t
+ po-auxiliary-cursor cursor))
+ (setq cursor (cdr cursor)))
+ (or found (message (_"No other translation found")))
+ found)))
+
+(defun po-subedit-cycle-auxiliary ()
+ "Cycle auxiliary file, but from the translation edit buffer."
+ (interactive)
+ (if po-buffer-of-edited-entry
+ (let ((buffer (current-buffer)))
+ (pop-to-buffer po-buffer-of-edited-entry)
+ (po-cycle-auxiliary)
+ (pop-to-buffer buffer))
+ (error (_"Not editing a PO file entry"))))
+
+(defun po-select-auxiliary ()
+ "Select one of the available auxiliary files and locate an equivalent
+entry. If an entry having the same `msgid' cannot be found, merely select
+the file without moving its cursor."
+ (interactive)
+ (po-find-span-of-entry)
+ (if po-auxiliary-list
+ (let ((string (buffer-substring po-start-of-msgid po-start-of-msgstr))
+ (name (car (assoc (completing-read (_"Which auxiliary file? ")
+ po-auxiliary-list nil t)
+ po-auxiliary-list))))
+ (po-consider-as-auxiliary)
+ (or (po-seek-equivalent-translation name string)
+ (find-file name)))))
+
+;;; Original program sources as context.
+
+(defun po-show-source-path ()
+ "Echo the current source search path in the message area."
+ (if po-search-path
+ (let ((cursor po-search-path)
+ string)
+ (while cursor
+ (setq string (concat string (if string " ") (car (car cursor)))
+ cursor (cdr cursor)))
+ (message string))
+ (message (_"Empty source path."))))
+
+(defun po-consider-source-path (directory)
+ "Add a given DIRECTORY, requested interactively, to the source search path."
+ (interactive "DDirectory for search path: ")
+ (setq po-search-path (cons (list (if (string-match "/$" directory)
+ directory
+ (concat directory "/")))
+ po-search-path))
+ (setq po-reference-check 0)
+ (po-show-source-path))
+
+(defun po-ignore-source-path ()
+ "Delete a directory, selected with completion, from the source search path."
+ (interactive)
+ (setq po-search-path
+ (delete (list (completing-read (_"Directory to remove? ")
+ po-search-path nil t))
+ po-search-path))
+ (setq po-reference-check 0)
+ (po-show-source-path))
+
+(defun po-ensure-source-references ()
+ "Extract all references into a list, with paths resolved, if necessary."
+ (po-find-span-of-entry)
+ (if (= po-start-of-entry po-reference-check)
+ ()
+ (setq po-reference-alist nil)
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (if (re-search-forward "^#:" po-start-of-msgid t)
+ (while (looking-at "\\(\n#:\\)? *\\([^: ]+\\):\\([0-9]+\\)")
+ (goto-char (match-end 0))
+ (let* ((name (po-buffer-substring (match-beginning 2)
+ (match-end 2)))
+ (line (po-buffer-substring (match-beginning 3)
+ (match-end 3)))
+ (path po-search-path)
+ file)
+ (while (and (progn (setq file (concat (car (car path)) name))
+ (not (file-exists-p file)))
+ path)
+ (setq path (cdr path)))
+ (if path
+ (setq po-reference-alist
+ (cons (list (concat file ":" line)
+ file
+ (string-to-int line))
+ po-reference-alist)))))))
+ (setq po-reference-alist (nreverse po-reference-alist)
+ po-reference-cursor po-reference-alist
+ po-reference-check po-start-of-entry)))
+
+(defun po-show-source-context (triplet)
+ "Show the source context given a TRIPLET which is (PROMPT FILE LINE)."
+ (find-file-other-window (car (cdr triplet)))
+ (goto-line (car (cdr (cdr triplet))))
+ (other-window 1)
+ (let ((maximum 0)
+ position
+ (cursor po-reference-alist))
+ (while (not (eq triplet (car cursor)))
+ (setq maximum (1+ maximum)
+ cursor (cdr cursor)))
+ (setq position (1+ maximum)
+ po-reference-cursor cursor)
+ (while cursor
+ (setq maximum (1+ maximum)
+ cursor (cdr cursor)))
+ (message (_"Displaying %d/%d: \"%s\"") position maximum (car triplet))))
+
+(defun po-cycle-source-reference ()
+ "Display some source context for the current entry.
+If the command is repeated many times in a row, cycle through contexts."
+ (interactive)
+ (po-ensure-source-references)
+ (if po-reference-cursor
+ (po-show-source-context
+ (car (if (eq last-command 'po-cycle-source-reference)
+ (or (cdr po-reference-cursor) po-reference-alist)
+ po-reference-cursor)))
+ (error (_"No resolved source references"))))
+
+(defun po-select-source-reference ()
+ "Select one of the available source contexts for the current entry."
+ (interactive)
+ (po-ensure-source-references)
+ (if po-reference-alist
+ (po-show-source-context
+ (assoc
+ (completing-read (_"Which source context? ") po-reference-alist nil t)
+ po-reference-alist))
+ (error (_"No resolved source references"))))
+
+;;; Program sources strings though tags table.
+
+;;; C mode.
+
+;;; A few long string cases (submitted by Ben Pfaff).
+
+;; #define string "This is a long string " \
+;; "that is continued across several lines " \
+;; "in a macro in order to test \\ quoting\\" \
+;; "\\ with goofy strings.\\"
+
+;; char *x = "This is just an ordinary string "
+;; "continued across several lines without needing "
+;; "to use \\ characters at end-of-line.";
+
+;; char *y = "Here is a string continued across \
+;; several lines in the manner that was sanctioned \
+;; in K&R C compilers and still works today, \
+;; even though the method used above is more esthetic.";
+
+;;; End of long string cases.
+
+(defun po-find-c-string (keywords)
+ "Find the next C string, excluding those marked by any of KEYWORDS.
+Returns (START . END) for the found string, or (nil . nil) if none found."
+ (let (start end)
+ (while (and (not start)
+ (re-search-forward "\\([\"']\\|/\\*\\)" nil t))
+ (cond ((= (preceding-char) ?*)
+ ;; Disregard comments.
+ (search-forward "*/"))
+
+ ((= (preceding-char) ?\')
+ ;; Disregard character constants.
+ (forward-char (if (= (following-char) ?\\) 3 2)))
+
+ ((save-excursion
+ (beginning-of-line)
+ (looking-at "^# *\\(include\\|line\\)"))
+ ;; Disregard lines being #include or #line directives.
+ (end-of-line))
+
+ ;; Else, find the end of the (possibly concatenated) string.
+ (t (setq start (1- (point))
+ end nil)
+ (while (not end)
+ (cond ((= (following-char) ?\")
+ (if (looking-at "\"[ \t\n\\\\]*\"")
+ (goto-char (match-end 0))
+ (forward-char 1)
+ (setq end (point))))
+ ((= (following-char) ?\\) (forward-char 2))
+ (t (skip-chars-forward "^\"\\\\"))))
+
+ ;; Check before string for keyword and opening parenthesis.
+ (goto-char start)
+ (skip-chars-backward " \n\t")
+ (if (= (preceding-char) ?\()
+ (progn
+ (backward-char 1)
+ (skip-chars-backward " \n\t")
+ (let ((end-keyword (point)))
+ (skip-chars-backward "_A-Za-z0-9")
+ (if (member (list (po-buffer-substring (point)
+ end-keyword))
+ keywords)
+
+ ;; Disregard already marked strings.
+ (progn
+ (goto-char end)
+ (setq start nil
+ end nil)))))))))
+
+ ;; Return the found string, if any.
+ (cons start end)))
+
+(defun po-mark-c-string (start end keyword)
+ "Mark the C string, from START to END, with KEYWORD.
+Return the adjusted value for END."
+ (goto-char end)
+ (insert ")")
+ (goto-char start)
+ (insert keyword)
+ (if (not (string-equal keyword "_"))
+ (progn (insert " ") (setq end (1+ end))))
+ (insert "(")
+ (+ end 2 (length keyword)))
+
+;;; Emacs LISP mode.
+
+(defun po-find-emacs-lisp-string (keywords)
+ "Find the next Emacs LISP string, excluding those marked by any of KEYWORDS.
+Returns (START . END) for the found string, or (nil . nil) if none found."
+ (let (start end)
+ (while (and (not start)
+ (re-search-forward "[;\"?]" nil t))
+
+ (cond ((= (preceding-char) ?\;)
+ ;; Disregard comments.
+ (search-forward "\n"))
+
+ ((= (preceding-char) ?\?)
+ ;; Disregard character constants.
+ (forward-char (if (= (following-char) ?\\) 2 1)))
+
+ ;; Else, find the end of the string.
+ (t (setq start (1- (point)))
+ (while (not (= (following-char) ?\"))
+ (skip-chars-forward "^\"\\\\")
+ (if (= (following-char) ?\\) (forward-char 2)))
+ (forward-char 1)
+ (setq end (point))
+
+ ;; Check before string for keyword and opening parenthesis.
+ (goto-char start)
+ (skip-chars-backward " \n\t")
+ (let ((end-keyword (point)))
+ (skip-chars-backward "-_A-Za-z0-9")
+ (if (and (= (preceding-char) ?\()
+ (member (list (po-buffer-substring (point)
+ end-keyword))
+ keywords))
+
+ ;; Disregard already marked strings.
+ (progn
+ (goto-char end)
+ (setq start nil
+ end nil)))))))
+
+ ;; Return the found string, if any.
+ (cons start end)))
+
+(defun po-mark-emacs-lisp-string (start end keyword)
+ "Mark the Emacs LISP string, from START to END, with KEYWORD.
+Return the adjusted value for END."
+ (goto-char end)
+ (insert ")")
+ (goto-char start)
+ (insert "(" keyword)
+ (if (not (string-equal keyword "_"))
+ (progn (insert " ") (setq end (1+ end))))
+ (+ end 2 (length keyword)))
+
+;;; Processing generic to all programming modes.
+
+(eval-and-compile
+ (autoload 'visit-tags-table-buffer "etags"))
+
+(defun po-tags-search (restart)
+ (interactive "P")
+ "Find an unmarked translatable string through all files in tags table.
+Disregard some simple strings which are most probably non-translatable.
+With prefix argument, restart search at first file."
+
+ ;; Take care of restarting the search if necessary.
+ (if restart (setq po-next-file-list nil))
+
+ ;; Loop doing things until an interesting string is found.
+ (let ((keywords po-keywords)
+ found buffer start
+ (end po-string-end))
+ (while (not found)
+
+ ;; Reinitialize the source file list if necessary.
+ (if (not po-next-file-list)
+ (progn
+ (setq po-next-file-list
+ (save-excursion
+ (visit-tags-table-buffer)
+ (copy-sequence (tags-table-files))))
+ (or po-next-file-list (error (_"No files to process")))
+ (setq end nil)))
+
+ ;; Try finding a string after resuming the search position.
+ (message (_"Scanning %s...") (car po-next-file-list))
+ (save-excursion
+ (setq buffer (find-file-noselect (car po-next-file-list)))
+ (set-buffer buffer)
+ (goto-char (or end (point-min)))
+
+ (cond ((string-equal mode-name "C")
+ (let ((pair (po-find-c-string keywords)))
+ (setq start (car pair)
+ end (cdr pair))))
+ ((string-equal mode-name "Emacs-Lisp")
+ (let ((pair (po-find-emacs-lisp-string keywords)))
+ (setq start (car pair)
+ end (cdr pair))))
+ (t (message (_"Unknown source mode for PO mode, skipping..."))
+ (setq start nil
+ end nil))))
+
+ ;; Advance to next file if no string was found.
+ (if (not start)
+ (progn
+ (setq po-next-file-list (cdr po-next-file-list))
+ (if po-next-file-list
+ (setq end nil)
+ (setq po-string-end nil)
+ (and po-highlighting (po-dehighlight po-marking-overlay))
+ (error (_"All files processed"))))
+
+ ;; Push the string just found string into a work buffer for study.
+ (po-with-temp-buffer
+ (insert (po-extract-unquoted buffer start end))
+ (goto-char (point-min))
+
+ ;; Do not disregard if at least three letters in a row.
+ (if (re-search-forward "[A-Za-z][A-Za-z][A-Za-z]" nil t)
+ (setq found t)
+
+ ;; Disregard if two letters, and more punctuations than letters.
+ (if (re-search-forward "[A-Za-z][A-Za-z]" nil t)
+ (let ((total (buffer-size)))
+ (goto-char (point-min))
+ (while (re-search-forward "[A-Za-z]+" nil t)
+ (replace-match "" t t))
+ (if (< (* 2 (buffer-size)) total)
+ (setq found t))))
+
+ ;; Disregard if single letters or no letters at all.
+ ))))
+
+ ;; Ensure the string is being displayed.
+
+ (if (one-window-p t) (split-window) (other-window 1))
+ (switch-to-buffer buffer)
+ (goto-char start)
+ (or (pos-visible-in-window-p start) (recenter '(nil)))
+ (if (pos-visible-in-window-p end)
+ (goto-char end)
+ (goto-char end)
+ (recenter -1))
+ (other-window 1)
+ (and po-highlighting (po-highlight po-marking-overlay start end buffer))
+
+ ;; Save the string for later commands.
+ (message (_"Scanning %s...done") (car po-next-file-list))
+ (setq po-string-start start
+ po-string-end end)))
+
+(defun po-mark-found-string (keyword)
+ "Mark last found string in program sources as translatable, using KEYWORD."
+ (and po-highlighting (po-dehighlight po-marking-overlay))
+ (let ((buffer (find-file-noselect (car po-next-file-list)))
+ (start po-string-start)
+ (end po-string-end)
+ line string)
+
+ ;; Mark string in program sources.
+ (setq string (po-extract-unquoted buffer start end))
+ (save-excursion
+ (set-buffer buffer)
+ (setq line (count-lines (point-min) start)
+ end (cond ((string-equal mode-name "C")
+ (po-mark-c-string start end keyword))
+ ((string-equal mode-name "Emacs-Lisp")
+ (po-mark-emacs-lisp-string start end keyword))
+ (t (error (_"Cannot mark in unknown source mode"))))))
+ (setq po-string-end end)
+
+ ;; Add PO file entry.
+ (let ((buffer-read-only po-read-only))
+ (goto-char (point-max))
+ (insert "\n" (format "#: %s:%d\n" (car po-next-file-list) line))
+ (save-excursion
+ (insert (po-eval-requoted string "msgid" nil) "msgstr \"\"\n"))
+ (setq po-untranslated-counter (1+ po-untranslated-counter))
+ (po-update-mode-line-string))))
+
+(defun po-mark-translatable ()
+ (interactive)
+ "Mark last found string in program sources as translatable, using `_'."
+ (if (and po-string-start po-string-end)
+ (progn
+ (po-mark-found-string "_")
+ (setq po-string-start nil))
+ (error (_"No such string"))))
+
+(defun po-select-mark-and-mark (arg)
+ (interactive "P")
+ "Mark last found string in program sources as translatable, ask for keywoard,
+using completion. With prefix argument, just ask the name of a preferred
+keyword for subsequent commands, also added to possible completions."
+ (if arg
+ (let ((keyword (list (read-from-minibuffer (_"Keyword: ")))))
+ (setq po-keywords (cons keyword (delete keyword po-keywords))))
+ (if (and po-string-start po-string-end)
+ (let* ((default (car (car po-keywords)))
+ (keyword (completing-read (format (_"Mark with keywoard? [%s] ")
+ default)
+ po-keywords nil t )))
+ (if (string-equal keyword "") (setq keyword default))
+ (po-mark-found-string keyword)
+ (setq po-string-start nil))
+ (error (_"No such string")))))
+
+;;; Miscellaneous features.
+
+(defun po-help ()
+ "Provide an help window for PO mode."
+ (interactive)
+ (po-with-temp-buffer
+ (insert po-help-display-string)
+ (goto-char (point-min))
+ (save-window-excursion
+ (switch-to-buffer (current-buffer))
+ (delete-other-windows)
+ (message (_"Type any character to continue"))
+ (po-read-event))))
+
+(defun po-undo ()
+ "Undo the last change to the PO file."
+ (interactive)
+ (let ((buffer-read-only po-read-only))
+ (undo))
+ (po-compute-counters nil))
+
+(defun po-statistics ()
+ "Say how many entries in each category, and the current position."
+ (interactive)
+ (po-compute-counters t))
+
+(defun po-validate ()
+ "Use `msgfmt' for validating the current PO file contents."
+ (interactive)
+
+ ;; If modifications were done already, change the last revision date.
+ (if (buffer-modified-p)
+ (po-replace-revision-date))
+
+ ;; This `let' is for protecting the previous value of compile-command.
+ (let ((compile-command (concat po-msgfmt-program
+ " --statistics -c -v -o /dev/null "
+ buffer-file-name)))
+ (compile compile-command)))
+
+(defun po-guess-archive-name ()
+ "Return the ideal file name for this PO file in the central archives."
+ (let (start-of-header end-of-header package version team)
+ (save-excursion
+ ;; Find the PO file header entry.
+ (goto-char (point-min))
+ (re-search-forward po-any-msgstr-regexp)
+ (setq start-of-header (match-beginning 0)
+ end-of-header (match-end 0))
+ ;; Get the package and version.
+ (goto-char start-of-header)
+ (if (re-search-forward
+ "\n\"Project-Id-Version:\\( GNU\\)? \\([^\n ]+\\) \\([^\n ]+\\)\\\\n\"$"
+ end-of-header t)
+ (setq package (buffer-substring (match-beginning 2) (match-end 2))
+ version (buffer-substring (match-beginning 3) (match-end 3))))
+ (if (or (not package) (string-equal package "PACKAGE")
+ (not version) (string-equal version "VERSION"))
+ (error (_"Project-Id-Version field does not have a proper value")))
+ ;; Get the team.
+ (goto-char start-of-header)
+ (if (re-search-forward "\n\"Language-Team:.*<\\(.*\\)@li.org>\\\\n\"$"
+ end-of-header t)
+ (setq team (buffer-substring (match-beginning 1) (match-end 1))))
+ (if (or (not team) (string-equal team "LL"))
+ (error (_"Language-Team field does not have a proper value")))
+ ;; Compose the name.
+ (concat package "-" version "." team ".po"))))
+
+(defun po-guess-team-address ()
+ "Return the team address related to this PO file."
+ (let (team)
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward po-any-msgstr-regexp)
+ (goto-char (match-beginning 0))
+ (if (re-search-forward
+ "\n\"Language-Team: +\\(.*<\\(.*\\)@li.org>\\)\\\\n\"$"
+ (match-end 0) t)
+ (setq team (buffer-substring (match-beginning 2) (match-end 2))))
+ (if (or (not team) (string-equal team "LL"))
+ (error (_"Language-Team field does not have a proper value")))
+ (buffer-substring (match-beginning 1) (match-end 1)))))
+
+(defun po-send-mail ()
+ "Start composing a letter, possibly including the current PO file."
+ (interactive)
+ (let* ((team-flag (y-or-n-p
+ (_"\
+Write to your team? (`n' means writing to translation project) ")))
+ (address (if team-flag
+ (po-guess-team-address)
+ po-translation-project-address)))
+ (if (not (y-or-n-p (_"Include current PO file? ")))
+ (apply po-compose-mail-function address
+ (read-string (_"Subject? ")) nil)
+ (if (buffer-modified-p)
+ (error (_"The file is not even saved, you did not validate it.")))
+ (if (and (y-or-n-p (_"You validated (`V') this file, didn't you? "))
+ (or (zerop po-untranslated-counter)
+ (y-or-n-p
+ (format (_"%d entries are untranslated, include anyway? ")
+ po-untranslated-counter)))
+ (or (zerop po-fuzzy-counter)
+ (y-or-n-p
+ (format (_"%d entries are still fuzzy, include anyway? ")
+ po-fuzzy-counter)))
+ (or (zerop po-obsolete-counter)
+ (y-or-n-p
+ (format (_"%d entries are obsolete, include anyway? ")
+ po-obsolete-counter))))
+ (let ((buffer (current-buffer))
+ (name (po-guess-archive-name))
+ (transient-mark-mode nil))
+ (apply po-compose-mail-function address
+ (if team-flag
+ (read-string (_"Subject? "))
+ (format "TP-Robot %s" name))
+ nil)
+ (goto-char (point-min))
+ (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator) "\n"))
+ (save-excursion
+ (insert-buffer buffer)
+ (shell-command-on-region
+ (region-beginning) (region-end)
+ (concat po-gzip-uuencode-command " " name ".gz") t))))))
+ (message ""))
+
+(defun po-confirm-and-quit ()
+ "Confirm if quit should be attempted and then, do it.
+This is a failsafe. Confirmation is asked if only the real quit would not."
+ (interactive)
+ (if (po-check-all-pending-edits)
+ (progn
+ (if (or (buffer-modified-p)
+ (> po-untranslated-counter 0)
+ (> po-fuzzy-counter 0)
+ (> po-obsolete-counter 0)
+ (y-or-n-p (_"Really quit editing this PO file? ")))
+ (po-quit))
+ (message ""))))
+
+(defun po-quit ()
+ "Save the PO file and kill buffer. However, offer validation if
+appropriate and ask confirmation if untranslated strings remain."
+ (interactive)
+ (if (po-check-all-pending-edits)
+ (let ((quit t))
+
+ ;; Offer validation of newly modified entries.
+ (if (and (buffer-modified-p)
+ (not (y-or-n-p
+ (_"File was modified; skip validation step? "))))
+ (progn
+ (message "")
+ (po-validate)
+ ;; If we knew that the validation was all successful, we should
+ ;; just quit. But since we do not know yet, as the validation
+ ;; might be asynchronous with PO mode commands, the safest is to
+ ;; stay within PO mode, even if this implies that another
+ ;; `po-quit' command will be later required to exit for true.
+ (setq quit nil)))
+
+ ;; Offer to work on untranslated entries.
+ (if (and quit
+ (or (> po-untranslated-counter 0)
+ (> po-fuzzy-counter 0)
+ (> po-obsolete-counter 0))
+ (not (y-or-n-p
+ (_"Unprocessed entries remain; quit anyway? "))))
+ (progn
+ (setq quit nil)
+ (po-auto-select-entry)))
+
+ ;; Clear message area.
+ (message "")
+
+ ;; Or else, kill buffers and quit for true.
+ (if quit
+ (progn
+ (and (buffer-modified-p) (po-replace-revision-date))
+ (save-buffer)
+ (kill-buffer (current-buffer)))))))
+
+;;; po-mode.el ends here
diff --git a/lib/printf-parse.h b/lib/printf-parse.h
new file mode 100644
index 0000000..d8ab2b7
--- /dev/null
+++ b/lib/printf-parse.h
@@ -0,0 +1,421 @@
+/* Internal header for parsing printf format strings.
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* We use some extension so define this here. */
+#define _GNU_SOURCE 1
+
+#include <ctype.h>
+#include <printf.h>
+#if STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#if STDC_HEADERS || HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#if __GNUC__ >= 2
+# define long_long_int long long int
+# define long_double long double
+#else
+# define long_long_int long
+# define long_double double
+#endif
+
+#ifndef MB_CUR_MAX
+# define MB_CUR_MAX (sizeof (long))
+#endif
+
+#define NDEBUG 1
+#include <assert.h>
+
+#ifndef MAX
+# if defined __GNU__ && __GNUC__ >= 2
+# define MAX(a,b) ({typeof(a) _a = (a); typeof(b) _b = (b); \
+ _a > _b ? _a : _b; })
+# else
+# define MAX(a,b) ((a) > (b) ? (a) : (b))
+# endif
+#endif
+#ifndef MIN
+# if defined __GNU__ && __GNUC__ >= 2
+# define MIN(a,b) ({typeof(a) _a = (a); typeof(b) _b = (b); \
+ _a < _b ? _a : _b; })
+# else
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+# endif
+#endif
+
+struct printf_spec
+ {
+ /* Information parsed from the format spec. */
+ struct printf_info info;
+
+ /* Pointers into the format string for the end of this format
+ spec and the next (or to the end of the string if no more). */
+ const char *end_of_fmt, *next_fmt;
+
+ /* Position of arguments for precision and width, or -1 if `info' has
+ the constant value. */
+ int prec_arg, width_arg;
+
+ int data_arg; /* Position of data argument. */
+ int data_arg_type; /* Type of first argument. */
+ /* Number of arguments consumed by this format specifier. */
+ size_t ndata_args;
+ };
+
+
+/* The various kinds off arguments that can be passed to printf. */
+union printf_arg
+ {
+ unsigned char pa_char;
+ short int pa_short_int;
+ int pa_int;
+ long int pa_long_int;
+ long_long_int pa_long_long_int;
+ unsigned short int pa_u_short_int;
+ unsigned int pa_u_int;
+ unsigned long int pa_u_long_int;
+ unsigned long_long_int pa_u_long_long_int;
+ float pa_float;
+ double pa_double;
+ long_double pa_long_double;
+ const char *pa_string;
+ void *pa_pointer;
+ };
+
+
+/* Prototype for local function. */
+static unsigned int read_int PARAMS ((const char **pstr));
+static const char *find_spec PARAMS ((const char *format));
+static inline size_t parse_one_spec PARAMS ((const char *format,
+ size_t posn,
+ struct printf_spec *spec,
+ size_t *max_ref_arg));
+
+
+/* Read a simple integer from a string and update the string pointer.
+ It is assumed that the first character is a digit. */
+static inline unsigned int
+read_int (pstr)
+ const char **pstr;
+{
+ unsigned int retval = **pstr - '0';
+
+ while (isdigit (*++(*pstr)))
+ {
+ retval *= 10;
+ retval += **pstr - '0';
+ }
+
+ return retval;
+}
+
+
+
+/* Find the next spec in FORMAT, or the end of the string. Returns
+ a pointer into FORMAT, to a '%' or a '\0'. */
+static inline const char *
+find_spec (format)
+ const char *format;
+{
+ while (*format != '\0' && *format != '%')
+ {
+ int len;
+
+#ifdef HAVE_MBLEN
+ if (isascii (*format) || (len = mblen (format, MB_CUR_MAX)) <= 0)
+ ++format;
+ else
+ format += len;
+#else
+ ++format;
+#endif
+ }
+ return format;
+}
+
+
+/* FORMAT must point to a '%' at the beginning of a spec. Fills in *SPEC
+ with the parsed details. POSN is the number of arguments already
+ consumed. At most MAXTYPES - POSN types are filled in TYPES. Return
+ the number of args consumed by this spec; *MAX_REF_ARG is updated so it
+ remains the highest argument index used. */
+static inline size_t
+parse_one_spec (format, posn, spec, max_ref_arg)
+ const char *format;
+ size_t posn;
+ struct printf_spec *spec;
+ size_t *max_ref_arg;
+{
+ unsigned int n;
+ size_t nargs = 0;
+
+ /* Skip the '%'. */
+ ++format;
+
+ /* Clear information structure. */
+ spec->data_arg = -1;
+ spec->info.alt = 0;
+ spec->info.space = 0;
+ spec->info.left = 0;
+ spec->info.showsign = 0;
+ spec->info.group = 0;
+ spec->info.pad = ' ';
+
+ /* Test for positional argument. */
+ if (isdigit (*format))
+ {
+ const char *begin = format;
+
+ n = read_int (&format);
+
+ if (n > 0 && *format == '$')
+ /* Is positional parameter. */
+ {
+ ++format; /* Skip the '$'. */
+ spec->data_arg = n - 1;
+ *max_ref_arg = MAX (*max_ref_arg, n);
+ }
+ else
+ /* Oops; that was actually the width and/or 0 padding flag.
+ Step back and read it again. */
+ format = begin;
+ }
+
+ /* Check for spec modifiers. */
+ while (*format == ' ' || *format == '+' || *format == '-' ||
+ *format == '#' || *format == '0' || *format == '\'')
+ switch (*format++)
+ {
+ case ' ':
+ /* Output a space in place of a sign, when there is no sign. */
+ spec->info.space = 1;
+ break;
+ case '+':
+ /* Always output + or - for numbers. */
+ spec->info.showsign = 1;
+ break;
+ case '-':
+ /* Left-justify things. */
+ spec->info.left = 1;
+ break;
+ case '#':
+ /* Use the "alternate form":
+ Hex has 0x or 0X, FP always has a decimal point. */
+ spec->info.alt = 1;
+ break;
+ case '0':
+ /* Pad with 0s. */
+ spec->info.pad = '0';
+ break;
+ case '\'':
+ /* Show grouping in numbers if the locale information
+ indicates any. */
+ spec->info.group = 1;
+ break;
+ }
+ if (spec->info.left)
+ spec->info.pad = ' ';
+
+ /* Get the field width. */
+ spec->width_arg = -1;
+ spec->info.width = 0;
+ if (*format == '*')
+ {
+ /* The field width is given in an argument.
+ A negative field width indicates left justification. */
+ const char *begin = ++format;
+
+ if (isdigit (*format))
+ {
+ /* The width argument might be found in a positional parameter. */
+ n = read_int (&format);
+
+ if (n > 0 && *format == '$')
+ {
+ spec->width_arg = n - 1;
+ *max_ref_arg = MAX (*max_ref_arg, n);
+ ++format; /* Skip '$'. */
+ }
+ }
+
+ if (spec->width_arg < 0)
+ {
+ /* Not in a positional parameter. Consume one argument. */
+ spec->width_arg = posn++;
+ ++nargs;
+ format = begin; /* Step back and reread. */
+ }
+ }
+ else if (isdigit (*format))
+ /* Constant width specification. */
+ spec->info.width = read_int (&format);
+
+ /* Get the precision. */
+ spec->prec_arg = -1;
+ /* -1 means none given; 0 means explicit 0. */
+ spec->info.prec = -1;
+ if (*format == '.')
+ {
+ ++format;
+ if (*format == '*')
+ {
+ /* The precision is given in an argument. */
+ const char *begin = ++format;
+
+ if (isdigit (*format))
+ {
+ n = read_int (&format);
+
+ if (n > 0 && *format == '$')
+ {
+ spec->prec_arg = n - 1;
+ *max_ref_arg = MAX (*max_ref_arg, n);
+ ++format;
+ }
+ }
+
+ if (spec->prec_arg < 0)
+ {
+ /* Not in a positional parameter. */
+ spec->prec_arg = posn++;
+ ++nargs;
+ format = begin;
+ }
+ }
+ else if (isdigit (*format))
+ spec->info.prec = read_int (&format);
+ else
+ /* "%.?" is treated like "%.0?". */
+ spec->info.prec = 0;
+ }
+
+ /* Check for type modifiers. */
+#define is_longlong is_long_double
+ spec->info.is_long_double = 0;
+ spec->info.is_short = 0;
+ spec->info.is_long = 0;
+
+ while (*format == 'h' || *format == 'l' || *format == 'L' ||
+ *format == 'Z' || *format == 'q')
+ switch (*format++)
+ {
+ case 'h':
+ /* int's are short int's. */
+ spec->info.is_short = 1;
+ break;
+ case 'l':
+ if (spec->info.is_long)
+ /* A double `l' is equivalent to an `L'. */
+ spec->info.is_longlong = 1;
+ else
+ /* int's are long int's. */
+ spec->info.is_long = 1;
+ break;
+ case 'L':
+ /* double's are long double's, and int's are long long int's. */
+ spec->info.is_long_double = 1;
+ break;
+ case 'Z':
+ /* int's are size_t's. */
+ assert (sizeof(size_t) <= sizeof(unsigned long_long_int));
+ spec->info.is_longlong = sizeof(size_t) > sizeof(unsigned long int);
+ spec->info.is_long = sizeof(size_t) > sizeof(unsigned int);
+ break;
+ case 'q':
+ /* 4.4 uses this for long long. */
+ spec->info.is_longlong = 1;
+ break;
+ }
+
+ /* Get the format specification. */
+ spec->info.spec = *format++;
+ /* Find the data argument types of a built-in spec. */
+ spec->ndata_args = 1;
+
+ switch (spec->info.spec)
+ {
+ case 'i':
+ case 'd':
+ case 'u':
+ case 'o':
+ case 'X':
+ case 'x':
+ if (spec->info.is_longlong)
+ spec->data_arg_type = PA_INT|PA_FLAG_LONG_LONG;
+ else if (spec->info.is_long)
+ spec->data_arg_type = PA_INT|PA_FLAG_LONG;
+ else if (spec->info.is_short)
+ spec->data_arg_type = PA_INT|PA_FLAG_SHORT;
+ else
+ spec->data_arg_type = PA_INT;
+ break;
+ case 'e':
+ case 'E':
+ case 'f':
+ case 'g':
+ case 'G':
+ if (spec->info.is_long_double)
+ spec->data_arg_type = PA_DOUBLE|PA_FLAG_LONG_DOUBLE;
+ else
+ spec->data_arg_type = PA_DOUBLE;
+ break;
+ case 'c':
+ spec->data_arg_type = PA_CHAR;
+ break;
+ case 's':
+ spec->data_arg_type = PA_STRING;
+ break;
+ case 'p':
+ spec->data_arg_type = PA_POINTER|PA_FLAG_PTR;
+ break;
+ case 'n':
+ spec->data_arg_type = PA_INT|PA_FLAG_PTR;
+ break;
+
+ case 'm':
+ default:
+ /* An unknown spec will consume no args. */
+ spec->ndata_args = 0;
+ break;
+ }
+
+ if (spec->data_arg == -1 && spec->ndata_args > 0)
+ {
+ /* There are args consumed, but no positional spec.
+ Use the next sequential arg position. */
+ spec->data_arg = posn;
+ posn += spec->ndata_args;
+ nargs += spec->ndata_args;
+ }
+
+ if (spec->info.spec == '\0')
+ /* Format ended before this spec was complete. */
+ spec->end_of_fmt = spec->next_fmt = format - 1;
+ else
+ {
+ /* Find the next format spec. */
+ spec->end_of_fmt = format;
+ spec->next_fmt = find_spec (format);
+ }
+
+ return nargs;
+}
diff --git a/lib/printf-prs.c b/lib/printf-prs.c
new file mode 100644
index 0000000..19869ca
--- /dev/null
+++ b/lib/printf-prs.c
@@ -0,0 +1,120 @@
+/* Copyright (C) 1991, 1992, 1995, 1996, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdio.h>
+#include <printf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <sys/param.h>
+
+#ifndef COMPILE_WPRINTF
+# define CHAR_T char
+# define UCHAR_T unsigned char
+# define INT_T int
+# define L_(Str) Str
+# define ISDIGIT(Ch) isdigit (Ch)
+# define ISASCII(Ch) isascii (Ch)
+# define MBRLEN(Cp, L, St) mbrlen (Cp, L, St)
+
+# ifdef USE_IN_LIBIO
+# define PUT(F, S, N) _IO_sputn (F, S, N)
+# define PAD(Padchar) \
+ if (width > 0) \
+ done += _IO_padn (s, Padchar, width)
+# else
+# define PUTC(C, F) putc (C, F)
+ssize_t __printf_pad __P ((FILE *, char pad, size_t n));
+# define PAD(Padchar) \
+ if (width > 0) \
+ { if (__printf_pad (s, Padchar, width) == -1) \
+ return -1; else done += width; }
+# endif
+#else
+# define vfprintf vfwprintf
+# define CHAR_T wchar_t
+# define UCHAR_T uwchar_t
+# define INT_T wint_t
+# define L_(Str) L##Str
+# define ISDIGIT(Ch) iswdigit (Ch)
+
+# ifdef USE_IN_LIBIO
+# define PUT(F, S, N) _IO_sputn (F, S, N)
+# define PAD(Padchar) \
+ if (width > 0) \
+ done += _IO_wpadn (s, Padchar, width)
+# else
+# define PUTC(C, F) wputc (C, F)
+ssize_t __wprintf_pad __P ((FILE *, wchar_t pad, size_t n));
+# define PAD(Padchar) \
+ if (width > 0) \
+ { if (__wprintf_pad (s, Padchar, width) == -1) \
+ return -1; else done += width; }
+# endif
+#endif
+
+#include "printf-parse.h"
+
+
+size_t
+parse_printf_format (fmt, n, argtypes)
+ const char *fmt;
+ size_t n;
+ int *argtypes;
+{
+ size_t nargs; /* Number of arguments. */
+ size_t max_ref_arg; /* Highest index used in a positional arg. */
+ struct printf_spec spec;
+ mbstate_t mbstate;
+
+ nargs = 0;
+ max_ref_arg = 0;
+
+ /* Search for format specifications. */
+ for (fmt = find_spec (fmt, &mbstate); *fmt != '\0'; fmt = spec.next_fmt)
+ {
+ /* Parse this spec. */
+ nargs += parse_one_spec (fmt, nargs, &spec, &max_ref_arg, &mbstate);
+
+ /* If the width is determined by an argument this is an int. */
+ if (spec.width_arg != -1 && (size_t) spec.width_arg < n)
+ argtypes[spec.width_arg] = PA_INT;
+
+ /* If the precision is determined by an argument this is an int. */
+ if (spec.prec_arg != -1 && (size_t) spec.prec_arg < n)
+ argtypes[spec.prec_arg] = PA_INT;
+
+ if ((size_t) spec.data_arg < n)
+ switch (spec.ndata_args)
+ {
+ case 0: /* No arguments. */
+ break;
+ case 1: /* One argument; we already have the type. */
+ argtypes[spec.data_arg] = spec.data_arg_type;
+ break;
+ default:
+ /* We have more than one argument for this format spec. We must
+ call the arginfo function again to determine all the types. */
+ (void) (*__printf_arginfo_table[spec.info.spec])
+ (&spec.info, n - spec.data_arg, &argtypes[spec.data_arg]);
+ break;
+ }
+ }
+
+ return MAX (nargs, max_ref_arg);
+}
diff --git a/lib/printf.h b/lib/printf.h
new file mode 100644
index 0000000..03b0035
--- /dev/null
+++ b/lib/printf.h
@@ -0,0 +1,108 @@
+/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _PRINTF_H
+
+#define _PRINTF_H 1
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+struct printf_info
+{
+ int prec; /* Precision. */
+ int width; /* Width. */
+ char spec; /* Format letter. */
+ unsigned is_long_double:1; /* L flag. */
+ unsigned is_short:1; /* h flag. */
+ unsigned is_long:1; /* l flag. */
+ unsigned alt:1; /* # flag. */
+ unsigned space:1; /* Space flag. */
+ unsigned left:1; /* - flag. */
+ unsigned showsign:1; /* + flag. */
+ unsigned group:1; /* ' flag. */
+ char pad; /* Padding character. */
+};
+
+
+/* Type of a printf specifier-handler function.
+ STREAM is the FILE on which to write output.
+ INFO gives information about the format specification.
+ Arguments can be read from ARGS.
+ The function should return the number of characters written,
+ or -1 for errors. */
+
+typedef int (*printf_function) PARAMS ((FILE * __stream,
+ const struct printf_info * __info,
+ const void **const __args));
+typedef int (*printf_arginfo_function) PARAMS ((const struct printf_info
+ *__info,
+ size_t __n,
+ int *__argtypes));
+
+/* Parse FMT, and fill in N elements of ARGTYPES with the
+ types needed for the conversions FMT specifies. Returns
+ the number of arguments required by FMT.
+
+ The ARGINFO function registered with a user-defined format is passed a
+ `struct printf_info' describing the format spec being parsed. A width
+ or precision of INT_MIN means a `*' was used to indicate that the
+ width/precision will come from an arg. The function should fill in the
+ array it is passed with the types of the arguments it wants, and return
+ the number of arguments it wants. */
+
+extern size_t parse_printf_format PARAMS ((const char *__fmt,
+ size_t __n,
+ int *__argtypes));
+
+/* Codes returned by `parse_printf_format' for basic types.
+
+ These values cover all the standard format specifications.
+ Users can add new values after PA_LAST for their own types. */
+
+enum
+{ /* C type: */
+ PA_INT, /* int */
+ PA_CHAR, /* int, cast to char */
+ PA_STRING, /* const char *, a '\0'-terminated string */
+ PA_POINTER, /* void * */
+ PA_FLOAT, /* float */
+ PA_DOUBLE, /* double */
+ PA_LAST
+};
+
+/* Flag bits that can be set in a type returned by `parse_printf_format'. */
+#define PA_FLAG_MASK 0xff00
+#define PA_FLAG_LONG_LONG (1 << 8)
+#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
+#define PA_FLAG_LONG (1 << 9)
+#define PA_FLAG_SHORT (1 << 10)
+#define PA_FLAG_PTR (1 << 11)
+
+
+#endif /* printf.h */
diff --git a/lib/stpcpy.c b/lib/stpcpy.c
new file mode 100644
index 0000000..0ad8863
--- /dev/null
+++ b/lib/stpcpy.c
@@ -0,0 +1,51 @@
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#undef __stpcpy
+#undef stpcpy
+
+#ifndef weak_alias
+# define __stpcpy stpcpy
+#endif
+
+/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
+char *
+__stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ register char *d = dest;
+ register const char *s = src;
+
+ do
+ *d++ = *s;
+ while (*s++ != '\0');
+
+ return d - 1;
+}
+#ifdef weak_alias
+weak_alias (__stpcpy, stpcpy)
+#endif
diff --git a/lib/stpncpy.c b/lib/stpncpy.c
new file mode 100644
index 0000000..fcbdfe5
--- /dev/null
+++ b/lib/stpncpy.c
@@ -0,0 +1,101 @@
+/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* This is almost copied from strncpy.c, written by Torbjorn Granlund. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# include <string.h>
+#else
+# include <sys/types.h>
+#endif
+
+#ifndef weak_alias
+# define __stpncpy stpncpy
+#endif
+
+/* Copy no more than N characters of SRC to DEST, returning the address of
+ the terminating '\0' in DEST, if any, or else DEST + N. */
+char *
+__stpncpy (dest, src, n)
+ char *dest;
+ const char *src;
+ size_t n;
+{
+ char c;
+ char *s = dest;
+
+ if (n >= 4)
+ {
+ size_t n4 = n >> 2;
+
+ for (;;)
+ {
+ c = *src++;
+ *dest++ = c;
+ if (c == '\0')
+ break;
+ c = *src++;
+ *dest++ = c;
+ if (c == '\0')
+ break;
+ c = *src++;
+ *dest++ = c;
+ if (c == '\0')
+ break;
+ c = *src++;
+ *dest++ = c;
+ if (c == '\0')
+ break;
+ if (--n4 == 0)
+ goto last_chars;
+ }
+ n -= dest - s;
+ goto zero_fill;
+ }
+
+ last_chars:
+ n &= 3;
+ if (n == 0)
+ return dest;
+
+ for (;;)
+ {
+ c = *src++;
+ --n;
+ *dest++ = c;
+ if (c == '\0')
+ break;
+ if (n == 0)
+ return dest;
+ }
+
+ zero_fill:
+ while (n-- > 0)
+ dest[n] = '\0';
+
+ return dest - 1;
+}
+#ifdef weak_alias
+weak_alias (__stpncpy, stpncpy)
+#endif
diff --git a/lib/strcasecmp.c b/lib/strcasecmp.c
new file mode 100644
index 0000000..776d62a
--- /dev/null
+++ b/lib/strcasecmp.c
@@ -0,0 +1,77 @@
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <string.h>
+
+#ifndef weak_alias
+# define __strcasecmp strcasecmp
+# define TOLOWER(Ch) tolower (Ch)
+#else
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define __strcasecmp __strcasecmp_l
+# define TOLOWER(Ch) __tolower_l ((Ch), loc)
+# else
+# define TOLOWER(Ch) tolower (Ch)
+# endif
+#endif
+
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define LOCALE_PARAM , loc
+# define LOCALE_PARAM_DECL __locale_t loc;
+#else
+# define LOCALE_PARAM
+# define LOCALE_PARAM_DECL
+#endif
+
+/* Compare S1 and S2, ignoring case, returning less than, equal to or
+ greater than zero if S1 is lexicographically less than,
+ equal to or greater than S2. */
+int
+__strcasecmp (s1, s2 LOCALE_PARAM)
+ const char *s1;
+ const char *s2;
+ LOCALE_PARAM_DECL
+{
+ const unsigned char *p1 = (const unsigned char *) s1;
+ const unsigned char *p2 = (const unsigned char *) s2;
+ unsigned char c1, c2;
+
+ if (p1 == p2)
+ return 0;
+
+ do
+ {
+ c1 = TOLOWER (*p1++);
+ c2 = TOLOWER (*p2++);
+ if (c1 == '\0')
+ break;
+ }
+ while (c1 == c2);
+
+ return c1 - c2;
+}
+#ifndef __strcasecmp
+weak_alias (__strcasecmp, strcasecmp)
+#endif
diff --git a/lib/strcspn.c b/lib/strcspn.c
new file mode 100644
index 0000000..6c2e0b8
--- /dev/null
+++ b/lib/strcspn.c
@@ -0,0 +1,52 @@
+/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined _LIBC || HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#undef strcspn
+
+/* Return the length of the maximum initial segment of S
+ which contains no characters from REJECT. */
+size_t
+strcspn (s, reject)
+ const char *s;
+ const char *reject;
+{
+ size_t count = 0;
+
+ while (*s != '\0')
+ if (strchr (reject, *s++) == NULL)
+ ++count;
+ else
+ return count;
+
+ return count;
+}
diff --git a/lib/strncasecmp.c b/lib/strncasecmp.c
new file mode 100644
index 0000000..52af434
--- /dev/null
+++ b/lib/strncasecmp.c
@@ -0,0 +1,80 @@
+/* Compare at most N characters of two strings without taking care for
+ the case.
+ Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <ctype.h>
+
+#ifndef weak_alias
+# define __strncasecmp strncasecmp
+# define TOLOWER(Ch) tolower (Ch)
+#else
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define __strncasecmp __strncasecmp_l
+# define TOLOWER(Ch) __tolower_l ((Ch), loc)
+# else
+# define TOLOWER(Ch) tolower (Ch)
+# endif
+#endif
+
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define LOCALE_PARAM , loc
+# define LOCALE_PARAM_DECL __locale_t loc;
+#else
+# define LOCALE_PARAM
+# define LOCALE_PARAM_DECL
+#endif
+
+/* Compare no more than N characters of S1 and S2,
+ ignoring case, returning less than, equal to or
+ greater than zero if S1 is lexicographically less
+ than, equal to or greater than S2. */
+int
+__strncasecmp (s1, s2, n LOCALE_PARAM)
+ const char *s1;
+ const char *s2;
+ size_t n;
+ LOCALE_PARAM_DECL
+{
+ const unsigned char *p1 = (const unsigned char *) s1;
+ const unsigned char *p2 = (const unsigned char *) s2;
+ unsigned char c1, c2;
+
+ if (p1 == p2 || n == 0)
+ return 0;
+
+ do
+ {
+ c1 = TOLOWER (*p1++);
+ c2 = TOLOWER (*p2++);
+ if (c1 == '\0' || c1 != c2)
+ return c1 - c2;
+ } while (--n > 0);
+
+ return c1 - c2;
+}
+#ifndef __strncasecmp
+weak_alias (__strncasecmp, strncasecmp)
+#endif
diff --git a/lib/strstr.c b/lib/strstr.c
new file mode 100644
index 0000000..03d6c8e
--- /dev/null
+++ b/lib/strstr.c
@@ -0,0 +1,125 @@
+/* Return the offset of one string within another.
+ Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * My personal strstr() implementation that beats most other algorithms.
+ * Until someone tells me otherwise, I assume that this is the
+ * fastest implementation of strstr() in C.
+ * I deliberately chose not to comment it. You should have at least
+ * as much fun trying to understand it, as I had to write it :-).
+ *
+ * Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined _LIBC || defined HAVE_STRING_H
+# include <string.h>
+#endif
+
+typedef unsigned chartype;
+
+#undef strstr
+
+char *
+strstr (phaystack, pneedle)
+ const char *phaystack;
+ const char *pneedle;
+{
+ register const unsigned char *haystack, *needle;
+ register chartype b, c;
+
+ haystack = (const unsigned char *) phaystack;
+ needle = (const unsigned char *) pneedle;
+
+ b = *needle;
+ if (b != '\0')
+ {
+ haystack--; /* possible ANSI violation */
+ do
+ {
+ c = *++haystack;
+ if (c == '\0')
+ goto ret0;
+ }
+ while (c != b);
+
+ c = *++needle;
+ if (c == '\0')
+ goto foundneedle;
+ ++needle;
+ goto jin;
+
+ for (;;)
+ {
+ register chartype a;
+ register const unsigned char *rhaystack, *rneedle;
+
+ do
+ {
+ a = *++haystack;
+ if (a == '\0')
+ goto ret0;
+ if (a == b)
+ break;
+ a = *++haystack;
+ if (a == '\0')
+ goto ret0;
+shloop: }
+ while (a != b);
+
+jin: a = *++haystack;
+ if (a == '\0')
+ goto ret0;
+
+ if (a != c)
+ goto shloop;
+
+ rhaystack = haystack-- + 1;
+ rneedle = needle;
+ a = *rneedle;
+
+ if (*rhaystack == a)
+ do
+ {
+ if (a == '\0')
+ goto foundneedle;
+ ++rhaystack;
+ a = *++needle;
+ if (*rhaystack != a)
+ break;
+ if (a == '\0')
+ goto foundneedle;
+ ++rhaystack;
+ a = *++needle;
+ }
+ while (*rhaystack == a);
+
+ needle = rneedle; /* took the register-poor approach */
+
+ if (a == '\0')
+ break;
+ }
+ }
+foundneedle:
+ return (char*) haystack;
+ret0:
+ return 0;
+}
diff --git a/lib/strtol.c b/lib/strtol.c
new file mode 100644
index 0000000..d49f1c6
--- /dev/null
+++ b/lib/strtol.c
@@ -0,0 +1,445 @@
+/* Convert string representation of a number into an integer value.
+ Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define USE_NUMBER_GROUPING
+# define STDC_HEADERS
+# define HAVE_LIMITS_H
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+# include <stdlib.h>
+# include <string.h>
+#else
+# ifndef NULL
+# define NULL 0
+# endif
+#endif
+
+#ifdef USE_NUMBER_GROUPING
+# include "../locale/localeinfo.h"
+#endif
+
+/* Nonzero if we are defining `strtoul' or `strtoull', operating on
+ unsigned integers. */
+#ifndef UNSIGNED
+# define UNSIGNED 0
+# define INT LONG int
+#else
+# define INT unsigned LONG int
+#endif
+
+/* Determine the name. */
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# if UNSIGNED
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol __wcstoull_l
+# else
+# define strtol __wcstoul_l
+# endif
+# else
+# ifdef QUAD
+# define strtol __strtoull_l
+# else
+# define strtol __strtoul_l
+# endif
+# endif
+# else
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol __wcstoll_l
+# else
+# define strtol __wcstol_l
+# endif
+# else
+# ifdef QUAD
+# define strtol __strtoll_l
+# else
+# define strtol __strtol_l
+# endif
+# endif
+# endif
+#else
+# if UNSIGNED
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol wcstoull
+# else
+# define strtol wcstoul
+# endif
+# else
+# ifdef QUAD
+# define strtol strtoull
+# else
+# define strtol strtoul
+# endif
+# endif
+# else
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol wcstoll
+# else
+# define strtol wcstol
+# endif
+# else
+# ifdef QUAD
+# define strtol strtoll
+# endif
+# endif
+# endif
+#endif
+
+/* If QUAD is defined, we are defining `strtoll' or `strtoull',
+ operating on `long long int's. */
+#ifdef QUAD
+# define LONG long long
+# undef LONG_MIN
+# define LONG_MIN LONG_LONG_MIN
+# undef LONG_MAX
+# define LONG_MAX LONG_LONG_MAX
+# undef ULONG_MAX
+# define ULONG_MAX ULONG_LONG_MAX
+# if __GNUC__ == 2 && __GNUC_MINOR__ < 7
+ /* Work around gcc bug with using this constant. */
+ static const unsigned long long int maxquad = ULONG_LONG_MAX;
+# undef ULONG_MAX
+# define ULONG_MAX maxquad
+# endif
+#else
+# define LONG long
+
+#ifndef ULONG_MAX
+# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
+#endif
+#ifndef LONG_MAX
+# define LONG_MAX ((long int) (ULONG_MAX >> 1))
+#endif
+#endif
+
+
+/* We use this code also for the extended locale handling where the
+ function gets as an additional argument the locale which has to be
+ used. To access the values we have to redefine the _NL_CURRENT
+ macro. */
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# undef _NL_CURRENT
+# define _NL_CURRENT(category, item) \
+ (current->values[_NL_ITEM_INDEX (item)].string)
+# define LOCALE_PARAM , loc
+# define LOCALE_PARAM_DECL __locale_t loc;
+#else
+# define LOCALE_PARAM
+# define LOCALE_PARAM_DECL
+#endif
+
+#if defined _LIBC || defined HAVE_WCHAR_H
+# include <wchar.h>
+#endif
+
+#ifdef USE_WIDE_CHAR
+# include <wctype.h>
+# define L_(Ch) L##Ch
+# define UCHAR_TYPE wint_t
+# define STRING_TYPE wchar_t
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define ISSPACE(Ch) __iswspace_l ((Ch), loc)
+# define ISALPHA(Ch) __iswalpha_l ((Ch), loc)
+# define TOUPPER(Ch) __towupper_l ((Ch), loc)
+# else
+# define ISSPACE(Ch) iswspace (Ch)
+# define ISALPHA(Ch) iswalpha (Ch)
+# define TOUPPER(Ch) towupper (Ch)
+# endif
+# else
+# if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
+# define IN_CTYPE_DOMAIN(c) 1
+# else
+# define IN_CTYPE_DOMAIN(c) isascii(c)
+# endif
+# define L_(Ch) Ch
+# define UCHAR_TYPE unsigned char
+# define STRING_TYPE char
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define ISSPACE(Ch) __isspace_l ((Ch), loc)
+# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
+# define TOUPPER(Ch) __toupper_l ((Ch), loc)
+# else
+# define ISSPACE(Ch) (IN_CTYPE_DOMAIN (Ch) && isspace (Ch))
+# define ISALPHA(Ch) (IN_CTYPE_DOMAIN (Ch) && isalpha (Ch))
+# define TOUPPER(Ch) (IN_CTYPE_DOMAIN (Ch) ? toupper (Ch) : (Ch))
+# endif
+#endif
+
+#ifdef __STDC__
+# define INTERNAL(X) INTERNAL1(X)
+# define INTERNAL1(X) __##X##_internal
+# define WEAKNAME(X) WEAKNAME1(X)
+#else
+# define INTERNAL(X) __/**/X/**/_internal
+#endif
+
+#ifdef USE_NUMBER_GROUPING
+/* This file defines a function to check for correct grouping. */
+# include "grouping.h"
+#endif
+
+
+
+/* Convert NPTR to an `unsigned long int' or `long int' in base BASE.
+ If BASE is 0 the base is determined by the presence of a leading
+ zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal.
+ If BASE is < 2 or > 36, it is reset to 10.
+ If ENDPTR is not NULL, a pointer to the character after the last
+ one converted is stored in *ENDPTR. */
+
+INT
+INTERNAL (strtol) (nptr, endptr, base, group LOCALE_PARAM)
+ const STRING_TYPE *nptr;
+ STRING_TYPE **endptr;
+ int base;
+ int group;
+ LOCALE_PARAM_DECL
+{
+ int negative;
+ register unsigned LONG int cutoff;
+ register unsigned int cutlim;
+ register unsigned LONG int i;
+ register const STRING_TYPE *s;
+ register UCHAR_TYPE c;
+ const STRING_TYPE *save, *end;
+ int overflow;
+
+#ifdef USE_NUMBER_GROUPING
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+ struct locale_data *current = loc->__locales[LC_NUMERIC];
+# endif
+ /* The thousands character of the current locale. */
+ wchar_t thousands = L'\0';
+ /* The numeric grouping specification of the current locale,
+ in the format described in <locale.h>. */
+ const char *grouping;
+
+ if (group)
+ {
+ grouping = _NL_CURRENT (LC_NUMERIC, GROUPING);
+ if (*grouping <= 0 || *grouping == CHAR_MAX)
+ grouping = NULL;
+ else
+ {
+ /* Figure out the thousands separator character. */
+# if defined _LIBC || defined _HAVE_BTOWC
+ thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP));
+ if (thousands == WEOF)
+ thousands = L'\0';
+# endif
+ if (thousands == L'\0')
+ grouping = NULL;
+ }
+ }
+ else
+ grouping = NULL;
+#endif
+
+ if (base < 0 || base == 1 || base > 36)
+ {
+ __set_errno (EINVAL);
+ return 0;
+ }
+
+ save = s = nptr;
+
+ /* Skip white space. */
+ while (ISSPACE (*s))
+ ++s;
+ if (*s == L_('\0'))
+ goto noconv;
+
+ /* Check for a sign. */
+ if (*s == L_('-'))
+ {
+ negative = 1;
+ ++s;
+ }
+ else if (*s == L_('+'))
+ {
+ negative = 0;
+ ++s;
+ }
+ else
+ negative = 0;
+
+ /* Recognize number prefix and if BASE is zero, figure it out ourselves. */
+ if (*s == L_('0'))
+ {
+ if (TOUPPER (s[1]) == L_('X'))
+ {
+ s += 2;
+ base = 16;
+ }
+ else if (base == 0)
+ base = 8;
+ }
+ else if (base == 0)
+ base = 10;
+
+ /* Save the pointer so we can check later if anything happened. */
+ save = s;
+
+#ifdef USE_NUMBER_GROUPING
+ if (group)
+ {
+ /* Find the end of the digit string and check its grouping. */
+ end = s;
+ for (c = *end; c != L_('\0'); c = *++end)
+ if ((wchar_t) c != thousands
+ && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
+ && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base))
+ break;
+ if (*s == thousands)
+ end = s;
+ else
+ end = correctly_grouped_prefix (s, end, thousands, grouping);
+ }
+ else
+#endif
+ end = NULL;
+
+ cutoff = ULONG_MAX / (unsigned LONG int) base;
+ cutlim = ULONG_MAX % (unsigned LONG int) base;
+
+ overflow = 0;
+ i = 0;
+ for (c = *s; c != L_('\0'); c = *++s)
+ {
+ if (s == end)
+ break;
+ if (c >= L_('0') && c <= L_('9'))
+ c -= L_('0');
+ else if (ISALPHA (c))
+ c = TOUPPER (c) - L_('A') + 10;
+ else
+ break;
+ if ((int) c >= base)
+ break;
+ /* Check for overflow. */
+ if (i > cutoff || (i == cutoff && c > cutlim))
+ overflow = 1;
+ else
+ {
+ i *= (unsigned LONG int) base;
+ i += c;
+ }
+ }
+
+ /* Check if anything actually happened. */
+ if (s == save)
+ goto noconv;
+
+ /* Store in ENDPTR the address of one character
+ past the last character we converted. */
+ if (endptr != NULL)
+ *endptr = (STRING_TYPE *) s;
+
+#if !UNSIGNED
+ /* Check for a value that is within the range of
+ `unsigned LONG int', but outside the range of `LONG int'. */
+ if (overflow == 0
+ && i > (negative
+ ? -((unsigned LONG int) (LONG_MIN + 1)) + 1
+ : (unsigned LONG int) LONG_MAX))
+ overflow = 1;
+#endif
+
+ if (overflow)
+ {
+ __set_errno (ERANGE);
+#if UNSIGNED
+ return ULONG_MAX;
+#else
+ return negative ? LONG_MIN : LONG_MAX;
+#endif
+ }
+
+ /* Return the result of the appropriate sign. */
+ return negative ? -i : i;
+
+noconv:
+ /* We must handle a special case here: the base is 0 or 16 and the
+ first two characters are '0' and 'x', but the rest are no
+ hexadecimal digits. This is no error case. We return 0 and
+ ENDPTR points to the `x`. */
+ if (endptr != NULL)
+ if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
+ && save[-2] == L_('0'))
+ *endptr = (STRING_TYPE *) &save[-1];
+ else
+ /* There was no number to convert. */
+ *endptr = (STRING_TYPE *) nptr;
+
+ return 0L;
+}
+
+/* External user entry point. */
+
+#if _LIBC - 0 == 0
+# undef PARAMS
+# if defined (__STDC__) && __STDC__
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+
+/* Prototype. */
+INT strtol PARAMS ((const STRING_TYPE *nptr, STRING_TYPE **endptr, int base));
+#endif
+
+
+INT
+#ifdef weak_function
+weak_function
+#endif
+strtol (nptr, endptr, base LOCALE_PARAM)
+ const STRING_TYPE *nptr;
+ STRING_TYPE **endptr;
+ int base;
+ LOCALE_PARAM_DECL
+{
+ return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM);
+}
diff --git a/lib/strtoul.c b/lib/strtoul.c
new file mode 100644
index 0000000..873f540
--- /dev/null
+++ b/lib/strtoul.c
@@ -0,0 +1,23 @@
+/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#define UNSIGNED 1
+
+#include <strtol.c>
diff --git a/lib/system.h b/lib/system.h
new file mode 100644
index 0000000..75c2ed8
--- /dev/null
+++ b/lib/system.h
@@ -0,0 +1,139 @@
+/* Header for GNU gettext libiberty
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _SYSTEM_H
+#define _SYSTEM_H 1
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#if defined STDC_HEADERS
+# include <stdlib.h>
+#else
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# endif
+unsigned long strtoul ();
+#endif
+
+/* Prototypes for helper functions. */
+extern FILE *open_po_file PARAMS ((const char *__input_name,
+ char **__file_name));
+
+/* Wrapper functions with error checking for standard functions. */
+extern char *xgetcwd PARAMS ((void));
+extern void *xmalloc PARAMS ((size_t __n));
+extern void *xrealloc PARAMS ((void *__p, size_t __n));
+extern char *xstrdup PARAMS ((const char *__string));
+extern char *stpcpy PARAMS ((char *__dst, const char *__src));
+extern char *stpncpy PARAMS ((char *__dst, const char *__src, size_t __n));
+extern size_t parse_printf_format PARAMS ((const char *__fmt, size_t __n,
+ int *__argtypes));
+extern int asprintf PARAMS ((char **, const char *, ...));
+extern int strcasecmp PARAMS ((const char *__s1, const char *__s2));
+extern int strncasecmp PARAMS ((const char *__s1, const char *__s2,
+ size_t __n));
+extern char *strstr PARAMS ((const char *__str, const char *__sub));
+
+#if STDC_HEADERS || HAVE_STRING_H
+# include <string.h>
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+#else
+# include <strings.h>
+#endif
+#if !HAVE_MEMCPY
+# ifndef memcpy
+# define memcpy(D, S, N) bcopy ((S), (D), (N))
+# endif
+#endif
+#if !HAVE_STRCHR
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#ifdef __GNUC__
+# ifndef alloca
+# define alloca __builtin_alloca
+# endif
+#else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifdef __hpux /* This section must match that of bison generated files. */
+# ifdef __cplusplus
+extern "C" void *alloca (unsigned int);
+# else /* not __cplusplus */
+void *alloca ();
+# endif /* not __cplusplus */
+# else /* not __hpux */
+# ifndef alloca
+char *alloca ();
+# endif
+# endif /* __hpux */
+# endif
+# endif
+#endif
+
+/* Before we define the following symbols we get the <limits.h> file if
+ available since otherwise we get redefinitions on some systems. */
+#if HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#ifndef MAX
+# if __STDC__ && defined __GNUC__ && __GNUC__ >= 2
+# define MAX(a,b) (__extension__ \
+ ({__typeof__ (a) _a = (a); \
+ __typeof__ (b) _b = (b); \
+ _a > _b ? _a : _b; \
+ }))
+# else
+# define MAX(a,b) ((a) > (b) ? (a) : (b))
+# endif
+#endif
+
+/* Some systems do not define EXIT_*, even with STDC_HEADERS. */
+#ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+#endif
+#ifndef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#endif
+
+
+/* When not using the GNU libc we use the basename implementation we
+ provide here. */
+#ifndef __GNU_LIBRARY__
+extern char *gnu_basename PARAMS ((const char *));
+# define basename(Arg) gnu_basename (Arg)
+#endif
+
+#endif
diff --git a/lib/vasprintf.c b/lib/vasprintf.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lib/vasprintf.c
diff --git a/lib/xgetcwd.c b/lib/xgetcwd.c
new file mode 100644
index 0000000..7ab2204
--- /dev/null
+++ b/lib/xgetcwd.c
@@ -0,0 +1,79 @@
+/* xgetcwd.c -- return current directory with unlimited length
+ Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
+#include <sys/types.h>
+#include "pathmax.h"
+
+#if HAVE_GETCWD
+char *getcwd ();
+#else
+char *getwd ();
+# define getcwd(Buf, Max) getwd (Buf)
+#endif
+
+/* Amount to increase buffer size by in each try. */
+#define PATH_INCR 32
+
+char *xmalloc ();
+char *xrealloc ();
+void free ();
+
+/* Return the current directory, newly allocated, arbitrarily long.
+ Return NULL and set errno on error. */
+
+char *
+xgetcwd ()
+{
+ char *cwd;
+ char *ret;
+ unsigned path_max;
+
+ errno = 0;
+ path_max = (unsigned) PATH_MAX;
+ path_max += 2; /* The getcwd docs say to do this. */
+
+ cwd = xmalloc (path_max);
+
+ errno = 0;
+ while ((ret = getcwd (cwd, path_max)) == NULL && errno == ERANGE)
+ {
+ path_max += PATH_INCR;
+ cwd = xrealloc (cwd, path_max);
+ errno = 0;
+ }
+
+ if (ret == NULL)
+ {
+ int save_errno = errno;
+ free (cwd);
+ errno = save_errno;
+ return NULL;
+ }
+ return cwd;
+}
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
new file mode 100644
index 0000000..8217c99
--- /dev/null
+++ b/lib/xmalloc.c
@@ -0,0 +1,129 @@
+/* xmalloc.c -- malloc with out of memory checking
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if __STDC__
+# define VOID void
+#else
+# define VOID char
+#endif
+
+#include <sys/types.h>
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#else
+VOID *calloc ();
+VOID *malloc ();
+VOID *realloc ();
+void free ();
+#endif
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define textdomain(Domain)
+# define _(Text) Text
+#endif
+
+#include "error.h"
+
+#ifndef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#endif
+
+/* Prototypes for functions defined here. */
+#if defined (__STDC__) && __STDC__
+static VOID *fixup_null_alloc (size_t n);
+VOID *xmalloc (size_t n);
+VOID *xcalloc (size_t n, size_t s);
+VOID *xrealloc (VOID *p, size_t n);
+#endif
+
+
+/* Exit value when the requested amount of memory is not available.
+ The caller may set it to some other value. */
+int xmalloc_exit_failure = EXIT_FAILURE;
+
+#if __STDC__ && (HAVE_VPRINTF || HAVE_DOPRNT)
+void error (int, int, const char *, ...);
+#else
+void error ();
+#endif
+
+static VOID *
+fixup_null_alloc (n)
+ size_t n;
+{
+ VOID *p;
+
+ p = 0;
+ if (n == 0)
+ p = malloc ((size_t) 1);
+ if (p == 0)
+ error (xmalloc_exit_failure, 0, _("Memory exhausted"));
+ return p;
+}
+
+/* Allocate N bytes of memory dynamically, with error checking. */
+
+VOID *
+xmalloc (n)
+ size_t n;
+{
+ VOID *p;
+
+ p = malloc (n);
+ if (p == 0)
+ p = fixup_null_alloc (n);
+ return p;
+}
+
+/* Allocate memory for N elements of S bytes, with error checking. */
+
+VOID *
+xcalloc (n, s)
+ size_t n, s;
+{
+ VOID *p;
+
+ p = calloc (n, s);
+ if (p == 0)
+ p = fixup_null_alloc (n);
+ return p;
+}
+
+/* Change the size of an allocated block of memory P to N bytes,
+ with error checking.
+ If P is NULL, run xmalloc. */
+
+VOID *
+xrealloc (p, n)
+ VOID *p;
+ size_t n;
+{
+ if (p == 0)
+ return xmalloc (n);
+ p = realloc (p, n);
+ if (p == 0)
+ p = fixup_null_alloc (n);
+ return p;
+}
diff --git a/lib/xstrdup.c b/lib/xstrdup.c
new file mode 100644
index 0000000..d5bcaf3
--- /dev/null
+++ b/lib/xstrdup.c
@@ -0,0 +1,42 @@
+/* xstrdup.c -- copy a string with out of memory checking
+ Copyright (C) 1990, 1996 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#if defined (__STDC__) && __STDC__
+char *xmalloc (size_t);
+char *xstrdup (char *string);
+#else
+char *xmalloc ();
+#endif
+
+/* Return a newly allocated copy of STRING. */
+
+char *
+xstrdup (string)
+ char *string;
+{
+ return strcpy (xmalloc (strlen (string) + 1), string);
+}
diff --git a/ltconfig b/ltconfig
new file mode 100755
index 0000000..a01334f
--- /dev/null
+++ b/ltconfig
@@ -0,0 +1,3078 @@
+#! /bin/sh
+
+# ltconfig - Create a system-specific libtool.
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A lot of this script is taken from autoconf-2.10.
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+echo=echo
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell.
+ exec "$SHELL" "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+fi
+
+# Find the correct PATH separator. Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" != Xset; then
+ UNAME=${UNAME-`uname 2>/dev/null`}
+ case X$UNAME in
+ *-DOS) PATH_SEPARATOR=';' ;;
+ *) PATH_SEPARATOR=':' ;;
+ esac
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+ echo_test_string="`eval $cmd`" &&
+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
+ break
+ fi
+ done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
+ test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for dir in $PATH /usr/ucb; do
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ echo='print -r'
+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running ltconfig again with it.
+ ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ echo='printf "%s\n"'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ echo=echo
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# The name of this program.
+progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
+
+# Constants:
+PROGRAM=ltconfig
+PACKAGE=libtool
+VERSION=1.3.4
+TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+rm="rm -f"
+
+help="Try \`$progname --help' for more information."
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+enable_shared=yes
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+enable_static=yes
+enable_fast_install=yes
+enable_dlopen=unknown
+enable_win32_dll=no
+ltmain=
+silent=
+srcdir=
+ac_config_guess=
+ac_config_sub=
+host=
+nonopt=
+ofile="$default_ofile"
+verify_host=yes
+with_gcc=no
+with_gnu_ld=no
+need_locks=yes
+ac_ext=c
+objext=o
+libext=a
+exeext=
+cache_file=
+
+old_AR="$AR"
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+old_CPPFLAGS="$CPPFLAGS"
+old_LDFLAGS="$LDFLAGS"
+old_LD="$LD"
+old_LN_S="$LN_S"
+old_LIBS="$LIBS"
+old_NM="$NM"
+old_RANLIB="$RANLIB"
+old_DLLTOOL="$DLLTOOL"
+old_OBJDUMP="$OBJDUMP"
+old_AS="$AS"
+
+# Parse the command line options.
+args=
+prev=
+for option
+do
+ case "$option" in
+ -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ eval "$prev=\$option"
+ prev=
+ continue
+ fi
+
+ case "$option" in
+ --help) cat <<EOM
+Usage: $progname [OPTION]... [HOST [LTMAIN]]
+
+Generate a system-specific libtool script.
+
+ --debug enable verbose shell tracing
+ --disable-shared do not build shared libraries
+ --disable-static do not build static libraries
+ --disable-fast-install do not optimize for fast installation
+ --enable-dlopen enable dlopen support
+ --enable-win32-dll enable building dlls on win32 hosts
+ --help display this help and exit
+ --no-verify do not verify that HOST is a valid host type
+-o, --output=FILE specify the output file [default=$default_ofile]
+ --quiet same as \`--silent'
+ --silent do not print informational messages
+ --srcdir=DIR find \`config.guess' in DIR
+ --version output version information and exit
+ --with-gcc assume that the GNU C compiler will be used
+ --with-gnu-ld assume that the C compiler uses the GNU linker
+ --disable-lock disable file locking
+ --cache-file=FILE configure cache file
+
+LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
+that provides basic libtool functionality.
+
+HOST is the canonical host system name [default=guessed].
+EOM
+ exit 0
+ ;;
+
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
+ --disable-shared) enable_shared=no ;;
+
+ --disable-static) enable_static=no ;;
+
+ --disable-fast-install) enable_fast_install=no ;;
+
+ --enable-dlopen) enable_dlopen=yes ;;
+
+ --enable-win32-dll) enable_win32_dll=yes ;;
+
+ --quiet | --silent) silent=yes ;;
+
+ --srcdir) prev=srcdir ;;
+ --srcdir=*) srcdir="$optarg" ;;
+
+ --no-verify) verify_host=no ;;
+
+ --output | -o) prev=ofile ;;
+ --output=*) ofile="$optarg" ;;
+
+ --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
+
+ --with-gcc) with_gcc=yes ;;
+ --with-gnu-ld) with_gnu_ld=yes ;;
+
+ --disable-lock) need_locks=no ;;
+
+ --cache-file=*) cache_file="$optarg" ;;
+
+ -*)
+ echo "$progname: unrecognized option \`$option'" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *)
+ if test -z "$ltmain"; then
+ ltmain="$option"
+ elif test -z "$host"; then
+# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
+# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
+# echo "$progname: warning \`$option' is not a valid host type" 1>&2
+# fi
+ host="$option"
+ else
+ echo "$progname: too many arguments" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi ;;
+ esac
+done
+
+if test -z "$ltmain"; then
+ echo "$progname: you must specify a LTMAIN file" 1>&2
+ echo "$help" 1>&2
+ exit 1
+fi
+
+if test ! -f "$ltmain"; then
+ echo "$progname: \`$ltmain' does not exist" 1>&2
+ echo "$help" 1>&2
+ exit 1
+fi
+
+# Quote any args containing shell metacharacters.
+ltconfig_args=
+for arg
+do
+ case "$arg" in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ltconfig_args="$ltconfig_args '$arg'" ;;
+ *) ltconfig_args="$ltconfig_args $arg" ;;
+ esac
+done
+
+# A relevant subset of AC_INIT.
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 5 compiler messages saved in config.log
+# 6 checking for... messages and results
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>>./config.log
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
+if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
+
+if test -n "$cache_file" && test -r "$cache_file"; then
+ echo "loading cache $cache_file within ltconfig"
+ . $cache_file
+fi
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+if test -z "$srcdir"; then
+ # Assume the source directory is the same one as the path to LTMAIN.
+ srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
+ test "$srcdir" = "$ltmain" && srcdir=.
+fi
+
+trap "$rm conftest*; exit 1" 1 2 15
+if test "$verify_host" = yes; then
+ # Check for config.guess and config.sub.
+ ac_aux_dir=
+ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/config.guess; then
+ ac_aux_dir=$ac_dir
+ break
+ fi
+ done
+ if test -z "$ac_aux_dir"; then
+ echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi
+ ac_config_guess=$ac_aux_dir/config.guess
+ ac_config_sub=$ac_aux_dir/config.sub
+
+ # Make sure we can run config.sub.
+ if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else
+ echo "$progname: cannot run $ac_config_sub" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi
+
+ echo $ac_n "checking host system type""... $ac_c" 1>&6
+
+ host_alias=$host
+ case "$host_alias" in
+ "")
+ if host_alias=`$SHELL $ac_config_guess`; then :
+ else
+ echo "$progname: cannot guess host type; you must specify one" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi ;;
+ esac
+ host=`$SHELL $ac_config_sub $host_alias`
+ echo "$ac_t$host" 1>&6
+
+ # Make sure the host verified.
+ test -z "$host" && exit 1
+
+elif test -z "$host"; then
+ echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
+ echo "$help" 1>&2
+ exit 1
+else
+ host_alias=$host
+fi
+
+# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+case "$host_os" in
+linux-gnu*) ;;
+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+esac
+
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+case "$host_os" in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR cru $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+# Set a sane default for `AR'.
+test -z "$AR" && AR=ar
+
+# Set a sane default for `OBJDUMP'.
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+# If RANLIB is not set, then run the test.
+if test "${RANLIB+set}" != "set"; then
+ result=no
+
+ echo $ac_n "checking for ranlib... $ac_c" 1>&6
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
+ RANLIB="ranlib"
+ result="ranlib"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ echo "$ac_t$result" 1>&6
+fi
+
+if test -n "$RANLIB"; then
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+fi
+
+# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$AS" && AS=as
+
+# Check to see if we are using GCC.
+if test "$with_gcc" != yes || test -z "$CC"; then
+ # If CC is not set, then try to find GCC or a usable CC.
+ if test -z "$CC"; then
+ echo $ac_n "checking for gcc... $ac_c" 1>&6
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
+ CC="gcc"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test -n "$CC"; then
+ echo "$ac_t$CC" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+ fi
+
+ # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
+ if test -z "$CC"; then
+ echo $ac_n "checking for cc... $ac_c" 1>&6
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ cc_rejected=no
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
+ if test "$dir/cc" = "/usr/ucb/cc"; then
+ cc_rejected=yes
+ continue
+ fi
+ CC="cc"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test $cc_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same name, so the bogon will be chosen
+ # first if we set CC to just the name; use the full file name.
+ shift
+ set dummy "$dir/cc" "$@"
+ shift
+ CC="$@"
+ fi
+ fi
+
+ if test -n "$CC"; then
+ echo "$ac_t$CC" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+
+ if test -z "$CC"; then
+ echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
+ exit 1
+ fi
+ fi
+
+ # Now see if the compiler is really GCC.
+ with_gcc=no
+ echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
+ echo "$progname:581: checking whether we are using GNU C" >&5
+
+ $rm conftest.c
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+ if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ with_gcc=yes
+ fi
+ $rm conftest.c
+ echo "$ac_t$with_gcc" 1>&6
+fi
+
+# Allow CC to be a program name with arguments.
+set dummy $CC
+compiler="$2"
+
+echo $ac_n "checking for object suffix... $ac_c" 1>&6
+$rm conftest*
+echo 'int i = 1;' > conftest.c
+echo "$progname:603: checking for object suffix" >& 5
+if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
+ # Append any warnings to the config.log.
+ cat conftest.err 1>&5
+
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ cat conftest.err 1>&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+fi
+$rm conftest*
+echo "$ac_t$objext" 1>&6
+
+echo $ac_n "checking for executable suffix... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_exeext="no"
+ $rm conftest*
+ echo 'main () { return 0; }' > conftest.c
+ echo "$progname:629: checking for executable suffix" >& 5
+ if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
+ # Append any warnings to the config.log.
+ cat conftest.err 1>&5
+
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c | *.err | *.$objext ) ;;
+ *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+ else
+ cat conftest.err 1>&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ $rm conftest*
+fi
+if test "X$ac_cv_exeext" = Xno; then
+ exeext=""
+else
+ exeext="$ac_cv_exeext"
+fi
+echo "$ac_t$ac_cv_exeext" 1>&6
+
+echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
+pic_flag=
+special_shlib_compile_flags=
+wl=
+link_static_flag=
+no_builtin_flag=
+
+if test "$with_gcc" = yes; then
+ wl='-Wl,'
+ link_static_flag='-static'
+
+ case "$host_os" in
+ beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ aix*)
+ # Below there is a dirty hack to force normal static linking with -ldl
+ # The problem is because libdl dynamically linked with both libc and
+ # libC (AIX C++ library), which obviously doesn't included in libraries
+ # list by gcc. This cause undefined symbols with -static flags.
+ # This hack allows C programs to be linked with "-static -ldl", but
+ # we not sure about C++ programs.
+ link_static_flag="$link_static_flag ${wl}-lC"
+ ;;
+ cygwin* | mingw* | os2*)
+ # We can build DLLs from non-PIC.
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ pic_flag='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ pic_flag=-Kconform_pic
+ fi
+ ;;
+ *)
+ pic_flag='-fPIC'
+ ;;
+ esac
+else
+ # PORTME Check for PIC flags for the system compiler.
+ case "$host_os" in
+ aix3* | aix4*)
+ # All AIX code is PIC.
+ link_static_flag='-bnso -bI:/lib/syscalls.exp'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ # Is there a better link_static_flag that works with the bundled CC?
+ wl='-Wl,'
+ link_static_flag="${wl}-a ${wl}archive"
+ pic_flag='+Z'
+ ;;
+
+ irix5* | irix6*)
+ wl='-Wl,'
+ link_static_flag='-non_shared'
+ # PIC (with -KPIC) is the default.
+ ;;
+
+ cygwin* | mingw* | os2*)
+ # We can build DLLs from non-PIC.
+ ;;
+
+ osf3* | osf4* | osf5*)
+ # All OSF/1 code is PIC.
+ wl='-Wl,'
+ link_static_flag='-non_shared'
+ ;;
+
+ sco3.2v5*)
+ pic_flag='-Kpic'
+ link_static_flag='-dn'
+ special_shlib_compile_flags='-belf'
+ ;;
+
+ solaris*)
+ pic_flag='-KPIC'
+ link_static_flag='-Bstatic'
+ wl='-Wl,'
+ ;;
+
+ sunos4*)
+ pic_flag='-PIC'
+ link_static_flag='-Bstatic'
+ wl='-Qoption ld '
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ pic_flag='-KPIC'
+ link_static_flag='-Bstatic'
+ wl='-Wl,'
+ ;;
+
+ uts4*)
+ pic_flag='-pic'
+ link_static_flag='-Bstatic'
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ pic_flag='-Kconform_pic'
+ link_static_flag='-Bstatic'
+ fi
+ ;;
+ *)
+ can_build_shared=no
+ ;;
+ esac
+fi
+
+if test -n "$pic_flag"; then
+ echo "$ac_t$pic_flag" 1>&6
+
+ # Check to make sure the pic_flag actually works.
+ echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $pic_flag -DPIC"
+ echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
+ if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+ # Append any warnings to the config.log.
+ cat conftest.err 1>&5
+
+ case "$host_os" in
+ hpux9* | hpux10* | hpux11*)
+ # On HP-UX, both CC and GCC only warn that PIC is supported... then they
+ # create non-PIC objects. So, if there were any warnings, we assume that
+ # PIC is not supported.
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ can_build_shared=no
+ pic_flag=
+ else
+ echo "$ac_t"yes 1>&6
+ pic_flag=" $pic_flag"
+ fi
+ ;;
+ *)
+ echo "$ac_t"yes 1>&6
+ pic_flag=" $pic_flag"
+ ;;
+ esac
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ can_build_shared=no
+ pic_flag=
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+else
+ echo "$ac_t"none 1>&6
+fi
+
+# Check to see if options -o and -c are simultaneously supported by compiler
+echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
+$rm -r conftest 2>/dev/null
+mkdir conftest
+cd conftest
+$rm conftest*
+echo "int some_variable = 0;" > conftest.c
+mkdir out
+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+# that will create temporary files in the current directory regardless of
+# the output directory. Thus, making CWD read-only will cause this test
+# to fail, enabling locking or at least warning the user not to do parallel
+# builds.
+chmod -w .
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -o out/conftest2.o"
+echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
+if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s out/conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_c_o=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_c_o=yes
+ fi
+else
+ # Append any errors to the config.log.
+ cat out/conftest.err 1>&5
+ compiler_c_o=no
+ echo "$ac_t"no 1>&6
+fi
+CFLAGS="$save_CFLAGS"
+chmod u+w .
+$rm conftest* out/*
+rmdir out
+cd ..
+rmdir conftest
+$rm -r conftest 2>/dev/null
+
+if test x"$compiler_c_o" = x"yes"; then
+ # Check to see if we can write to a .lo
+ echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -c -o conftest.lo"
+ echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
+if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_o_lo=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_o_lo=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_o_lo=no
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+else
+ compiler_o_lo=no
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links="nottested"
+if test "$compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
+ hard_links=yes
+ $rm conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$ac_t$hard_links" 1>&6
+ $rm conftest*
+ if test "$hard_links" = no; then
+ echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+if test "$with_gcc" = yes; then
+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
+ echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
+ echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+ if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_rtti_exceptions=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_rtti_exceptions=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_rtti_exceptions=no
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+
+ if test "$compiler_rtti_exceptions" = "yes"; then
+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
+ else
+ no_builtin_flag=' -fno-builtin'
+ fi
+
+fi
+
+# Check for any special shared library compilation flags.
+if test -n "$special_shlib_compile_flags"; then
+ echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
+ if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
+ else
+ echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
+ can_build_shared=no
+ fi
+fi
+
+echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
+$rm conftest*
+echo 'main(){return(0);}' > conftest.c
+save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $link_static_flag"
+echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ echo "$ac_t$link_static_flag" 1>&6
+else
+ echo "$ac_t"none 1>&6
+ link_static_flag=
+fi
+LDFLAGS="$save_LDFLAGS"
+$rm conftest*
+
+if test -z "$LN_S"; then
+ # Check to see if we can use ln -s, or we need hard links.
+ echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
+ $rm conftest.dat
+ if ln -s X conftest.dat 2>/dev/null; then
+ $rm conftest.dat
+ LN_S="ln -s"
+ else
+ LN_S=ln
+ fi
+ if test "$LN_S" = "ln -s"; then
+ echo "$ac_t"yes 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+fi
+
+# Make sure LD is an absolute path.
+if test -z "$LD"; then
+ ac_prog=ld
+ if test "$with_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
+ echo "$progname:991: checking for ld used by GCC" >&5
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we are not using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+ elif test "$with_gnu_ld" = yes; then
+ echo $ac_n "checking for GNU ld... $ac_c" 1>&6
+ echo "$progname:1015: checking for GNU ld" >&5
+ else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+ echo "$progname:1018: checking for non-GNU ld" >&5
+ fi
+
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ fi
+
+ if test -n "$LD"; then
+ echo "$ac_t$LD" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+
+ if test -z "$LD"; then
+ echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
+ exit 1
+ fi
+fi
+
+# Check to see if it really is or is not GNU ld.
+echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
+# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+echo "$ac_t$with_gnu_ld" 1>&6
+
+# See if the linker supports building shared libraries.
+echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
+
+allow_undefined_flag=
+no_undefined_flag=
+need_lib_prefix=unknown
+need_version=unknown
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+archive_cmds=
+archive_expsym_cmds=
+old_archive_from_new_cmds=
+export_dynamic_flag_spec=
+whole_archive_flag_spec=
+thread_safe_flag_spec=
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+hardcode_shlibpath_var=unsupported
+runpath_var=
+always_export_symbols=no
+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+# include_expsyms should be a list of space-separated symbols to be *always*
+# included in the symbol list
+include_expsyms=
+# exclude_expsyms can be an egrep regular expression of symbols to exclude
+# it will be wrapped by ` (' and `)$', so one must not match beginning or
+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+# as well as any symbol that contains `d'.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+# platforms (ab)use it in PIC code, but their linkers get confused if
+# the symbol is explicitly referenced. Since portable code cannot
+# rely on this symbol name, it's probably fine to never include it in
+# preloaded symbol tables.
+
+case "$host_os" in
+cygwin* | mingw*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$with_gcc" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # See if GNU ld supports shared libraries.
+ case "$host_os" in
+ aix3* | aix4*)
+ # On AIX, the GNU linker is very broken
+ ld_shlibs=no
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ ;;
+
+ amigaos*)
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can use
+ # them.
+ ld_shlibs=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+
+ # Extract the symbol export list from an `--export-all' def file,
+ # then regenerate the def file from the symbol export list, so that
+ # the compiled dll only exports the symbol export list.
+ export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
+ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
+ $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
+
+ archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
+ _lt_hint=1;
+ for symbol in `cat $export_symbols`; do
+ echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
+ _lt_hint=`expr 1 + \$_lt_hint`;
+ done~
+ test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
+ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
+ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+ $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
+
+ old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
+ # can we support soname and/or expsyms with a.out? -oliva
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = yes; then
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ case $host_os in
+ cygwin* | mingw*)
+ # dlltool doesn't understand --whole-archive et. al.
+ whole_archive_flag_spec=
+ ;;
+ *)
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ ;;
+ esac
+ fi
+else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case "$host_os" in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$with_gcc" = yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix4*)
+ hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
+ hardcode_libdir_separator=':'
+ if test "$with_gcc" = yes; then
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ shared_flag='-shared'
+ else
+ shared_flag='${wl}-bM:SRE'
+ hardcode_direct=yes
+ fi
+ allow_undefined_flag=' ${wl}-berok'
+ archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
+ archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
+ case "$host_os" in aix4.[01]|aix4.[01].*)
+ # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
+ always_export_symbols=yes ;;
+ esac
+ ;;
+
+ amigaos*)
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+
+ cygwin* | mingw*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib /OUT:$oldlib$oldobjs'
+ fix_srcfile_path='`cygpath -w $srcfile`'
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ case "$host_os" in
+ hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
+ esac
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_minus_L=yes # Not in the search PATH, but as the default
+ # location of the library.
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ irix5* | irix6*)
+ if test "$with_gcc" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
+ fi
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ openbsd*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$with_gcc" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # As osf3* with the addition of the -msym flag
+ if test "$with_gcc" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ sco3.2v5*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case "$host_os" in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv5*)
+ no_undefined_flag=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+ hardcode_libdir_flag_spec=
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
+ hardcode_direct=yes
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ unixware7*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+echo "$ac_t$ld_shlibs" 1>&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+if test -z "$NM"; then
+ echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
+ case "$NM" in
+ [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -B"
+ break
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -p"
+ break
+ else
+ NM=${NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$NM" && NM=nm
+ ;;
+ esac
+ echo "$ac_t$NM" 1>&6
+fi
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
+
+# Define system-specific variables.
+case "$host_os" in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*) # Its linker distinguishes data from code symbols
+ global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
+ ;;
+irix*)
+ symcode='[BCDEGRST]'
+ ;;
+solaris*)
+ symcode='[BDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+ symcode='[ABCDGISTW]'
+fi
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Write the raw and C identifiers.
+ global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+ $rm conftest*
+ cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+ echo "$progname:1635: checking if global_symbol_pipe works" >&5
+ if { (eval echo $progname:1636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { echo "$progname:1639: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.c
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
+
+ cat <<EOF >> conftest.c
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+ sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
+ cat <<\EOF >> conftest.c
+ {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$objext conftstm.$objext
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$objext"
+ CFLAGS="$CFLAGS$no_builtin_flag"
+ if { (eval echo $progname:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ pipe_works=yes
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ LIBS="$save_LIBS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ $rm conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ global_symbol_pipe=
+ fi
+done
+if test "$pipe_works" = yes; then
+ echo "${ac_t}ok" 1>&6
+else
+ echo "${ac_t}failed" 1>&6
+fi
+
+if test -z "$global_symbol_pipe"; then
+ global_symbol_to_cdecl=
+fi
+
+# Check hardcoding attributes.
+echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+ test -n "$runpath_var"; then
+
+ # We can hardcode non-existant directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$hardcode_shlibpath_var" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+echo "$ac_t$hardcode_action" 1>&6
+
+
+reload_flag=
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
+# PORTME Some linkers may need a different reload flag.
+reload_flag='-r'
+echo "$ac_t$reload_flag" 1>&6
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
+# PORTME Fill in your ld.so characteristics
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+file_magic_cmd=
+file_magic_test_file=
+deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
+case "$host_os" in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}.so$major'
+ ;;
+
+aix4*)
+ version_type=linux
+ # AIX has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ # We preserve .a as extension for shared libraries though AIX4.2
+ # and later linker supports .so
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
+ shlibpath_var=LIBPATH
+ deplibs_check_method=pass_all
+ ;;
+
+amigaos*)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+ ;;
+
+beos*)
+ library_names_spec='${libname}.so'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ deplibs_check_method=pass_all
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+bsdi4*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/shlib/libc.so
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ export_dynamic_flag_spec=-rdynamic
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw*)
+ version_type=windows
+ need_version=no
+ need_lib_prefix=no
+ if test "$with_gcc" = yes; then
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
+ else
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+ fi
+ dynamic_linker='Win32 ld.exe'
+ deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ file_magic_cmd='${OBJDUMP} -f'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ version_type=freebsd-$objformat
+ case "$version_type" in
+ freebsd-elf*)
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /usr/lib/libc.so*`
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ deplibs_check_method=unknown
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case "$host_os" in
+ freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ *) # from 3.2 on
+ shlibpath_overrides_runpath=no
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ dynamic_linker="$host_os dld.sl"
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
+ soname_spec='${libname}${release}.sl$major'
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+irix5* | irix6*)
+ version_type=irix
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}.so.$major'
+ library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
+ case "$host_os" in
+ irix5*)
+ libsuff= shlibsuff=
+ # this will be overridden with pass_all, but let us keep it just in case
+ deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case "$LD" in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ deplibs_check_method='pass_all'
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+
+ if test -f /lib/ld.so.1; then
+ dynamic_linker='GNU ld.so'
+ else
+ # Only the GNU ld.so supports shared libraries on MkLinux.
+ case "$host_cpu" in
+ powerpc*) dynamic_linker=no ;;
+ *) dynamic_linker='Linux ld.so' ;;
+ esac
+ fi
+ ;;
+
+netbsd*)
+ version_type=sunos
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
+ soname_spec='${libname}${release}.so$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+openbsd*)
+ version_type=sunos
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ need_version=no
+ fi
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+os2*)
+ libname_spec='$name'
+ need_lib_prefix=no
+ library_names_spec='$libname.dll $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_version=no
+ soname_spec='${libname}${release}.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ # this will be overridden with pass_all, but let us keep it just in case
+ deplibs_check_method='file_magic COFF format alpha shared library'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/shlib/libc.so
+ deplibs_check_method='pass_all'
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+sco3.2v5*)
+ version_type=osf
+ soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/lib/libc.so
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case "$host_vendor" in
+ ncr)
+ deplibs_check_method='pass_all'
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ esac
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
+ soname_spec='$libname.so.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$ac_t$dynamic_linker" 1>&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+# Report the final consequences.
+echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
+
+# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
+# configure.in, otherwise build static only libraries.
+case "$host_os" in
+cygwin* | mingw* | os2*)
+ if test x$can_build_shared = xyes; then
+ test x$enable_win32_dll = xno && can_build_shared=no
+ echo "checking if package supports dlls... $can_build_shared" 1>&6
+ fi
+;;
+esac
+
+if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+fi
+
+echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+aix4*)
+ test "$enable_shared" = yes && enable_static=no
+ ;;
+esac
+
+echo "$ac_t$enable_shared" 1>&6
+
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+
+echo "checking whether to build static libraries... $enable_static" 1>&6
+
+if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+echo $ac_n "checking for objdir... $ac_c" 1>&6
+rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+echo "$ac_t$objdir" 1>&6
+
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
+ lt_cv_dlopen=no lt_cv_dlopen_libs=
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "$progname:2212: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2220 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo $progname:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dlopen""... $ac_c" 1>&6
+echo "$progname:2252: checking for dlopen" >&5
+if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2257 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+dlopen();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_dlopen=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_dlopen=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dlopen"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
+echo "$progname:2299: checking for dld_link in -ldld" >&5
+ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldld $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2307 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link();
+
+int main() {
+dld_link()
+; return 0; }
+EOF
+if { (eval echo $progname:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load""... $ac_c" 1>&6
+echo "$progname:2339: checking for shl_load" >&5
+if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2344 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+shl_load();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_shl_load=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_shl_load=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="shl_load"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
+echo "$progname:2387: checking for shl_load in -ldld" >&5
+ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldld $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2395 "ltconfig"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load();
+
+int main() {
+shl_load()
+; return 0; }
+EOF
+if { (eval echo $progname:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+fi
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ fi
+
+ case "$lt_cv_dlopen" in
+ dlopen)
+for ac_hdr in dlfcn.h; do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "$progname:2452: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2457 "ltconfig"
+#include <$ac_hdr>
+int fnord = 0;
+EOF
+ac_try="$ac_compile >/dev/null 2>conftest.out"
+{ (eval echo $progname:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ if test "x$ac_cv_header_dlfcn_h" = xyes; then
+ CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ fi
+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2490: checking whether a program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ lt_cv_dlopen_self=cross
+ else
+ cat > conftest.c <<EOF
+#line 2498 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LTDL_GLOBAL DL_GLOBAL
+# else
+# define LTDL_GLOBAL 0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LTDL_LAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LTDL_LAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LTDL_LAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LTDL_LAZY_OR_NOW DL_NOW
+# else
+# define LTDL_LAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
+
+EOF
+if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ lt_cv_dlopen_self=yes
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ lt_cv_dlopen_self=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self" 1>&6
+
+ if test "$lt_cv_dlopen_self" = yes; then
+ LDFLAGS="$LDFLAGS $link_static_flag"
+ echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2563: checking whether a statically linked program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ lt_cv_dlopen_self_static=cross
+ else
+ cat > conftest.c <<EOF
+#line 2571 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LTDL_GLOBAL DL_GLOBAL
+# else
+# define LTDL_GLOBAL 0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LTDL_LAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LTDL_LAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LTDL_LAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LTDL_LAZY_OR_NOW DL_NOW
+# else
+# define LTDL_LAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
+
+EOF
+if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ lt_cv_dlopen_self_static=yes
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ lt_cv_dlopen_self_static=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
+fi
+ ;;
+ esac
+
+ case "$lt_cv_dlopen_self" in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case "$lt_cv_dlopen_self_static" in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+# Copy echo and quote the copy, instead of the original, because it is
+# used later.
+ltecho="$echo"
+if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ ltecho="$CONFIG_SHELL \$0 --fallback-echo"
+fi
+LTSHELL="$SHELL"
+
+LTCONFIG_VERSION="$VERSION"
+
+# Only quote variables if we're using ltmain.sh.
+case "$ltmain" in
+*.sh)
+ # Now quote all the things that may contain metacharacters.
+ for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
+ old_LD old_LDFLAGS old_LIBS \
+ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
+ AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
+ reload_flag reload_cmds wl \
+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \
+ library_names_spec soname_spec \
+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
+ file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
+ hardcode_libdir_flag_spec hardcode_libdir_separator \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+
+ case "$var" in
+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ case "$ltecho" in
+ *'\$0 --fallback-echo"')
+ ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+ ;;
+ esac
+
+ trap "$rm \"$ofile\"; exit 1" 1 2 15
+ echo "creating $ofile"
+ $rm "$ofile"
+ cat <<EOF > "$ofile"
+#! $SHELL
+
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
+#
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="sed -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+### BEGIN LIBTOOL CONFIG
+EOF
+ cfgfile="$ofile"
+ ;;
+
+*)
+ # Double-quote the variables that need it (for aesthetics).
+ for var in old_CC old_CFLAGS old_CPPFLAGS \
+ old_LD old_LDFLAGS old_LIBS \
+ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
+ eval "$var=\\\"\$var\\\""
+ done
+
+ # Just create a config file.
+ cfgfile="$ofile.cfg"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ echo "creating $cfgfile"
+ $rm "$cfgfile"
+ cat <<EOF > "$cfgfile"
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+EOF
+ ;;
+esac
+
+cat <<EOF >> "$cfgfile"
+# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
+# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
+# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
+# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
+# $0$ltconfig_args
+#
+# Compiler and other test output produced by $progname, useful for
+# debugging $progname, is in ./config.log if it exists.
+
+# The version of $progname that generated this script.
+LTCONFIG_VERSION=$LTCONFIG_VERSION
+
+# Shell to use when invoking shell scripts.
+SHELL=$LTSHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$ltecho
+
+# The archiver.
+AR=$AR
+
+# The default C compiler.
+CC=$CC
+
+# The linker used to build libraries.
+LD=$LD
+
+# Whether we need hard or soft links.
+LN_S=$LN_S
+
+# A BSD-compatible nm program.
+NM=$NM
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$reload_flag
+reload_cmds=$reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$wl
+
+# Object file suffix (normally "o").
+objext="$objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$pic_flag
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=$compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=$need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$link_static_flag
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$RANLIB
+old_archive_cmds=$old_archive_cmds
+old_postinstall_cmds=$old_postinstall_cmds
+old_postuninstall_cmds=$old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$old_archive_from_new_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$archive_cmds
+archive_expsym_cmds=$archive_expsym_cmds
+postinstall_cmds=$postinstall_cmds
+postuninstall_cmds=$postuninstall_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$global_symbol_to_cdecl
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$include_expsyms
+
+EOF
+
+case "$ltmain" in
+*.sh)
+ echo '### END LIBTOOL CONFIG' >> "$ofile"
+ echo >> "$ofile"
+ case "$host_os" in
+ aix3*)
+ cat <<\EOF >> "$ofile"
+
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+EOF
+ ;;
+ esac
+
+ # Append the ltmain.sh script.
+ sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+
+ chmod +x "$ofile"
+ ;;
+
+*)
+ # Compile the libtool program.
+ echo "FIXME: would compile $ltmain"
+ ;;
+esac
+
+test -n "$cache_file" || exit 0
+
+# AC_CACHE_SAVE
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100644
index 0000000..50515ad
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,4012 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun ltconfig.
+#
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell, and then maybe $echo will work.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+fi
+
+# The name of this program.
+progname=`$echo "$0" | sed 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.3.4
+TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \015\012 \040\040'
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+if test "$LTCONFIG_VERSION" != "$VERSION"; then
+ echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+fi
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ echo "$modename: not configured to build any kind of library" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+# Parse our command line options once, thoroughly.
+while test $# -gt 0
+do
+ arg="$1"
+ shift
+
+ case "$arg" in
+ -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case "$prev" in
+ execute_dlfiles)
+ eval "$prev=\"\$$prev \$arg\""
+ ;;
+ *)
+ eval "$prev=\$arg"
+ ;;
+ esac
+
+ prev=
+ prevopt=
+ continue
+ fi
+
+ # Have we seen a non-optional argument yet?
+ case "$arg" in
+ --help)
+ show_help=yes
+ ;;
+
+ --version)
+ echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+ exit 0
+ ;;
+
+ --config)
+ sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
+ exit 0
+ ;;
+
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
+ --dry-run | -n)
+ run=:
+ ;;
+
+ --features)
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+ exit 0
+ ;;
+
+ --finish) mode="finish" ;;
+
+ --mode) prevopt="--mode" prev=mode ;;
+ --mode=*) mode="$optarg" ;;
+
+ --quiet | --silent)
+ show=:
+ ;;
+
+ -dlopen)
+ prevopt="-dlopen"
+ prev=execute_dlfiles
+ ;;
+
+ -*)
+ $echo "$modename: unrecognized option \`$arg'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *)
+ nonopt="$arg"
+ break
+ ;;
+ esac
+done
+
+if test -n "$prevopt"; then
+ $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+fi
+
+if test -z "$show_help"; then
+
+ # Infer the operation mode.
+ if test -z "$mode"; then
+ case "$nonopt" in
+ *cc | *++ | gcc* | *-gcc*)
+ mode=link
+ for arg
+ do
+ case "$arg" in
+ -c)
+ mode=compile
+ break
+ ;;
+ esac
+ done
+ ;;
+ *db | *dbx | *strace | *truss)
+ mode=execute
+ ;;
+ *install*|cp|mv)
+ mode=install
+ ;;
+ *rm)
+ mode=uninstall
+ ;;
+ *)
+ # If we have no mode, but dlfiles were specified, then do execute mode.
+ test -n "$execute_dlfiles" && mode=execute
+
+ # Just use the default operation mode.
+ if test -z "$mode"; then
+ if test -n "$nonopt"; then
+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+ else
+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+ fi
+ fi
+ ;;
+ esac
+ fi
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$modename --help --mode=$mode' for more information."
+
+ # These modes are in order of execution frequency so that they run quickly.
+ case "$mode" in
+ # libtool compile mode
+ compile)
+ modename="$modename: compile"
+ # Get the compilation command and the source file.
+ base_compile=
+ lastarg=
+ srcfile="$nonopt"
+ suppress_output=
+
+ user_target=no
+ for arg
+ do
+ # Accept any command-line options.
+ case "$arg" in
+ -o)
+ if test "$user_target" != "no"; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit 1
+ fi
+ user_target=next
+ ;;
+
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+ esac
+
+ case "$user_target" in
+ next)
+ # The next one is the -o target name
+ user_target=yes
+ continue
+ ;;
+ yes)
+ # We got the output file
+ user_target=set
+ libobj="$arg"
+ continue
+ ;;
+ esac
+
+ # Accept the current argument as the source file.
+ lastarg="$srcfile"
+ srcfile="$arg"
+
+ # Aesthetically quote the previous argument.
+
+ # Backslashify any backslashes, double quotes, and dollar signs.
+ # These are the only characters that are still specially
+ # interpreted inside of double-quoted scrings.
+ lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly in scan
+ # sets, so we specify it separately.
+ case "$lastarg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ lastarg="\"$lastarg\""
+ ;;
+ esac
+
+ # Add the previous argument to base_compile.
+ if test -z "$base_compile"; then
+ base_compile="$lastarg"
+ else
+ base_compile="$base_compile $lastarg"
+ fi
+ done
+
+ case "$user_target" in
+ set)
+ ;;
+ no)
+ # Get the name of the library object.
+ libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ ;;
+ *)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ xform='[cCFSfmso]'
+ case "$libobj" in
+ *.ada) xform=ada ;;
+ *.adb) xform=adb ;;
+ *.ads) xform=ads ;;
+ *.asm) xform=asm ;;
+ *.c++) xform=c++ ;;
+ *.cc) xform=cc ;;
+ *.cpp) xform=cpp ;;
+ *.cxx) xform=cxx ;;
+ *.f90) xform=f90 ;;
+ *.for) xform=for ;;
+ esac
+
+ libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+ case "$libobj" in
+ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+ *)
+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test -z "$base_compile"; then
+ $echo "$modename: you must specify a compilation command" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $libobj"
+ else
+ removelist="$libobj"
+ fi
+
+ $run $rm $removelist
+ trap "$run $rm $removelist; exit 1" 1 2 15
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ removelist="$removelist $output_obj $lockfile"
+ trap "$run $rm $removelist; exit 1" 1 2 15
+ else
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until ln "$0" "$lockfile" 2>/dev/null; do
+ $show "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+ echo $srcfile > "$lockfile"
+ fi
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ command="$base_compile $srcfile $pic_flag -DPIC"
+ if test "$build_old_libs" = yes; then
+ lo_libobj="$libobj"
+ dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$libobj"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+ if test -d "$dir"; then
+ $show "$rm $libobj"
+ $run $rm $libobj
+ else
+ $show "$mkdir $dir"
+ $run $mkdir $dir
+ status=$?
+ if test $status -ne 0 && test ! -d $dir; then
+ exit $status
+ fi
+ fi
+ fi
+ if test "$compiler_o_lo" = yes; then
+ output_obj="$libobj"
+ command="$command -o $output_obj"
+ elif test "$compiler_c_o" = yes; then
+ output_obj="$obj"
+ command="$command -o $output_obj"
+ fi
+
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ test -n "$output_obj" && $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test x"$output_obj" != x"$libobj"; then
+ $show "$mv $output_obj $libobj"
+ if $run $mv $output_obj $libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # If we have no pic_flag, then copy the object into place and finish.
+ if test -z "$pic_flag" && test "$build_old_libs" = yes; then
+ # Rename the .lo from within objdir to obj
+ if test -f $obj; then
+ $show $rm $obj
+ $run $rm $obj
+ fi
+
+ $show "$mv $libobj $obj"
+ if $run $mv $libobj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
+ libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ # Now arrange that obj and lo_libobj become the same file
+ $show "(cd $xdir && $LN_S $baseobj $libobj)"
+ if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
+ exit 0
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Allow error messages only from the first compilation.
+ suppress_output=' >/dev/null 2>&1'
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ command="$base_compile $srcfile"
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ output_obj="$obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed
+ if test x"$output_obj" != x"$obj"; then
+ $show "$mv $output_obj $obj"
+ if $run $mv $output_obj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we do not
+ # accidentally link it into a program.
+ if test "$build_libtool_libs" != yes; then
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > \$libobj" || exit $?
+ else
+ # Move the .lo from within objdir
+ $show "$mv $libobj $lo_libobj"
+ if $run $mv $libobj $lo_libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+ fi
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $rm "$lockfile"
+ fi
+
+ exit 0
+ ;;
+
+ # libtool link mode
+ link)
+ modename="$modename: link"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invokation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+
+ # This is a source program that is used to create dlls on Windows
+ # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# # ifdef __CYGWIN32__
+# # define __CYGWIN__ __CYGWIN32__
+# # endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+# __hDllInstance_base = hInst;
+# return TRUE;
+# }
+# /* ltdll.c ends here */
+ # This is a source program that is used to create import libraries
+ # on Windows for dlls which lack them. Don't remove nor modify the
+ # starting and closing comments
+# /* impgen.c starts here */
+# /* Copyright (C) 1999 Free Software Foundation, Inc.
+#
+# This file is part of GNU libtool.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# */
+#
+# #include <stdio.h> /* for printf() */
+# #include <unistd.h> /* for open(), lseek(), read() */
+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
+# #include <string.h> /* for strdup() */
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[2];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 2);
+# return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[4];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 4);
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+# void *ptr;
+# {
+# unsigned char *b = ptr;
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+# int argc;
+# char *argv[];
+# {
+# int dll;
+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+# unsigned long export_rva, export_size, nsections, secptr, expptr;
+# unsigned long name_rvas, nexp;
+# unsigned char *expdata, *erva;
+# char *filename, *dll_name;
+#
+# filename = argv[1];
+#
+# dll = open(filename, O_RDONLY|O_BINARY);
+# if (!dll)
+# return 1;
+#
+# dll_name = filename;
+#
+# for (i=0; filename[i]; i++)
+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
+# dll_name = filename + i +1;
+#
+# pe_header_offset = pe_get32 (dll, 0x3c);
+# opthdr_ofs = pe_header_offset + 4 + 20;
+# num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#
+# if (num_entries < 1) /* no exports */
+# return 1;
+#
+# export_rva = pe_get32 (dll, opthdr_ofs + 96);
+# export_size = pe_get32 (dll, opthdr_ofs + 100);
+# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+# secptr = (pe_header_offset + 4 + 20 +
+# pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+# expptr = 0;
+# for (i = 0; i < nsections; i++)
+# {
+# char sname[8];
+# unsigned long secptr1 = secptr + 40 * i;
+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+# lseek(dll, secptr1, SEEK_SET);
+# read(dll, sname, 8);
+# if (vaddr <= export_rva && vaddr+vsize > export_rva)
+# {
+# expptr = fptr + (export_rva - vaddr);
+# if (export_rva + export_size > vaddr + vsize)
+# export_size = vsize - (export_rva - vaddr);
+# break;
+# }
+# }
+#
+# expdata = (unsigned char*)malloc(export_size);
+# lseek (dll, expptr, SEEK_SET);
+# read (dll, expdata, export_size);
+# erva = expdata - export_rva;
+#
+# nexp = pe_as32 (expdata+24);
+# name_rvas = pe_as32 (expdata+32);
+#
+# printf ("EXPORTS\n");
+# for (i = 0; i<nexp; i++)
+# {
+# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+# }
+#
+# return 0;
+# }
+# /* impgen.c ends here */
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ compile_command="$nonopt"
+ finalize_command="$nonopt"
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ linkopts=
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ lib_search_path=
+ fi
+ # now prepend the system-specific ones
+ eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ link_against_libtool_libs=
+ ltlibs=
+ module=no
+ objs=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case "$arg" in
+ -all-static | -static)
+ if test "X$arg" = "X-all-static"; then
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ else
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ fi
+ build_libtool_libs=no
+ build_old_libs=yes
+ prefer_static_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test $# -gt 0; do
+ arg="$1"
+ shift
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case "$prev" in
+ output)
+ compile_command="$compile_command @OUTPUT@"
+ finalize_command="$finalize_command @OUTPUT@"
+ ;;
+ esac
+
+ case "$prev" in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ compile_command="$compile_command @SYMFILE@"
+ finalize_command="$finalize_command @SYMFILE@"
+ preload=yes
+ fi
+ case "$arg" in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ if test ! -f "$arg"; then
+ $echo "$modename: symbol file \`$arg' does not exist"
+ exit 1
+ fi
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case "$arg" in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi
+
+ prevarg="$arg"
+
+ case "$arg" in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ compile_command="$compile_command $link_static_flag"
+ finalize_command="$finalize_command $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+ continue
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: not more than one -exported-symbols argument allowed"
+ exit 1
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -L*)
+ dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ # We need an absolute path.
+ case "$dir" in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+ absdir="$dir"
+ fi
+ dir="$absdir"
+ ;;
+ esac
+ case " $deplibs " in
+ *" $arg "*) ;;
+ *) deplibs="$deplibs $arg";;
+ esac
+ case " $lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir";;
+ esac
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+ case ":$dllsearchpath:" in
+ ::) dllsearchpath="$dllsearchdir";;
+ *":$dllsearchdir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
+ esac
+ ;;
+ esac
+ ;;
+
+ -l*)
+ if test "$arg" = "-lc"; then
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
+ # These systems don't actually have c library (as such)
+ continue
+ ;;
+ esac
+ elif test "$arg" = "-lm"; then
+ case "$host" in
+ *-*-cygwin* | *-*-beos*)
+ # These systems don't actually have math library (as such)
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ # We need an absolute path.
+ case "$dir" in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -static)
+ # If we have no pic_flag, then this is the same as -all-static.
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ compile_command="$compile_command $link_static_flag"
+ finalize_command="$finalize_command $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+
+ *.o | *.obj | *.a | *.lib)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A library object.
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
+ prev=
+ fi
+ libobjs="$libobjs $arg"
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ dlname=
+ libdir=
+ library_names=
+ old_library=
+
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variable installed.
+ installed=yes
+
+ # Read the .la file
+ # If there is no directory component, then add one.
+ case "$arg" in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+
+ if test -z "$linklib"; then
+ $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Find the relevant object directory and library name.
+ name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
+
+ if test "X$installed" = Xyes; then
+ dir="$libdir"
+ else
+ dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$arg"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ fi
+
+ if test -n "$dependency_libs"; then
+ # Extract -R and -L from dependency_libs
+ temp_deplibs=
+ for deplib in $dependency_libs; do
+ case "$deplib" in
+ -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ case " $rpath $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ -L*) case "$compile_command $temp_deplibs " in
+ *" $deplib "*) ;;
+ *) temp_deplibs="$temp_deplibs $deplib";;
+ esac
+ temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ case " $lib_search_path " in
+ *" $temp_dir "*) ;;
+ *) lib_search_path="$lib_search_path $temp_dir";;
+ esac
+ ;;
+ *) temp_deplibs="$temp_deplibs $deplib";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ if test -z "$libdir"; then
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $dir/$old_library"
+ old_convenience="$old_convenience $dir/$old_library"
+ deplibs="$deplibs$dependency_libs"
+ compile_command="$compile_command $dir/$old_library$dependency_libs"
+ finalize_command="$finalize_command $dir/$old_library$dependency_libs"
+ continue
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking statically,
+ # we need to preload.
+ prev=dlprefiles
+ else
+ # We should not create a dependency on this library, but we
+ # may need any libraries it requires.
+ compile_command="$compile_command$dependency_libs"
+ finalize_command="$finalize_command$dependency_libs"
+ prev=
+ continue
+ fi
+ fi
+
+ # The library was specified with -dlpreopen.
+ if test "$prev" = dlprefiles; then
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ dlprefiles="$dlprefiles $dir/$old_library"
+ else
+ dlprefiles="$dlprefiles $dir/$linklib"
+ fi
+ prev=
+ fi
+
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ link_against_libtool_libs="$link_against_libtool_libs $arg"
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+
+ # We need an absolute path.
+ case "$dir" in
+ [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+ absdir="$dir"
+ fi
+ ;;
+ esac
+
+ # This is the magic to use -rpath.
+ # Skip directories that are in the system default run-time
+ # search path, unless they have been requested with -R.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+
+ lib_linked=yes
+ case "$hardcode_action" in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ compile_command="$compile_command $dir/$linklib"
+ deplibs="$deplibs $dir/$linklib"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+ if test -n "$dllsearchpath"; then
+ dllsearchpath="$dllsearchpath:$dllsearchdir"
+ else
+ dllsearchpath="$dllsearchdir"
+ fi
+ ;;
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case "$host" in
+ *-*-sunos*)
+ compile_shlibpath="$compile_shlibpath$dir:"
+ ;;
+ esac
+ case "$compile_command " in
+ *" -L$dir "*) ;;
+ *) compile_command="$compile_command -L$dir";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -L$dir -l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ case ":$compile_shlibpath:" in
+ *":$dir:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$dir:";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+
+ relink)
+ if test "$hardcode_direct" = yes; then
+ compile_command="$compile_command $absdir/$linklib"
+ deplibs="$deplibs $absdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ case "$compile_command " in
+ *" -L$absdir "*) ;;
+ *) compile_command="$compile_command -L$absdir";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -L$absdir -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case ":$compile_shlibpath:" in
+ *":$absdir:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$absdir:";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+
+ *)
+ lib_linked=no
+ ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ $echo "$modename: configuration error: unsupported hardcode properties"
+ exit 1
+ fi
+
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes; then
+ finalize_command="$finalize_command $libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ case "$finalize_command " in
+ *" -L$libdir "*) ;;
+ *) finalize_command="$finalize_command -L$libdir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case ":$finalize_shlibpath:" in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ case "$finalize_command " in
+ *" -L$dir "*) ;;
+ *) finalize_command="$finalize_command -L$libdir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ fi
+ else
+ # Transform directly to old archives if we don't build new libraries.
+ if test -n "$pic_flag" && test -z "$old_library"; then
+ $echo "$modename: cannot find static library for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_command="$compile_command $dir/$linklib"
+ finalize_command="$finalize_command $dir/$linklib"
+ else
+ case "$compile_command " in
+ *" -L$dir "*) ;;
+ *) compile_command="$compile_command -L$dir";;
+ esac
+ compile_command="$compile_command -l$name"
+ case "$finalize_command " in
+ *" -L$dir "*) ;;
+ *) finalize_command="$finalize_command -L$dir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ fi
+ fi
+
+ # Add in any libraries that this one depends upon.
+ compile_command="$compile_command$dependency_libs"
+ finalize_command="$finalize_command$dependency_libs"
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+ esac
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+ done
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ libobjs_save="$libobjs"
+
+ case "$output" in
+ "")
+ $echo "$modename: you must specify an output file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *.a | *.lib)
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
+ exit 1
+ fi
+
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+ fi
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ ;;
+
+ *.la)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case "$outputname" in
+ lib*)
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ if test "$module" = no; then
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval libname=\"$libname_spec\"
+ else
+ libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ fi
+ ;;
+ esac
+
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
+
+ if test -n "$objs"; then
+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
+ exit 1
+ fi
+
+ # How the heck are we supposed to write a wrapper for a shared library?
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
+ exit 1
+ fi
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
+ fi
+
+ set dummy $rpath
+ if test $# -gt 2; then
+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+ fi
+ install_libdir="$2"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ libext=al
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+ dependency_libs="$deplibs"
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+ fi
+ else
+
+ # Parse the version information argument.
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ IFS="$save_ifs"
+
+ if test -n "$8"; then
+ $echo "$modename: too many parameters to \`-version-info'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ current="$2"
+ revision="$3"
+ age="$4"
+
+ # Check that each of the things are valid numbers.
+ case "$current" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case "$revision" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case "$age" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test $age -gt $current; then
+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case "$version_type" in
+ none) ;;
+
+ irix)
+ major=`expr $current - $age + 1`
+ versuffix="$major.$revision"
+ verstring="sgi$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test $loop != 0; do
+ iface=`expr $revision - $loop`
+ loop=`expr $loop - 1`
+ verstring="sgi$major.$iface:$verstring"
+ done
+ ;;
+
+ linux)
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ major=`expr $current - $age`
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test $loop != 0; do
+ iface=`expr $current - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
+ windows)
+ # Like Linux, but with '-' rather than '.', since we only
+ # want one extension on Windows 95.
+ major=`expr $current - $age`
+ versuffix="-$major-$age-$revision"
+ ;;
+
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ verstring="0.0"
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ dependency_libs="$deplibs"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *)
+ # Add libc to deplibs on all other systems.
+ deplibs="$deplibs -lc"
+ ;;
+ esac
+ fi
+
+ # Create the output directory, or remove our outputs if we need to.
+ if test -d $output_objdir; then
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ else
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
+ fi
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ if test "$build_libtool_libs" = yes; then
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case "$deplibs_check_method" in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behaviour.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $rm conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $rm conftest
+ $CC -o conftest conftest.c $deplibs
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ else
+ # Error occured in the first compile. Let's try to salvage the situation:
+ # Compile a seperate program for each library.
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ $rm conftest
+ $CC -o conftest conftest.c $i
+ # Did it work?
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null \
+ | grep " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+ case "$potliblink" in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+ | sed 10q \
+ | egrep "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
+ grep . >/dev/null; then
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ echo "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ # Get the real and link names of the library.
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ lib="$output_objdir/$realname"
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Ensure that we have .o objects for linkers which dislike .lo
+ # (e.g. aix) in case we are running --disable-static
+ for obj in $libobjs; do
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ if test ! -f $xdir/$oldobj; then
+ $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
+ $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
+ fi
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $run $rm $export_symbols
+ eval cmds=\"$export_symbols_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex"; then
+ $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+ fi
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case "$xlib" in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linkopts="$linkopts $flag"
+ fi
+
+ # Do each of the archive commands.
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval cmds=\"$archive_expsym_cmds\"
+ else
+ eval cmds=\"$archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ *.lo | *.o | *.obj)
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
+ exit 1
+ fi
+
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+ fi
+
+ case "$output" in
+ *.lo)
+ if test -n "$objs"; then
+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit 1
+ fi
+ libobj="$output"
+ obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $run $rm $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${obj}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case "$xlib" in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
+
+ output="$obj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit 0
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > $libobj" || exit $?
+ exit 0
+ fi
+
+ if test -n "$pic_flag"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ else
+ # Just create a symlink.
+ $show $rm $libobj
+ $run $rm $libobj
+ xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$libobj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+ oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ $show "(cd $xdir && $LN_S $oldobj $baseobj)"
+ $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
+ fi
+
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit 0
+ ;;
+
+ # Anything else should be a program.
+ *)
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+ fi
+
+ if test "$preload" = yes; then
+ if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
+ test "$dlopen_self_static" = unknown; then
+ $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+ fi
+ fi
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$compile_rpath " in
+ *" $libdir "*) ;;
+ *) compile_rpath="$compile_rpath $libdir" ;;
+ esac
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
+
+ # Create the binary in the object directory, then wrap it.
+ if test ! -d $output_objdir; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
+ fi
+ fi
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ dlsyms=
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms="${outputname}S.c"
+ else
+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+ fi
+ fi
+
+ if test -n "$dlsyms"; then
+ case "$dlsyms" in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${outputname}.nm"
+
+ $show "$rm $nlist ${nlist}S ${nlist}T"
+ $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+ # Parse the name list into a source file.
+ $show "creating $output_objdir/$dlsyms"
+
+ test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ $show "generating symbol list for \`$output'"
+
+ test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for arg in $progfiles; do
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$output.exp"
+ $run $rm $export_symbols
+ $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ else
+ $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+ $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+ $run eval 'mv "$nlist"T "$nlist"'
+ fi
+ fi
+
+ for arg in $dlprefiles; do
+ $show "extracting global C symbols from \`$arg'"
+ name=`echo "$arg" | sed -e 's%^.*/%%'`
+ $run eval 'echo ": $name " >> "$nlist"'
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -z "$run"; then
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+ :
+ else
+ grep -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ fi
+
+ $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+ sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
+ -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
+ < "$nlist" >> "$output_objdir/$dlsyms"
+
+ $echo >> "$output_objdir/$dlsyms" "\
+ {0, (lt_ptr_t) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ fi
+
+ pic_flag_for_symtable=
+ case "$host" in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+ esac;;
+ *-*-hpux*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC";;
+ esac
+ esac
+
+ # Now compile the dynamic symbol file.
+ $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+ # Clean up the generated files.
+ $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+ $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+ # Transform the symbol file into the correct name.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ *)
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit 1
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+
+ if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$link_command"
+ $run eval "$link_command"
+ status=$?
+
+ # Delete the generated files.
+ if test -n "$dlsyms"; then
+ $show "$rm $output_objdir/${outputname}S.${objext}"
+ $run $rm "$output_objdir/${outputname}S.${objext}"
+ fi
+
+ exit $status
+ fi
+
+ if test -n "$shlibpath_var"; then
+ # We should set the shlibpath_var
+ rpath=
+ for dir in $temp_rpath; do
+ case "$dir" in
+ [\\/]* | [A-Za-z]:[\\/]*)
+ # Absolute path.
+ rpath="$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath="$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath="$rpath"
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
+
+ # Now create the wrapper script.
+ $show "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $echo for shipping.
+ if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+ case "$0" in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ esac
+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if our run command is non-null.
+ if test -z "$run"; then
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit 1" 1 2 15
+
+ $echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variable:
+ link_against_libtool_libs='$link_against_libtool_libs'
+else
+ # When we are sourced in execute mode, \$file and \$echo are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ echo=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$echo works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$echo will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $echo >> $output "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+ done
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ echo >> $output "\
+ program=lt-'$outputname'
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" || \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $mkdir \"\$progdir\"
+ else
+ $rm \"\$progdir/\$file\"
+ fi"
+
+ echo >> $output "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if (cd \"\$thisdir\" && eval \$relink_command); then :
+ else
+ $rm \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $rm \"\$progdir/\$program\";
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $rm \"\$progdir/\$file\"
+ fi"
+ else
+ echo >> $output "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ echo >> $output "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $echo >> $output "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $echo >> $output "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $echo >> $output "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ *-*-cygwin* | *-*-mingw | *-*-os2*)
+ # win32 systems need to use the prog path for dll
+ # lookup to work
+ $echo >> $output "\
+ exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+ ;;
+ *)
+ $echo >> $output "\
+ # Export the path to the program.
+ PATH=\"\$progdir:\$PATH\"
+ export PATH
+
+ exec \$program \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $echo >> $output "\
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"This script is just a wrapper for \$program.\" 1>&2
+ echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+ chmod +x $output
+ fi
+ exit 0
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ # Add in members from convenience archives.
+ for xlib in $addlibs; do
+ # Extract the objects.
+ case "$xlib" in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ eval cmds=\"$old_archive_from_new_cmds\"
+ else
+ # Ensure that we have .o objects in place in case we decided
+ # not to build a shared library, and have fallen back to building
+ # static libs even though --disable-static was passed!
+ for oldobj in $oldobjs; do
+ if test ! -f $oldobj; then
+ xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$oldobj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
+ obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ $show "(cd $xdir && ${LN_S} $obj $baseobj)"
+ $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+ fi
+ done
+
+ eval cmds=\"$old_archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$generated"; then
+ $show "${rm}r$generated"
+ $run ${rm}r$generated
+ fi
+
+ # Now create the libtool archive.
+ case "$output" in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ $show "creating $output"
+
+ if test -n "$xrpath"; then
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ done
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+
+ # Only create the output if not a dry run.
+ if test -z "$run"; then
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ fi
+ $rm $output
+ $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$dlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'\
+"
+ done
+ fi
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+ $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
+ ;;
+ esac
+ exit 0
+ ;;
+
+ # libtool install mode
+ install)
+ modename="$modename: install"
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
+ # Aesthetically quote it.
+ arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$arg "
+ arg="$1"
+ shift
+ else
+ install_prog=
+ arg="$nonopt"
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog$arg"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest="$arg"
+ continue
+ fi
+
+ case "$arg" in
+ -d) isdir=yes ;;
+ -f) prev="-f" ;;
+ -g) prev="-g" ;;
+ -m) prev="-m" ;;
+ -o) prev="-o" ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*) ;;
+
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog $arg"
+ done
+
+ if test -z "$install_prog"; then
+ $echo "$modename: you must specify an install program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prev' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ $echo "$modename: no file or destination specified" 1>&2
+ else
+ $echo "$modename: you must specify a destination" 1>&2
+ fi
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Strip any trailing slash from the destination.
+ dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$destdir" = "X$dest" && destdir=.
+ destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files
+ if test $# -gt 2; then
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ fi
+ case "$destdir" in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case "$file" in
+ *.lo) ;;
+ *)
+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case "$file" in
+ *.a | *.lib)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ library_names=
+ old_library=
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
+ test "X$dir" = "X$file/" && dir=
+ dir="$dir$objdir"
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname="$2"
+ shift
+ shift
+
+ # Install the shared library and build the symlinks.
+ $show "$install_prog $dir/$realname $destdir/$realname"
+ $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
+
+ if test $# -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ for linkname
+ do
+ if test "$linkname" != "$realname"; then
+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ fi
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ eval cmds=\"$postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Install the pseudo-library for information purposes.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ instname="$dir/$name"i
+ $show "$install_prog $instname $destdir/$name"
+ $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case "$destfile" in
+ *.lo)
+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ ;;
+ *.o | *.obj)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ if test -n "$destfile"; then
+ $show "$install_prog $file $destfile"
+ $run eval "$install_prog $file $destfile" || exit $?
+ fi
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+ $show "$install_prog $staticobj $staticdest"
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+ fi
+ exit 0
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ link_against_libtool_libs=
+ relink_command=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$link_against_libtool_libs"; then
+ $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=yes
+ for lib in $link_against_libtool_libs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case "$lib" in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ done
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ if test "$finalize" = yes && test -z "$run"; then
+ tmpdir="/tmp"
+ test -n "$TMPDIR" && tmpdir="$TMPDIR"
+ tmpdir="$tmpdir/libtool-$$"
+ if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+ else
+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+ continue
+ fi
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ ${rm}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ $echo "$modename: warning: cannot relink \`$file'" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
+ file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ $show "$install_prog$stripme $file $destfile"
+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ test -n "$outputname" && ${rm}r "$tmpdir"
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ $show "$install_prog $file $oldlib"
+ $run eval "$install_prog \$file \$oldlib" || exit $?
+
+ # Do each command in the postinstall commands.
+ eval cmds=\"$old_postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$future_libdirs"; then
+ $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+ fi
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ test -n "$run" && current_libdirs=" -n$current_libdirs"
+ exec $SHELL $0 --finish$current_libdirs
+ exit 1
+ fi
+
+ exit 0
+ ;;
+
+ # libtool finish mode
+ finish)
+ modename="$modename: finish"
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ eval cmds=\"$finish_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || admincmds="$admincmds
+ $cmd"
+ done
+ IFS="$save_ifs"
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $run eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ test "$show" = : && exit 0
+
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ echo " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ echo " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ echo " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+ echo "See any operating system documentation about shared libraries for"
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ echo "----------------------------------------------------------------------"
+ exit 0
+ ;;
+
+ # libtool execute mode
+ execute)
+ modename="$modename: execute"
+
+ # The first argument is the command name.
+ cmd="$nonopt"
+ if test -z "$cmd"; then
+ $echo "$modename: you must specify a COMMAND" 1>&2
+ $echo "$help"
+ exit 1
+ fi
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ if test ! -f "$file"; then
+ $echo "$modename: \`$file' is not a file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ dir=
+ case "$file" in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit 1
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+ ;;
+
+ *)
+ $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case "$file" in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+ args="$args \"$file\""
+ done
+
+ if test -z "$run"; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved enviroment variables
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
+
+ # Now actually exec the command.
+ eval "exec \$cmd$args"
+
+ $echo "$modename: cannot exec \$cmd$args"
+ exit 1
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+ $echo "export $shlibpath_var"
+ fi
+ $echo "$cmd$args"
+ exit 0
+ fi
+ ;;
+
+ # libtool uninstall mode
+ uninstall)
+ modename="$modename: uninstall"
+ rm="$nonopt"
+ files=
+
+ for arg
+ do
+ case "$arg" in
+ -*) rm="$rm $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ if test -z "$rm"; then
+ $echo "$modename: you must specify an RM program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ for file in $files; do
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ rmfiles="$file"
+
+ case "$name" in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $dir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
+
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles
+
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ eval cmds=\"$postuninstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ done
+ IFS="$save_ifs"
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ eval cmds=\"$old_postuninstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ done
+ IFS="$save_ifs"
+ fi
+
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ ;;
+
+ *.lo)
+ if test "$build_old_libs" = yes; then
+ oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+ rmfiles="$rmfiles $dir/$oldobj"
+ fi
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles
+ ;;
+
+ *)
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles
+ ;;
+ esac
+ done
+ exit 0
+ ;;
+
+ "")
+ $echo "$modename: you must specify a MODE" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+fi # test -z "$show_help"
+
+# We need to display help for each of the modes.
+case "$mode" in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+-n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --finish same as \`--mode=finish'
+ --help display this help message and exit
+ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
+ --quiet same as \`--silent'
+ --silent don't print informational messages
+ --version print version information
+
+MODE must be one of the following:
+
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE."
+ exit 0
+ ;;
+
+compile)
+ $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -static always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+execute)
+ $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+finish)
+ $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+install)
+ $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+link)
+ $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -static do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+uninstall)
+ $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+*)
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+esac
+
+echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/m4/ChangeLog b/m4/ChangeLog
new file mode 100644
index 0000000..ed86caa
--- /dev/null
+++ b/m4/ChangeLog
@@ -0,0 +1,30 @@
+2000-05-06 Ulrich Drepper <drepper@redhat.com>
+
+ * gettext.m4: Add tests for tsearch, iconv, and mempcpy.
+
+ * gettext.m4: Lots of bug fixes.
+
+1998-06-01 22:28 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.m4: Allow arguments for AM_GNU_GETTEXT to customize for
+ Gygnus trees.
+
+1998-04-30 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.m4: Add AC_OUTPUT_COMMANDS in AM_GNU_GETTEXT to rewrite
+ the po/Makefile.
+
+1998-04-29 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (EXTRA_DIST): No need to mention *.m4 files here.
+
+ * gettext.m4: Fix test for gettext in libintl.
+ Patch by Guido Flohr <gufl0000@stud.uni-sb.de>.
+
+1998-04-28 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.m4: Don't test for values.h.
+
+1998-04-27 21:17 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext.m4, lcmessage.m4, progtest.m4: Moved to here from toplevel.
diff --git a/m4/Makefile.am b/m4/Makefile.am
new file mode 100644
index 0000000..977bc56
--- /dev/null
+++ b/m4/Makefile.am
@@ -0,0 +1,10 @@
+## Process this file with automake to produce Makefile.in -*-Makefile-*-
+
+aclocaldir = @aclocaldir@
+aclocal_DATA = gettext.m4 isc-posix.m4 lcmessage.m4 progtest.m4
+
+# Generate this list with
+# find . -type f -name '*.m4' -printf '%f\n'|sort |fmt |tr '\012' @ \
+# |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012'
+EXTRA_DIST = README \
+gettext.m4 isc-posix.m4 lcmessage.m4 progtest.m4
diff --git a/m4/Makefile.in b/m4/Makefile.in
new file mode 100644
index 0000000..de26e50
--- /dev/null
+++ b/m4/Makefile.in
@@ -0,0 +1,235 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+ACLOCAL_VERSION = @ACLOCAL_VERSION@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+EMACS = @EMACS@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LIBOBJS = @LIBOBJS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+YACC = @YACC@
+l = @l@
+lispdir = @lispdir@
+
+aclocaldir = @aclocaldir@
+aclocal_DATA = gettext.m4 isc-posix.m4 lcmessage.m4 progtest.m4
+
+# Generate this list with
+# find . -type f -name '*.m4' -printf '%f\n'|sort |fmt |tr '\012' @ \
+# |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012'
+EXTRA_DIST = README gettext.m4 isc-posix.m4 lcmessage.m4 progtest.m4
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DATA = $(aclocal_DATA)
+
+DIST_COMMON = README ChangeLog Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+install-aclocalDATA: $(aclocal_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(aclocaldir)
+ @list='$(aclocal_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(aclocaldir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(aclocaldir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(aclocaldir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(aclocaldir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-aclocalDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(aclocal_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(aclocaldir)/$$p; \
+ done
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = m4
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu m4/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-aclocalDATA
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-aclocalDATA
+uninstall: uninstall-am
+all-am: Makefile $(DATA)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(aclocaldir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: uninstall-aclocalDATA install-aclocalDATA tags distdir info-am \
+info dvi-am dvi check check-am installcheck-am installcheck \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/m4/README b/m4/README
new file mode 100644
index 0000000..ac32e28
--- /dev/null
+++ b/m4/README
@@ -0,0 +1,4 @@
+These files are used by a program called aclocal (part of the GNU automake
+package). aclocal uses these files to create aclocal.m4 which is in turn
+used by autoconf to create the configure script at the the top level in
+this distribution.
diff --git a/m4/gettext.m4 b/m4/gettext.m4
new file mode 100644
index 0000000..893cea6
--- /dev/null
+++ b/m4/gettext.m4
@@ -0,0 +1,323 @@
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 5
+
+dnl Usage: AM_WITH_NLS([SYMBOL], [LIBDIR], [INCDIR]).
+dnl If SYMBOL is specified and is `no-categets', then the catgets
+dnl checks will be disabled.
+dnl LIBDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl INCDIR is used to find the include files. If empty,
+dnl the value `intl' is used.
+AC_DEFUN(AM_WITH_NLS,
+ [AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ USE_INCLUDED_LIBINTL=no
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ AC_DEFINE(ENABLE_NLS)
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If gettext or catgets are available (in this order) we
+ dnl use this. Else we have to fall back to GNU NLS library.
+ dnl catgets is only used if permitted by option --with-catgets.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ AC_CHECK_HEADER(libintl.h,
+ [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
+ gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CACHE_CHECK([for gettext in libintl],
+ gt_cv_func_gettext_libintl,
+ [AC_CHECK_LIB(intl, gettext,
+ gt_cv_func_gettext_libintl=yes,
+ gt_cv_func_gettext_libintl=no)],
+ gt_cv_func_gettext_libintl=no)])
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT)
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ AC_CHECK_FUNCS(dcgettext)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ INSTOBJEXT=.mo
+ fi
+ fi
+ ])
+
+ifelse([$1], no-catgets, ,[
+ if test "$CATOBJEXT" = "NONE"; then
+ AC_MSG_CHECKING([whether catgets can be used])
+ AC_ARG_WITH(catgets,
+ [ --with-catgets use catgets functions if available],
+ nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
+ AC_MSG_RESULT($nls_cv_use_catgets)
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ dnl No gettext in C library. Try catgets next.
+ AC_CHECK_LIB(i, main)
+ AC_CHECK_FUNC(catgets,
+ [AC_DEFINE(HAVE_CATGETS)
+ INTLOBJS="\$(CATOBJS)"
+ AC_PATH_PROG(GENCAT, gencat, no)dnl
+ if test "$GENCAT" != "no"; then
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
+ if test "$GMSGFMT" = "no"; then
+ AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+ fi
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='ifelse([$2],[],$(top_builddir)/intl/libintl.a,[$2])'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=ifelse([$3],[],intl,[$3])/libintl.h
+ nls_cv_header_libgt=ifelse([$3],[],intl,[$3])/libgettext.h
+ fi])
+ fi
+ fi
+])
+
+ if test "$CATOBJEXT" = "NONE"; then
+ dnl Neither gettext nor catgets in included in the C library.
+ dnl Fall back on GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_SUBST(MSGFMT)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='ifelse([$2],[],$(top_builddir)/intl/libintl.a,[$2])'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=ifelse([$3],[],intl,[$3])/libintl.h
+ nls_cv_header_libgt=ifelse([$3],[],intl,[$3])/libgettext.h
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=ifelse([$3],[],intl,[$3])/libintl.h
+ nls_cv_header_libgt=ifelse([$3],[],intl,[$3])/libgettext.h
+ fi
+ AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLDEPS)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(INTLOBJS)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+dnl Usage: Just like AM_WITH_NLS, which see.
+AC_DEFUN(AM_GNU_GETTEXT,
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next tsearch iconv stpcpy mempcpy])
+
+ AM_LC_MESSAGES
+ AM_WITH_NLS([$1],[$2],[$3])
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl The reference to <locale.h> in the installed <libintl.h> file
+ dnl must be resolved because we cannot expect the users of this
+ dnl to define HAVE_LOCALE_H.
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+ AC_SUBST(INCLUDE_LOCALE_H)
+
+ dnl Determine which catalog format we have (if any is needed)
+ dnl For now we know about two different formats:
+ dnl Linux libc-5 and the normal X/Open format
+ if test -f $srcdir/po2tbl.sed.in; then
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
+
+ dnl Transform the SED scripts while copying because some dumb SEDs
+ dnl cannot handle comments.
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ dnl po2tbl.sed is always needed.
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ dnl In the intl/Makefile.in we have a special dependency which makes
+ dnl only sense for gettext. We comment this out for non-gettext
+ dnl packages.
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+ AC_SUBST(GT_NO)
+ AC_SUBST(GT_YES)
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl *** For now the libtool support in intl/Makefile is not for real.
+ l=
+ AC_SUBST(l)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile. But only do this if the po directory
+ dnl exists in srcdir.
+ if test -d $srcdir/po; then
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ fi
+ ])
diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4
new file mode 100644
index 0000000..4dd2afa
--- /dev/null
+++ b/m4/isc-posix.m4
@@ -0,0 +1,15 @@
+#serial 1
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+AC_DEFUN(AC_ISC_POSIX,
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
new file mode 100644
index 0000000..e31bb53
--- /dev/null
+++ b/m4/lcmessage.m4
@@ -0,0 +1,19 @@
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ fi
+ fi])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
new file mode 100644
index 0000000..2482d4a
--- /dev/null
+++ b/m4/progtest.m4
@@ -0,0 +1,47 @@
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
diff --git a/misc/Admin/alias.X11 b/misc/Admin/alias.X11
new file mode 100644
index 0000000..401d3bd
--- /dev/null
+++ b/misc/Admin/alias.X11
@@ -0,0 +1,202 @@
+# $XConsortium: locale.alias,v 1.9 94/08/23 18:12:18 kaleb Exp $
+#
+# This file contains alias name of locale.
+# Each alias name is described within one line.
+# The first word is the alias name (simplified locale name)
+# the second word is full locale name.
+#
+POSIX C
+POSIX-UTF2 C
+C.en C
+Cextend en_US.ISO8859-1
+Cextend.en en_US.ISO8859-1
+English_United-States.437 C
+#
+ar ar_AA.ISO8859-6
+ar_AA ar_AA.ISO8859-6
+bg bg_BG.ISO8859-5
+bg_BG bg_BG.ISO8859-5
+cs cs_CS.ISO8859-2
+cs_CS cs_CS.ISO8859-2
+cz cz_CZ.ISO8859-2
+cz_CZ cz_CZ.ISO8859-2
+da da_DK.ISO8859-1
+da_DK da_DK.ISO8859-1
+da_DK.88591 da_DK.ISO8859-1
+da_DK.88591.en da_DK.ISO8859-1
+de de_DE.ISO8859-1
+de_DE de_DE.ISO8859-1
+De_DE de_DE.ISO8859-1
+De_DE.IBM-850 de_DE.ISO8859-1
+de_DE.88591 de_DE.ISO8859-1
+de_DE.88591.en de_DE.ISO8859-1
+GER_DE.8859 de_DE.ISO8859-1
+GER_DE.8859.in de_DE.ISO8859-1
+de_AT de_AT.ISO8859-1
+de_CH de_CH.ISO8859-1
+Du_BE du_BE.ISO8859-1
+Du_NL du_NL.ISO8859-1
+el el_GR.ISO8859-7
+el_GR el_GR.ISO8859-7
+en en_US.ISO8859-1
+en_GB en_GB.ISO8859-1
+en_GB.88591 en_GB.ISO8859-1
+en_GB.88591.en en_GB.ISO8859-1
+ENG_GB.8859 en_GB.ISO8859-1
+ENG_GB.8859.in en_GB.ISO8859-1
+en_AU en_AU.ISO8859-1
+en_CA en_CA.ISO8859-1
+en_US en_US.ISO8859-1
+En_US en_US.ISO8859-1
+en_US.88591 en_US.ISO8859-1
+en_US.88591.en en_US.ISO8859-1
+en_US.437 en_US.ISO8859-1
+en_US.646 en_US.ISO8859-1
+en_US.850 en_US.ISO8859-1
+es es_ES.ISO8859-1
+es_ES es_ES.ISO8859-1
+Es_ES es_ES.ISO8859-1
+Sp_SP es_ES.ISO8859-1
+Es_ES.IBM-850 es_ES.ISO8859-1
+es_ES.88591 es_ES.ISO8859-1
+es_ES.88591.en es_ES.ISO8859-1
+fi fi_FI.ISO8859-1
+fi_FI fi_FI.ISO8859-1
+fi_FI.88591 fi_FI.ISO8859-1
+fi_FI.88591.en fi_FI.ISO8859-1
+fr fr_FR.ISO8859-1
+fr_BE fr_BE.ISO8859-1
+fr_BE.88591 fr_BE.ISO8859-1
+fr_BE.88591.en fr_BE.ISO8859-1
+fr_CA fr_CA.ISO8859-1
+Fr_CA fr_CA.ISO8859-1
+Fr_CF fr_CF.ISO8859-1
+Fr_CA.IBM-850 fr_CA.ISO8859-1
+fr_CA.88591 fr_CA.ISO8859-1
+fr_CA.88591.en fr_CA.ISO8859-1
+fr_CH fr_CH.ISO8859-1
+fr_CH.88591 fr_CH.ISO8859-1
+fr_CH.88591.en fr_CH.ISO8859-1
+fr_FR fr_FR.ISO8859-1
+fr_FR.88591 fr_FR.ISO8859-1
+fr_FR.88591.en fr_FR.ISO8859-1
+FRE_FR.8859 fr_FR.ISO8859-1
+FRE_FR.8859.in fr_FR.ISO8859-1
+Gr_GR el_GR.ISO8859-7
+hr hr_HR.ISO8859-2
+hr_HR hr_HR.ISO8859-2
+hu hu_HU.ISO8859-2
+hu_HU hu_HU.ISO8859-2
+is is_IS.ISO8859-1
+is_IS is_IS.ISO8859-1
+it it_IT.ISO8859-1
+it_IT it_IT.ISO8859-1
+it_IT.88591 it_IT.ISO8859-1
+it_IT.88591.en it_IT.ISO8859-1
+it_CH it_CH.ISO8859-1
+iw iw_IL.ISO8859-8
+iw_IL iw_IL.ISO8859-8
+ja ja_JP.eucJP
+ja_JP ja_JP.eucJP
+ja_JP.ujis ja_JP.eucJP
+ja_JP.eucJP ja_JP.eucJP
+Ja_JP ja_JP.eucJP
+Jp_JP ja_JP.eucJP
+Jp_JP.IBM-932 ja_JP.eucJP
+ja_JP.AJEC ja_JP.eucJP
+ja_JP.EUC ja_JP.eucJP
+ja_JP.ISO-2022-JP ja_JP.JIS7
+ja_JP.JIS ja_JP.JIS7
+ja_JP.jis7 ja_JP.JIS7
+ja_JP.mscode ja_JP.SJIS
+ja_JP.SJIS ja_JP.SJIS
+ko ko_KR.eucKR
+ko_KR ko_KR.eucKR
+ko_KR.EUC ko_KR.eucKR
+ko_KR.euc ko_KR.eucKR
+mk mk_MK.ISO8859-5
+mk_MK mk_MK.ISO8859-5
+nl nl_NL.ISO8859-1
+nl_BE nl_BE.ISO8859-1
+Nl_BE nl_BE.ISO8859-1
+Nl_BE.IBM-850 nl_BE.ISO8859-1
+nl_BE.88591 nl_BE.ISO8859-1
+nl_BE.88591.en nl_BE.ISO8859-1
+nl_NL nl_NL.ISO8859-1
+Nl_NL nl_NL.ISO8859-1
+Nl_NL.IBM-850 nl_NL.ISO8859-1
+nl_NL.88591 nl_NL.ISO8859-1
+nl_NL.88591.en nl_NL.ISO8859-1
+no no_NO.ISO8859-1
+no_NO no_NO.ISO8859-1
+no_NO.88591 no_NO.ISO8859-1
+no_NO.88591.en no_NO.ISO8859-1
+pl pl_PL.ISO8859-2
+pl_PL pl_PL.ISO8859-2
+pt pt_PT.ISO8859-1
+pt_PT pt_PT.ISO8859-1
+Pt_PT pt_PT.ISO8859-1
+Po_PO pt_PT.ISO8859-1
+Pt_PT.IBM-850 pt_PT.ISO8859-1
+pt_PT.88591 pt_PT.ISO8859-1
+pt_PT.88591.en pt_PT.ISO8859-1
+ro ro_RO.ISO8859-2
+ro_RO ro_RO.ISO8859-2
+ru ru_SU.ISO8859-5
+ru_SU ru_SU.ISO8859-5
+sh sh_YU.ISO8859-2
+sh_YU sh_YU.ISO8859-2
+sk sk_SK.ISO8859-2
+sk_SK sk_SK.ISO8859-2
+sl sl_CS.ISO8859-2
+sl_CS sl_CS.ISO8859-2
+sp sp_YU.ISO8859-5
+sp_YU sp_YU.ISO8859-5
+sv sv_SE.ISO8859-1
+sv_SE sv_SE.ISO8859-1
+Sv_SE sv_SE.ISO8859-1
+Sv_SV sv_SE.ISO8859-1
+Sv_SE.IBM-850 sv_SE.ISO8859-1
+sv_SE.88591 sv_SE.ISO8859-1
+sv_SE.88591.en sv_SE.ISO8859-1
+th_TH th_TH.TACTIS
+tr tr_TR.ISO8859-9
+tr_TR tr_TR.ISO8859-9
+zh zh_CN.eucCN
+zh_CN zh_CN.eucCN
+zh_CN.EUC zh_CN.eucCN
+zh_TW zh_TW.eucTW
+zh_TW.EUC zh_TW.eucTW
+arabic ar_AA.ISO8859-6
+bulgarian bg_BG.ISO8859-5
+chinese-s zh_CN.eucCN
+chinese-t zh_TW.eucTW
+croatian hr_HR.ISO8859-2
+czech cs_CS.ISO8859-2
+danish da_DK.ISO8859-1
+dutch nl_BE.ISO8859-1
+finnish fi_FI.ISO8859-1
+french fr_CH.ISO8859-1
+german de_CH.ISO8859-1
+greek el_GR.ISO8859-7
+hebrew iw_IL.ISO8859-8
+hungarian hu_HU.ISO8859-2
+icelandic is_IS.ISO8859-1
+iso_8859_1 en_US.ISO8859-1
+ISO8859-1 en_US.ISO8859-1
+italian it_CH.ISO8859-1
+japan ja_JP.eucJP
+japanese ja_JP.eucJP
+Japanese-EUC ja_JP.eucJP
+korean ko_KR.eucKR
+norwegian no_NO.ISO8859-1
+polish pl_PL.ISO8859-2
+portuguese pt_PT.ISO8859-1
+rumanian ro_RO.ISO8859-2
+russian ru_SU.ISO8859-5
+serbocroatian sh_YU.ISO8859-2
+slovak sk_SK.ISO8859-2
+slovene sl_CS.ISO8859-2
+spanish es_ES.ISO8859-1
+swedish sv_SE.ISO8859-1
+turkish tr_TR.ISO8859-9
diff --git a/misc/ChangeLog b/misc/ChangeLog
new file mode 100644
index 0000000..649f1ff
--- /dev/null
+++ b/misc/ChangeLog
@@ -0,0 +1,699 @@
+2000-05-06 Ulrich Drepper <drepper@redhat.com>
+
+ * gettextize.in: Remove code to test for version of the m4 files.
+
+ * po-mode.el: A few more changes by Fran^Áçois Pinard.
+
+1998-05-03 Fran^Áçois Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el (po-create-overlay) [po-XEMACS]: No argument.
+ Reported by Ulrich Drepper.
+
+1997-10-18 Fran^Áçois Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el (po-tags-search, po-mark-found-string): C++ as C.
+ (po-find-c-string): Skip C++ comments as well.
+
+1998-05-10 Fran^Áçois Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el (po-mode) [po-XEMACS]: Explicitely add menus.
+ Reported by Hrvoje Niksic.
+
+ * po-mode.el (po-mode-menu-layout): Give real access to auxiliary
+ files through the menu, instead of leaving menu entries inactive.
+
+1998-05-15 Ulrich Drepper <drepper@cygnus.com>
+
+ * tcl_gettext.c (tcl_gettext): Replace illegal with invalid.
+
+1998-03-30 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el (po-tags-search, po-mark-translatable,
+ po-select-mark-and-mark): Call interactive after the doc string,
+ instead of before.
+ Reported by Tom Tromey.
+
+1998-04-27 21:17 Ulrich Drepper <drepper@cygnus.com>
+
+ * po-mode.el: Update from most recent version.
+
+ * gettextize.in: Use aclocaldir from configuration.
+
+1997-09-04 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el: Rename po-middle-of-entry to po-start-of-msgstr, add
+ variable po-start-of-msgid. Use it whenever appropriate.
+
+ * po-mode.el (po-find-file-coding-system): New function.
+ Reported by Ken'ichi Handa.
+
+ * po-mode.el: Normalise string= to string-equal.
+
+ * po-mode.el (po-send-mail): Allow for mailing to the team.
+ (po-guess-team-address): New function.
+
+1997-09-02 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el (po-set-comment): Unused variable buffer.
+ (po-edit-string): Unused variables start, middle, end and obsolete.
+ (po-tags-search): Unused variable find-string.
+
+ * po-mode.el (po-check-lock): Create the work buffer as required, to
+ avoid diagnostics about selecting a deleted buffer, after a user
+ explicitly killed the work buffer instead of exiting it normally.
+ Reported by Hrvoje Niksic.
+
+ * po-mode.el: New variable po-mode-menu-layout.
+ (po-mode): Establish a bar mode menu if possible.
+ Reported by Nils Naumann.
+
+ * po-mode.el: Decide set-translation-domain before using it.
+ This avoids a byte-compilation warning.
+
+ * po-mode.el (po-set-comment): Rearrange wrong conditional flow.
+ Translator comments were duplicated, when contents were unchanged.
+ Reported by Enrique Melero.
+
+1997-09-01 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el (po-highlight, po-dehighlight): New functions.
+ New globals: po-highlight-p, po-highlight-face and po-overlay.
+ (po-edit-msgstr): Highlight the msgid string while editing.
+ (po-tags-search): Highlight found string.
+ (po-mark-found-string): Unhilight string before replacing it.
+ Reported by Jim Meyering, Michel Robitaille and Ulrich Drepper.
+
+ * po-mode.el (po-set-field): Tells if buffer was modified.
+ (po-edit-msgstr): Never make fuzzy an entry which is unmodified.
+
+ * po-mode.el: Add M command, and variables po-compose-mail-function,
+ po-translation-project-address and po-gzip-uuencode-command.
+ (po-guess-archive-name, po-send-mail): New functions.
+ Reported by Karl Eichwalder.
+
+1997-08-31 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el (po-replace-revision-date): Enforce ISO 8601 zones.
+ Reported by Enrique Melero Gómez, Karl Eichwalder, Max de
+ Mendizabal and Santiago Vila Doncel.
+
+ * po-mode.el (po-edit-string): Expand tabs while editing
+ translations. Reported by Göran Uddeborg.
+
+ * po-mode.el: Accept C-c C-k to abort recursive edits.
+ Reported by Göran Uddeborg and Hrvoje Niksic.
+
+1997-06-02 Ben Pfaff <pfaffben@pilot.msu.edu>
+
+ * po-mode.el (po-find-c-string, po-extract-unquoted): Process ANSI
+ string concatenation and K&R escaped newlines.
+
+1997-03-02 Hrvoje Niksic <hniksic@srce.hr>
+
+ * po-mode.el (po-help): To continue, also accept things like a
+ mouse press or an arrow key.
+
+1996-11-12 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el: Alter po-font-lock-keywords to properly highlight C
+ formats, when using an upper case letter as formatting functor.
+
+ * po-mode.el: If available, prefer force-mode-line-update builtin.
+
+ * po-mode.el: Use our own buffer-substring, defining it as
+ buffer-substring-no-properties if available. Because of text
+ properties, buffer-substring does not always return a string.
+
+ * po-mode.el (po-consider-source-path): Ensure a trailing slash.
+
+1996-05-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * po-mode.el (po-eval-requoted, po-extract-unquoted): Correct
+ missing or spurious backslashes in some regexps.
+
+1997-08-01 15:49 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Require version 1.2.
+
+1997-04-12 Hrvoje Niksic <hniksic@srce.hr>
+
+ * po-mode.el: Customize.
+
+1997-03-10 06:56 Ulrich Drepper <drepper@cygnus.com>
+
+ * elisp-comp: Use EMACS environment variable is available instead
+ of always executing emacs.
+
+1996-12-03 23:24 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettextize.in: Update --help and --version texts.
+
+1996-11-22 04:45 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (EXTRA_DIST): Add locale.alias.
+
+1996-11-21 23:11 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am: Remove rules for ELisp handling. Automake now
+ knows what to do.
+
+1996-10-28 23:09 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettextize.in: Remove -v from help message. Change format of
+ --version text according to last GNU coding standard. Don't print
+ help message for unknown option. Instead print "Try `..."
+ message.
+
+1996-10-19 17:41 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * locale.alias: Language for czech entry must be cs.
+
+1996-09-18 00:29 François Pinard <pinard@progiciels-bpi.ca>
+
+ * po-mode.el (po-font-lock-keywords): Correct highlighting of
+ formats like %3d.
+
+1996-08-19 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el: Restructured to avoid all byte-compilation warnings.
+ Highlighting using `hilit19' is being deprecated, font lock code
+ should now automatically be activated whenever available.
+
+1996-07-15 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el: po-mode.el (po-kill-msgstr): Ensure po-entry-type is
+ always defined before decreasing counter.
+
+1996-07-15 01:08 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettextize.in (gettext_dir): Remove warning that files will be
+ removed. It's not really necessary since the -f option is
+ necessary. Suggested by François Pinard.
+
+1996-06-26 18:40 Ulrich Drepper <drepper@cygnus.com>
+
+ * po-mode.el: Added ELisp support. Patch by François Pinard.
+
+1996-06-18 15:12 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettextize.in (aclocal_version): new variable. Value determined
+ by configure. This finally makes the check of the aclocal.m4
+ version number correct because this number need not be the same as
+ the version number of the package.
+
+1996-06-06 02:02 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettextize.in: Rewrite copying now that files are kept in
+ different directories and don't use funny prefixes anymore.
+
+1996-06-05 16:36 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (DISTCLEANFILES): Renamed from CLEANFILES and
+ changed $(lisp_DATA) to $(ELCFILES).
+
+1996-06-03 00:46 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (elc_DATA): Rename to elc_SCRIPTS so that
+ distribution wents smooth.
+
+1996-06-02 21:16 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (SUFFIXES): New variable. Automake wants it this
+ way to introduce new suffixes.
+
+ * Makefile.am: Initial revision.
+
+1996-06-01 18:20 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (default): Add default rule because AIX' make does
+ not understand multiple goals in default rule.
+
+ * Makefile.in (DISTFILES): Rename README-TCL to README-Tcl.
+
+ * gettextize.in: Implement test for correct aclocal.m4 version.
+
+1996-04-06 02:40 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el: Apply François' patch for new default values of
+ configuration variables and new header entry format.
+
+1996-04-02 18:56 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all-gettext): New goal. Same as all.
+
+1996-04-02 03:18 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el: * Let po-show-source-context update
+ po-reference-cursor itself, and display to the minibuffer the
+ relative and maximum position of the shown reference in the list
+ of collected references. Callers adjusted accordingly.
+ . Do not generate tildes while reconstructing non-obsolete
+ comments.
+ . Do merge attributes on a single `#,' line. Using the non-regexp
+ version of the search was causing the generation of another one.
+ . Remove a spurious trailing comma while removing the last
+ attribute.
+ . Limit the search for source references to the msgstr line. This
+ does not correct any bug, but is more consistent.
+
+1996-03-31 23:32 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el: * Small corrections to the help page. Reported by
+ Karl Eichwalder.
+
+ * Change po-edit-mode-map to po-subedit-mode-map and
+ po-mode-edit-hook to po-subedit-mode-hook. The previous names
+ were not consistent. Reported by Karl Eichwalder.
+
+ * Repair RET, completely broken for multi-lines, maybe showing a
+ regexp bug in Emacs(?). See the FIXME in po-extract-unquoted.
+ Reported by Karl Eichwalder.
+
+1996-03-31 22:36 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in (prefix): Define from @prefix@. Is used in
+ gettext_dir definition. Reported by Jim Meyering.
+
+1996-03-28 19:11 Karl Eichwalder <ke@ke.Central.DE>
+
+ * gettextize.in (gettext_dir): Set to @datadir@/gettext.
+
+1996-03-26 21:27 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (datadir): Initialize from @datadir@. Reported by
+ Karl Eichwalder.
+
+1996-03-25 09:52 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el: * Correct documentation mistakes in short help.
+
+ * Accept both # and #~ for obsolete comments, but use #~ when
+ generating them.
+
+ * Recognize \NNN octal notation for characters in PO file strings,
+ however, never produce such horror.
+
+1996-03-25 03:51 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el: Some last minute changes by François Pinard.
+
+1996-03-24 18:51 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el (po-confirm-and-quit): Recognize both #, and #! but
+ prefer producing #,.
+
+ * Rephrase messages about location stack contents
+ * Clear out message when user refuses quitting.
+
+1996-03-23 14:34 François Pinard <pinard@iro.umontreal.ca>
+
+ * Implement po-default-file-header.
+ Reported by Karl Eichwalder.
+
+ * Rename po-auto-select to po-auto-select-entry.
+
+ * Revise text of all disruptive questions, try to alleviate
+ them, avoid them if possible. Clear the message area sometimes.
+
+ * Correct a bug by which `#! fuzzy' was inserted before the
+ white line, instead of after, for PO files having no `#' line
+ of any kind.
+
+ * Correct the message count updating in po-kill-msgstr and
+ po-yank-msgstr.
+
+ * Allow for po-auto-edit-with-msgid to work, when
+ po-edit-msgstr was called on an untranslated immediately after
+ loading a PO file.
+
+ * po-quit may select all kind of not fully processed entries,
+ rather than just untranslate ones.
+
+ Rebound commands:
+ * TAB moves to LFD for po-msgid-to-msgstr.
+ * z moves to DEL for po-fade-out-entry.
+
+ New commands:
+ * TAB is po-unfuzzy.
+ * SPC is po-auto-select.
+ * t is po-next-translated entry.
+ * M-t is po-previous-translated-entry.
+ * E is po-edit-out-full.
+
+ Improved commands:
+ * DEL (po-fade-out-entry) makes the entry fuzzy as first step,
+ and request confirmation for some transitions.
+ * LFD (po-msgid-to-msgstr) requests confirmation if entry was
+ already translated.
+ * v (po-validate): Pass the -v flag to msgfmt.
+ * q (po-confirm-and-quit): Use milder confirmation.
+ * Implemented variables po-auto-edit-with-msgid,
+ po-auto-fuzzy-on-edit, po-auto-select-on-unfuzzy, and
+ po-auto-replace-revision-date.
+
+ PO header management:
+ * PO-Revision-Date might be automatically updated.
+ Reported by Karl Eichwalder.
+ * A normalized PO file header is automatically created if it
+ not exists. Any previous PO file header is kept, obsoleted.
+
+ Various internal cleanups:
+ * Revised the PO mode summary display.
+ * ...-hooks renamed ...-hook, per word of Richard Stallman.
+ * po-obsolete-flag replaced by more general po-entry-type.
+ * po-appropriate-counter, po-increase-appropriate-counter and
+ po-decrease-appropriate-counter are replaced by po-type-counter,
+ po-decrease-type-counter and po-increase-type-counter.
+ Overall counting logic revised and cleaned up.
+ * The concept of being after last entry disappears. Being
+ after last entry is equivalent to being on last entry. And
+ since there is at least the PO header entry, and an empty PO
+ file is not possible anymore: simplified code accordingly.
+ * po-add-attribute, po-delete-attribute: New functions.
+ * po-offer-validation disappears, as (buffer-modified-p) may
+ be used instead.
+
+1996-03-14 16:55 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el: Inexact entries are now called fuzzy. Change
+ regular expression and function names.
+
+1996-03-14 11:38 François Pinard <pinard@iro.umontreal.ca>
+
+ * po-mode.el: Rename po-mode-hooks to po-mode-edit-hooks.
+
+ * po-mode.el: Suggest accepting .pot and embedded .po. as triggers
+ for PO editing mode, besides .po and .pox.
+ * PO mode help display has been revised to fit in 23 lines,
+ and present some more yet unimplemented commands. PO mode
+ initially suggests using `h' or `?' for documentation.
+ * Many variables and functions have been renamed for more
+ clarity and consistency, too numerous to be detailed here.
+ * Reorganization of key-bindings. This restores to M-w and M-y
+ their usual meaning, and free some keys for to-be-implemented
+ commands: the a/M-a/A/M-A series for auxiliary files, c/M-c
+ for compendium files, and l/M-l/L/M-L series for lexicon files.
+ . Commands u, v, o and q have been renamed U, V, O and Q
+ (po-undo, po-validate, po-other-window and po-quit).
+ . Command v replaces old command V (po-mode-version).
+ . u and SPC replace e (po-next-untranslated-entry).
+ M-u replaces M-e (po-previous-untranslated-entry).
+ . o replaces M-n and M-SPC (po-next-obsolete-entry).
+ M-o replaces M-p and M-DEL (po-previous-obsolete-entry).
+ . SPC, DEL, and M-RET are no more po-next-entry,
+ po-previous-entry and po-edit-comment.
+ . r replaces l (po-pop-location).
+ . s (po-cycle-source-reference) replaces c (po-cycle-reference).
+ M-s (po-select-source-reference) replaces M-c (po-select-reference).
+ S (po-consider-source-path) replaces d (po-add-path).
+ M-S (po-ignore-source-path) replaces M-d (po-delete-path).
+ . K, W and Y replace M-k, M-w and M-y (po-kill-comment,
+ po-kill-ring-save-comment and po-yank-comment).
+ * New command q (po-confirm-and-quit).
+
+1996-03-13 13:16 Karl Eichwalder <ke@ke.Central.DE>
+
+ * po-mode.el (po-edit-string): run hook `po-edit-hooks'.
+
+1996-03-09 12:39 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el (po-keywords): Add N_.
+
+1996-01-15 02:58 François Pinard <pinard@iro.umontreal.ca>
+
+ * gettextize.in: Better message about aclocal.m4 change.
+
+1995-12-19 22:41 Ulrich Drepper <drepper@myware>
+
+ * README-TCL, tcl_gettext.c: Initial revision.
+
+ * Makefile.in (DISTFILES): Add tcl_gettext and README-TCL.
+
+1995-12-19 22:12 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (Makefile, gettextize): Explicitly use $(SHELL) for
+ running shell scripts.
+
+1995-12-16 15:31 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in: Implement -c option: always copy files.
+ Requested by Roland McGrath.
+
+1995-12-05 11:41 Larry Schwimmer <rosebud@cyclone.stanford.edu>
+
+ * Makefile.in (install-data): Make sure $(localedir) exists.
+
+1995-11-27 02:50 Sakai Kiyotaka <ksakai@netwk.ntt-at.co.jp>
+
+ * locale.alias: New entry for Japanese.
+
+1995-11-24 23:53 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el (po-quit): Always clear the message area after y-or-n-p.
+
+1995-11-11 16:30 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el: Implement searching of inexact entries.
+
+ * po-mode.el: Implement po-version.
+
+1995-11-08 01:46 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el:
+ Hilit file names and line numbers in #: with function-name face.
+
+ * po-mode.el: Add support for XEmacs' font-lock.el.
+
+ * po-mode.el:
+ Patches by Franc,ois: enable hilit, handle multi-line #: lines, and
+ don't pass -v argument to msgfmt.
+
+1995-11-06 15:52 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el: msgfmt behaves now well again. Return to use
+ /dev/null as output file for verification.
+
+1995-11-05 19:39 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist-gettext): Make synonym for dist.
+
+1995-11-05 15:40 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Suppress error message when ln failed.
+ Get files from $(srcdir) explicitly.
+
+1995-11-01 10:39 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in:
+ Don't use "!" as negation; not all versions of sh support it. Patch
+ by Tom Tromey.
+
+1995-10-31 20:46 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el (po-msgfmt-program):
+ Variable which contains name of the msgfmt program.
+ (po-validate): Use above variable.
+
+1995-10-31 19:12 Tom Tromey <tromey@cambric.colorado.edu>
+
+ * gettextize.in: Don't use "!" as negation; not all versions of sh
+ support it.
+
+1995-10-30 22:22 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el (po-validate):
+ Protect the previous value of compile-command.
+ Change by Franc,ois Pinard.
+
+1995-10-29 12:11 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in:
+ Change text of trailing message about aclocal.m4 changing. Suggested
+ by Franc,ois Pinard.
+
+ * Makefile.in (INSTALL_PROGRAM): Not used anymore.
+ (INSTALL_SCRIPT): New variable,
+ (install-exec): Install gettextize using INSTALL_SCRIPT.
+
+ * po-mode.el (po-eval-requoted): Add space in description.
+
+ * Makefile.in: Remove Emacs local variable setting.
+
+1995-10-28 22:09 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): Move some rules from install-data.
+ (install-data): Add installation of locale.alias.
+
+ * locale.alias: Initial revision
+
+1995-10-28 18:08 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el: Apply latest patch by Franc,ois.
+
+1995-09-23 14:34 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in:
+ Run config.status shell script if this is exists and is selected. This
+ is always necessary if one updates the intl/ dir.
+
+1995-09-20 22:26 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in:
+ Try to remove files in root and po/ dir before linking. If this is
+ not done re-linking to the same file will cause an error.
+
+1995-09-07 00:21 Ulrich Drepper <drepper@myware>
+
+ * gettext-sh: Protect IFS assignments.
+
+1995-08-22 22:12 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in (usage):
+ Rearrange help message. Now describe -f option.
+ Reported by Franc,ois Pinard.
+
+1995-08-19 23:32 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in: Add missing terminating quotes.
+
+ * Makefile.in (INSTALL_PROGRAM):
+ *Do* use -m 755. Autoconf does not set any mode.
+
+ * Makefile.in (install-src):
+ Make behave like install. I.e. really install
+ gettextize and the .elc files.
+
+1995-08-19 15:08 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in:
+ Some nicety changes of shell programming by Franc,ois Pinard.
+
+ * po-mode.el (po-search-path): Extend by "../".
+
+ * gettextize.in: Protect against relative source paths.
+ Avoid exit an second level shell.
+
+ * gettext-sh: Better comments: By Franc,ois Pinard.
+
+ * Makefile.in (INSTALL_PRG): Don't define mode ourself.
+ (uninstall) Remove gettextize.
+
+ * gettextize.in:
+ intl/VERSION is now a real file and must not be generated here.
+
+1995-08-18 12:05 Ulrich Drepper <drepper@myware>
+
+ * gettext-sh: Use -s option for gettext instead of --shell-script.
+
+1995-08-15 10:49 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all, check):
+ Add gettextize to dependencies, so that install need not
+ build anything.
+
+1995-08-15 07:13 Ulrich Drepper <drepper@myware>
+
+ * gettextize.in: Add intl/VERSION file.
+
+ * gettextize.in: Remove target file for root- and po- file first.
+
+ * gettextize.in:
+ Files installed in top directory of package are now preceded by root-.
+ All other are ignore (esp aclocal.m4).
+
+1995-08-14 23:50 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (exec_prefix, bindir):
+ Directories needed for installing gettextize.
+ (transform): Standard GNU program name transformation.
+ (INSTALL_PROGRAM): Program to install gettextize as executable.
+ (DISTFILES): Remove makelinks.in. Distribute gettextize.in instead.
+ (install-src): Install gettextize in selected binary directory.
+
+ * gettextize.in: Initial revision
+
+1995-08-10 22:18 Ulrich Drepper <drepper@myware>
+
+ * gettext-sh: Fix typos. Reported by Franc,ois Pinard.
+ (TEXTDOMAIN): Set value from ${PACKAGE-NAME} variable and document it.
+
+1995-08-08 21:45 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Add locale.alias.
+
+1995-08-07 23:48 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): gettext.perl moved from intl/.
+ gettext-sh: New file.
+
+ * gettext-sh: Initial revision.
+
+ * elisp-comp:
+ Use `rm -fr $tempdir' instead of `rm -f $tempdir/*; rmdir $tempdir'
+ because some NFS implementation create .nfsxxx files which are
+ not caught be the *. Reported by Paul Nevai.
+
+1995-08-04 22:38 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (.el.elc):
+ Include Franc,ois' wonderful pun to highlight warning text.
+
+ * Makefile.in (distclean): Remove makelinks.
+
+ * Makefile.in (dist): Remove `copying instead' message.
+
+1995-08-02 19:44 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): makelinks.in instead of makelinks-sh.
+
+ * makelinks.in: First try making symbolic links.
+ Rename to makelinks.in because it will be configure by
+ config.status.
+
+1995-08-01 15:54 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el: Fixes to run on DEMACS.
+ Provided by Franc,ois Pinard.
+
+ * Makefile.in (check): Make same as all.
+
+1995-08-01 10:32 Ulrich Drepper <drepper@myware>
+
+ * makelinks-sh: Implement option handling.
+ When intl/ subdir exist give warning and exit unless option -f
+ is given.
+ Use ${echo} in place where translations will be necessary.
+
+1995-07-26 01:24 Ulrich Drepper <drepper@myware>
+
+ * makelinks-sh: Update for correct intl_files list.
+ Handle existing directories.
+ Handle non-existing ln and/or ln -s.
+ Mostly by Franc,ois Pinard.
+
+1995-07-22 01:14 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (prefix,datadir,lispdir): New definitions.
+ (SITELISPDIR): Remove variable.
+ (all): Now build *.elc files.
+ (install,uninstall): Specify complete path of files to delete.
+
+1995-07-20 00:03 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): elisp-comp was missing.
+
+1995-07-18 23:53 Ulrich Drepper <drepper@myware>
+
+ * po-mode.el: Latest version by Franc,ois. This version allows
+ scanning C source code for translatable strings and interactive
+ construction of the .po file. The string matching heuristic is
+ due to Richard Stallman.
+
+1995-07-18 01:32 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Add magic.add. Comes from ../.
+
+ * po-mode.el, makelinks, combine-sh: Moved to here from ../intl/.
+ magic.add: Moved to here from ../.
+
+ * Makefile.in: Initial revision
diff --git a/misc/Makefile.am b/misc/Makefile.am
new file mode 100644
index 0000000..aaf822d
--- /dev/null
+++ b/misc/Makefile.am
@@ -0,0 +1,31 @@
+## Makefile for the misc subdirectory of the GNU NLS Utilities
+## Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+## Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+localedir = $(datadir)/locale
+
+EXTRA_DIST = combine-sh gettext.perl gettext-sh magic.add tcl_gettext.c \
+README-Tcl po-mode.el locale.alias
+DISTCLEANFILES = gettextize
+lisp_LISP = po-mode.el
+
+bin_SCRIPTS = gettextize
+
+locale_DATA = locale.alias
diff --git a/misc/Makefile.in b/misc/Makefile.in
new file mode 100644
index 0000000..a2ec62d
--- /dev/null
+++ b/misc/Makefile.in
@@ -0,0 +1,307 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+ACLOCAL_VERSION = @ACLOCAL_VERSION@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+EMACS = @EMACS@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LIBOBJS = @LIBOBJS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+YACC = @YACC@
+aclocaldir = @aclocaldir@
+l = @l@
+lispdir = @lispdir@
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+localedir = $(datadir)/locale
+
+EXTRA_DIST = combine-sh gettext.perl gettext-sh magic.add tcl_gettext.c README-Tcl po-mode.el locale.alias
+
+DISTCLEANFILES = gettextize
+lisp_LISP = po-mode.el
+
+bin_SCRIPTS = gettextize
+
+locale_DATA = locale.alias
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = gettextize
+SCRIPTS = $(bin_SCRIPTS)
+
+LISP = $(lisp_LISP)
+
+ELCFILES = po-mode.elc
+DATA = $(locale_DATA)
+
+DIST_COMMON = ChangeLog Makefile.am Makefile.in elisp-comp \
+gettextize.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .el .elc
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnits misc/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+gettextize: $(top_builddir)/config.status gettextize.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else :; fi; fi; \
+ done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_SCRIPTS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+
+install-lispLISP: $(lisp_LISP) $(ELCFILES)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(lispdir)
+ @list='$(lisp_LISP)'; for p in $$list; do \
+ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(lispdir)/$$p"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(lispdir)/$$p; \
+ if test -f $${p}c; then \
+ echo " $(INSTALL_DATA) $${p}c $(DESTDIR)$(lispdir)/$${p}c"; \
+ $(INSTALL_DATA) $${p}c $(DESTDIR)$(lispdir)/$${p}c; \
+ else : ; fi; \
+ done
+
+uninstall-lispLISP:
+ @$(NORMAL_UNINSTALL)
+ list='$(lisp_LISP)'; for p in $$list; do \
+ rm -f $(lispdir)/$$p $(DESTDIR)$(lispdir)/$${p}c; \
+ done
+.el.elc:
+ @echo 'WARNING: Warnings can be ignored. :-)'
+ if test $(EMACS) != no; then \
+ EMACS=$(EMACS) $(SHELL) $(srcdir)/elisp-comp $<; \
+ fi
+
+mostlyclean-lisp:
+
+clean-lisp:
+ -test -z "$(ELCFILES)" || rm -f $(ELCFILES)
+
+distclean-lisp:
+
+maintainer-clean-lisp:
+
+install-localeDATA: $(locale_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(localedir)
+ @list='$(locale_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(localedir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(localedir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(localedir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(localedir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-localeDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(locale_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(localedir)/$$p; \
+ done
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = misc
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits misc/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binSCRIPTS
+install-exec: install-exec-am
+
+install-data-am: install-lispLISP install-localeDATA
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binSCRIPTS uninstall-lispLISP \
+ uninstall-localeDATA
+uninstall: uninstall-am
+all-am: Makefile $(SCRIPTS) $(LISP) $(ELCFILES) $(DATA)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(lispdir) \
+ $(DESTDIR)$(localedir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-lisp mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-lisp clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-lisp distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-lisp maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: uninstall-binSCRIPTS install-binSCRIPTS uninstall-lispLISP \
+install-lispLISP mostlyclean-lisp distclean-lisp clean-lisp \
+maintainer-clean-lisp uninstall-localeDATA install-localeDATA tags \
+distdir info-am info dvi-am dvi check check-am installcheck-am \
+installcheck install-exec-am install-exec install-data-am install-data \
+install-am install uninstall-am uninstall all-redirect all-am all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/misc/README-Tcl b/misc/README-Tcl
new file mode 100644
index 0000000..7b9f6f9
--- /dev/null
+++ b/misc/README-Tcl
@@ -0,0 +1,52 @@
+ Gettext support for Tcl
+ =======================
+
+The file `tcl_gettext.c' contains the first attempt to provide an
+interface for Tcl. I know that TclX already supports `catgets', but
+because GNU uses `gettext' and because I think `gettext' is the better
+concept I wrote this file.
+
+
+Unlike many other interpreter extension I haven't provided a
+`tclAppInit.c' file. I have three reason: it's easy to write (see
+Ousterhout's book), It will probably combined with other extensions
+and so would be more or less useless. But the most important reason
+is that I don't find Tcl useful without the dynamic loading introduced
+in version 7.5.
+
+The way I think you should use this module is to build a dynamic
+object and load it at runtime with the command `load'. The following
+transcript shows the way I work on my Linux/ELF box. Consult other
+Tcl modules or a local wizard to see how it works for your system.
+
+
+1. Compile the file to position independent object code:
+
+ gcc -fPIC -O3 -c tcl_gettext.c
+
+ (The file `tcl.h' from tcl7.5 or up and `libintl.h' as installed
+ from GNU gettext must be found in the path.)
+
+2. Link the file to a shared object:
+
+ gcc -shared -o gettext.so tcl_gettext.o -lintl
+
+ (The system's or GNU gettext libintl.a must be found in the path
+ of the linker.)
+
+3. Now we are ready to run:
+
+bash> tclsh7.5
+% load ./gettext.so Gettext
+% textdomain "xxx"
+% gettext "some string"
+The translated form
+% exit
+bash>
+
+
+If you have some ideas how to improve this or you found a bug, please
+let me know.
+
+Ulrich Drepper <drepper@gnu.ai.mit.edu>, 18. December 1995.
+
diff --git a/misc/combine-sh b/misc/combine-sh
new file mode 100755
index 0000000..b26fb4f
--- /dev/null
+++ b/misc/combine-sh
@@ -0,0 +1,141 @@
+#!/bin/sh
+
+TMPDIR=/tmp
+TMPNAME=/tmp/combine1.$$.sed
+
+trap 'rm -fr $TMPNAME combine; exit 1' 1 2 15
+
+rm -f $TMPNAME
+cat > $TMPNAME <<EOF
+/@@ end of prolog @@/,/@@ begin of epilog @@/!d
+/@@ end of prolog @@/ {
+ =
+ d
+}
+/@@ begin of epilog @@/d
+EOF
+
+
+rm -fr combine
+mkdir combine
+cat > combine/libintl.c <<EOF
+/* Combined sources of GNU gettext library
+ Copyright (C) 1995 Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#define USE_COMBINED_HEADER 1
+#include "libintlP.h"
+
+#if HAVE_CATGETS
+
+#include <stdlib.h>
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef HAVE_NL_TYPES_H
+# include <nl_types.h>
+#endif
+
+EOF
+
+CATCFILES=cat-compat.c
+GETCFILES="bindtextdom.c dcgettext.c dgettext.c finddomain.c gettext.c \
+loadmsgcat.c textdomain.c"
+
+for file in $CATCFILES; do
+ sed -f $TMPNAME < $file \
+ | sed -e '1s/.*/#line & "'$file'"/' >> combine/libintl.c
+done
+cat >> combine/libintl.c <<EOF
+
+#else /* !HAVE_CATGETS */
+
+#include <alloca.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifdef HAVE_MMAP
+# include <sys/mman.h>
+#endif
+
+EOF
+for file in $GETCFILES; do
+ sed -f $TMPNAME < $file \
+ | sed -e '1s/.*/#line & "'$file'"/' >> combine/libintl.c
+done
+cat >> combine/libintl.c <<EOF
+#endif /* HAVE_CATGETS */
+EOF
+
+cat > combine/libintlP.h <<EOF
+/* Combined header files of GNU gettext library
+ Copyright (C) 1995 Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+EOF
+
+PUBHEAD=libgettext.h
+PRIVHEAD="gettext.h gettextP.h hash-string.h"
+
+for file in $PUBHEAD; do
+ sed -f $TMPNAME < $file \
+ | sed -e '1s/.*/#line & "'$file'"/' >> combine/libintlP.h
+done
+cat >> combine/libintlP.h <<EOF
+
+#ifdef USE_COMBINED_HEADER
+EOF
+for file in $PRIVHEAD; do
+ sed -f $TMPNAME < $file \
+ | sed -e '1s/.*/#line & "'$file'"/' >> combine/libintlP.h
+done
+cat >> combine/libintlP.h <<EOF
+#endif /* USE_COMBINED_HEADER */
+EOF
+
+
+rm -f $TMPNAME
+exit 0
diff --git a/misc/elisp-comp b/misc/elisp-comp
new file mode 100755
index 0000000..ddd15f6
--- /dev/null
+++ b/misc/elisp-comp
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+# François Pinard <pinard@iro.umontreal.ca>, 1995.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This script byte-compiles all `.el' files which are part of its
+# arguments, using GNU Emacs, and put the resulting `.elc' files into
+# the current directory, so disregarding the original directories used
+# in `.el' arguments.
+#
+# This script manages in such a way that all Emacs LISP files to
+# be compiled are made visible between themselves, in the event
+# they require or load-library one another.
+
+if test $# = 0; then
+ echo 1>&2 "No files given to $0"
+else
+ tempdir=elc.$$
+ mkdir $tempdir
+ cp $* $tempdir
+ cd $tempdir
+
+ echo "(setq load-path (cons nil load-path))" > script
+ ${EMACS-emacs} -batch -l script -f batch-byte-compile *.el
+ mv *.elc ..
+
+ cd ..
+ rm -fr $tempdir
+fi
diff --git a/misc/gettext-sh b/misc/gettext-sh
new file mode 100644
index 0000000..ee15bab
--- /dev/null
+++ b/misc/gettext-sh
@@ -0,0 +1,63 @@
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Shell script excerpt to be inserted in shell scripts which are intended
+# to be internationalized using GNU gettext.
+#
+# Precondition:
+# ${PACKAGE-IDENT} is the name of one program of the package which
+# understands the --print-text-domain-dir option
+# ${PACKAGE-NAME} is the name of the message domain the package uses
+# ${PATH} should list all directories which should be searched
+# for either `gettext' or ${PACKAGE-IDENT}.
+#
+# Postcondition:
+# ${echo} command to use like Un*x echo command which translates
+# its arguments when a translation is available.
+#
+save_IFS="${IFS}"
+IFS="${IFS}:"
+gettext_dir=FAILED
+locale_dir=FAILED
+for dir in ${PATH}
+do
+ if test "${gettext_dir}" = "FAILED" && test -x ${dir}/gettext \
+ && (${dir}/gettext --version >/dev/null 2>&1)
+ then
+ set `${dir}/gettext --version 2>&1`
+ if test "$3" = "GNU"
+ then
+ gettext_dir=${dir}
+ fi
+ fi
+ if test "${locale_dir}" = "FAILED" && test -x ${dir}/${PACKAGE-IDENT} \
+ && (${dir}/${PACKAGE-IDENT} --print-text-domain-dir >/dev/null 2>&1)
+ then
+ locale_dir=`${dir}/${PACKAGE-IDENT} --print-text-domain-dir`
+ fi
+done
+IFS="${save_IFS}"
+if test "${locale_dir}" = "FAILED" || test "${gettext_dir}" = "FAILED"
+then
+ echo=echo
+else
+ TEXTDOMAINDIR=${locale_dir}
+ export TEXTDOMAINDIR
+ TEXTDOMAIN=${PACKAGE-NAME}
+ export TEXTDOMAIN
+ echo="${gettext_dir}/gettext -s"
+fi
diff --git a/misc/gettext.perl b/misc/gettext.perl
new file mode 100644
index 0000000..7bd1ee8
--- /dev/null
+++ b/misc/gettext.perl
@@ -0,0 +1,86 @@
+# Toying at an interface between Perl and GNU gettext .mo format.
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# François Pinard <pinard@iro.umontreal.ca>, 1995.
+
+textdomain ("tar");
+print &_("Try \`%s --help\' for more information.\n");
+exit 0;
+
+## --------------------------------------------------------------- ##
+## The `&textdomain (DOMAIN_NAME)' routine reads the given domain ##
+## into an associative array %_, able to later translate strings. ##
+## --------------------------------------------------------------- ##
+
+sub textdomain
+{
+ local ($language, $catalog, $domain, $buffer);
+ local ($reverse);
+ local ($magic, $revision, $nstrings, $orig_tab_offset, $trans_tab_offset);
+ local ($orig_length, $orig_pointer, $trans_length, $trans_pointer);
+
+ %_ = ();
+
+ $language = $ENV{"LANG"};
+ return if ! $language;
+ $domain = $_[0];
+ $catalog = "/usr/local/share/locale/$language/LC_MESSAGES/$domain.mo";
+
+ open (CATALOG, $catalog) || return;
+ sysread (CATALOG, $buffer, (stat CATALOG)[7]);
+ close CATALOG;
+
+ $magic = unpack ("I", $buffer);
+ if (sprintf ("%x", $magic) eq "de120495")
+ {
+ $reverse = 1;
+ }
+ elsif (sprintf ("%x", $magic) ne "950412de")
+ {
+ die "Not a catalog file\n";
+ }
+
+ $revision = &mo_format_value (4);
+ $nstrings = &mo_format_value (8);
+ $orig_tab_offset = &mo_format_value (12);
+ $trans_tab_offset = &mo_format_value (16);
+
+ while ($nstrings-- > 0)
+ {
+ $orig_length = &mo_format_value ($orig_tab_offset);
+ $orig_pointer = &mo_format_value ($orig_tab_offset + 4);
+ $orig_tab_offset += 8;
+
+ $trans_length = &mo_format_value ($trans_tab_offset);
+ $trans_pointer = &mo_format_value ($trans_tab_offset + 4);
+ $trans_tab_offset += 8;
+
+ $_{substr ($buffer, $orig_pointer, $orig_length)}
+ = substr ($buffer, $trans_pointer, $trans_length);
+ }
+}
+
+## ----------------------------------------------------------------- ##
+## The `&mo_format_value (ADDRESS)' routine returns the value at a ##
+## given address in the .mo format catalog, once read into $buffer ##
+## by `&textdomain'. This is a service routine of `&textdomain', ##
+## which uses $buffer and $reverse variables local in that routine. ##
+## ----------------------------------------------------------------- ##
+
+sub mo_format_value
+{
+ unpack ("i",
+ $reverse
+ ? pack ("c4", reverse unpack ("c4", substr ($buffer, $_[0], 4)))
+ : substr ($buffer, $_[0], 4));
+}
+
+## ------------------------------------------------------------ ##
+## The `&_(STRING)' routine translates STRING if there is some ##
+## translation offered for it in the `%_' associative array, or ##
+## return STRING itself, otherwize. ##
+## ------------------------------------------------------------ ##
+
+sub _
+{
+ defined $_{$_[0]} ? $_{$_[0]} : $_[0];
+}
diff --git a/misc/gettextize.in b/misc/gettextize.in
new file mode 100644
index 0000000..75e3c2e
--- /dev/null
+++ b/misc/gettextize.in
@@ -0,0 +1,177 @@
+#! /bin/sh
+#
+# Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+# This file is meant for authors or maintainers which want to
+# internationalize their package with the help of GNU gettext. For
+# further information how to use it consult the GNU gettext manual.
+
+echo=echo
+progname=$0
+force=0
+configstatus=0
+origdir=`pwd`
+usage="\
+Usage: gettextize [OPTION]... [package-dir]
+ --help print this help and exit
+ --version print version information and exit
+ -c, --copy copy files instead of making symlinks
+ -f, --force force writing of new files even if old exist
+Report bugs to <bug-gnu-utils@prep.ai.mit.edu>."
+package=@PACKAGE@
+version=@VERSION@
+aclocal_version=@ACLOCAL_VERSION@
+try_ln_s=:
+
+while test $# -gt 0; do
+ case "$1" in
+ -c | --copy | --c* )
+ shift
+ try_ln_s=false ;;
+ -f | --force | --f* )
+ shift
+ force=1 ;;
+ -r | --run | --r* )
+ shift
+ configstatus=1 ;;
+ --help | --h* )
+ $echo "$usage"; exit 0 ;;
+ --version | --v* )
+ echo "$progname (GNU $package) $version"
+ $echo "Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ $echo "Written by" "Ulrich Drepper"
+ exit 0 ;;
+ -- ) # Stop option prcessing
+ shift; break ;;
+ -* )
+ $echo "gettextize: unknown option $1"
+ $echo "Try \`gettextize --help' for more information."; exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# -gt 1; then
+ $echo "$usage"
+ exit 1
+fi
+
+# Fill in the command line options value.
+if test $# -eq 1; then
+ srcdir=$1
+ if cd $srcdir; then
+ srcdir=`pwd`
+ else
+ $echo "Cannot change directory to \`$srcdir'"
+ exit 1
+ fi
+else
+ srcdir=$origdir
+fi
+
+# Directory where the sources are stored.
+prefix=@prefix@
+gettext_dir=@datadir@/gettext
+
+test -f configure.in || {
+ $echo "Missing configure.in, please cd to your package first."
+ exit 1
+}
+
+if test -d intl && test $force -eq 0; then
+ $echo "\
+intl/ subdirectory exists: use option -f if you really want to delete it."
+ exit 1
+fi
+
+if test -f po/Makefile.in.in && test $force -eq 0; then
+ $echo "\
+po/Makefile.in.in exists: use option -f if you really want to delete it."
+ exit 1
+fi
+
+if test -f NLS && test $force -eq 0; then
+ $echo "NLS exists: use option -f if you really want to delete it."
+ exit 1
+fi
+
+rm -fr intl
+mkdir intl || {
+ $echo "failed to create intl/ subdirectory"
+ exit 1;
+}
+
+test -d po || mkdir po || {
+ $echo "failed to create po/ subdirectory"
+ exit 1
+}
+
+# For simplicity we changed to the gettext source directory.
+cd $gettext_dir
+
+# Now copy all files. Take care for the destination directories.
+for file in *; do
+ case $file in
+ intl | po | demo)
+ ;;
+ *)
+ rm -f $srcdir/$file
+ ($try_ln_s && ln -s $gettext_dir/$file $srcdir/$file) 2>/dev/null ||
+ cp $file $srcdir/$file
+ ;;
+ esac
+done
+
+# Copy files to intl/ subdirectory.
+cd intl
+for file in *; do
+ rm -f $srcdir/intl/$file
+ ($try_ln_s && ln -s $gettext_dir/intl/$file $srcdir/intl/$file) 2>/dev/null ||
+ cp $file $srcdir/intl/$file
+done
+
+# Copy files to po/ subdirectory.
+cd ../po
+for file in *; do
+ rm -f $srcdir/po/$file
+ ($try_ln_s && ln -s $gettext_dir/po/$file $srcdir/po/$file) 2>/dev/null ||
+ cp $file $srcdir/po/$file
+done
+
+
+# Check whether we can run config.status to produce intl/Makefile.in.
+cd $origdir
+if test -f ./config.status; then
+ if test $configstatus -eq 0; then
+ echo "Shall I run config.status? (y/N)"
+ read ans
+ case "$ans" in
+ y* | Y* | 1* )
+ configstatus=1 ;;
+ * )
+ ;;
+ esac
+ fi
+
+ test $configstatus -ne 0 &&
+ (CONFIG_FILES=intl/Makefile CONFIG_HEADERS= ./config.status)
+fi
+
+exit 0
diff --git a/misc/locale.alias b/misc/locale.alias
new file mode 100644
index 0000000..c3666fc
--- /dev/null
+++ b/misc/locale.alias
@@ -0,0 +1,52 @@
+# Locale name alias data base
+# Copyright (C) 1995 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# The format of this file is the same as for the corresponding file of
+# the X Window System, which normally can be found in
+# /usr/lib/X11/locale/locale.alias
+# A single line contains two fields: an alias and a substitution value.
+# All entries are case independent.
+
+# Note: This file is far from being complete. If you have a value for
+# your own site which you think might be useful for others too, share it
+# with the rest of us. Send it to bug-gnu-utils@prep.ai.mit.edu.
+
+czech cs_CZ.ISO-8859-2
+danish da_DK.ISO-8859-1
+dansk da_DK.ISO-8859-1
+deutsch de_DE.ISO-8859-1
+dutch nl_NL.ISO-8859-1
+finnish fi_FI.ISO-8859-1
+français fr_FR.ISO-8859-1
+french fr_FR.ISO-8859-1
+german de_DE.ISO-8859-1
+greek el_GR.ISO-8859-7
+hebrew iw_IL.ISO-8859-8
+hungarian hu_HU.ISO-8859-2
+icelandic is_IS.ISO-8859-1
+italian it_CH.ISO-8859-1
+japanese ja_JP.EUC
+norwegian no_NO.ISO-8859-1
+polish pl_PL.ISO-8859-2
+portuguese pt_PT.ISO-8859-1
+rumanian ro_RO.ISO-8859-2
+russian ru_SU.ISO-8859-5
+slovak sk_SK.ISO-8859-2
+slovene sl_CS.ISO-8859-2
+spanish es_ES.ISO-8859-1
+swedish sv_SE.ISO-8859-1
+turkish tr_TR.ISO-8859-9
diff --git a/misc/magic.add b/misc/magic.add
new file mode 100644
index 0000000..85af567
--- /dev/null
+++ b/misc/magic.add
@@ -0,0 +1,9 @@
+#
+# GNU nlsutils message catalog file format
+#
+0 string \336\22\4\225 GNU message catalog (little endian),
+>4 lelong x revision %d,
+>8 lelong x %d messages
+0 string \225\4\22\336 GNU message catalog (big endian),
+>4 belong x revision %d,
+>8 belong x %d messages
diff --git a/misc/po-mode.el b/misc/po-mode.el
new file mode 100644
index 0000000..bdab3c0
--- /dev/null
+++ b/misc/po-mode.el
@@ -0,0 +1,2602 @@
+;;; po-mode.el -- for helping GNU gettext lovers to edit PO files.
+;;; Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+;;; François Pinard <pinard@iro.umontreal.ca>, 1995.
+;;; Helped by Greg McGary <gkm@magilla.cichlid.com>.
+
+;; This file is part of GNU gettext.
+
+;; GNU gettext is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU gettext is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+;; MA 02111-1307, USA.
+
+;;; This package provides the tools meant to help editing PO files,
+;;; as documented in the GNU gettext user's manual. See this manual
+;;; for user documentation, which is not repeated here.
+
+;;; To install, merely put this file somewhere GNU Emacs will find it,
+;;; then add the following lines to your .emacs file:
+;;;
+;;; (autoload 'po-mode "po-mode")
+;;; (setq auto-mode-alist (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode)
+;;; auto-mode-alist))
+;;;
+;;; To automatically use proper fonts under Emacs 20, also add:
+;;;
+;;; (autoload 'po-find-file-coding-system "po-mode")
+;;; (modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
+;;; 'po-find-file-coding-system)
+;;;
+;;; You may also adjust some variables, below, by defining them in your
+;;; `.emacs' file, either directly or through command `M-x customize'.
+
+;;; Emacs portability matters.
+
+;;; Most portability matters are addressed in this page. All other cases
+;;; involve one of `eval-and-compile' or `fboundp', just search for these.
+
+;; Identify which Emacs variety is being used.
+(eval-and-compile
+ (cond ((string-match "Lucid\\|XEmacs" emacs-version)
+ (setq po-EMACS20 nil po-XEMACS t))
+ ((and (string-lessp "19" emacs-version) (featurep 'faces))
+ (setq po-EMACS20 t po-XEMACS nil))
+ (t (setq po-EMACS20 nil po-XEMACS nil))))
+
+;; Experiment with Emacs LISP message internationalisation.
+(eval-and-compile
+ (or (fboundp 'set-translation-domain)
+ (defsubst set-translation-domain (string) nil))
+ (or (fboundp 'translate-string)
+ (defsubst translate-string (string) string)))
+(defsubst _ (string) (translate-string string))
+(defsubst N_ (string) string)
+
+;; Handle missing `customs' package.
+(eval-and-compile
+ (condition-case ()
+ (require 'custom)
+ (error nil))
+ (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
+ nil
+ (defmacro defgroup (&rest args)
+ nil)
+ (defmacro defcustom (var value doc &rest args)
+ (` (defvar (, var) (, value) (, doc))))))
+
+;; Protect string comparisons from text properties.
+(eval-and-compile
+ (fset 'po-buffer-substring
+ (symbol-function (if (fboundp 'buffer-substring-no-properties)
+ 'buffer-substring-no-properties
+ 'buffer-substring))))
+
+;; Handle missing `with-temp-buffer' function.
+(eval-and-compile
+ (if nil ; FIXME: just testing... (fboundp 'with-temp-buffer)
+
+ (fset 'po-with-temp-buffer (symbol-function 'with-temp-buffer))
+
+ (defmacro po-with-temp-buffer (&rest forms)
+ "Create a temporary buffer, and evaluate FORMS there like `progn'."
+ (let ((curr-buffer (make-symbol "curr-buffer"))
+ (temp-buffer (make-symbol "temp-buffer")))
+ `(let ((,curr-buffer (current-buffer))
+ (,temp-buffer (get-buffer-create
+ (generate-new-buffer-name " *po-temp*"))))
+ (unwind-protect
+ (progn
+ (set-buffer ,temp-buffer)
+ ,@forms)
+ (set-buffer ,curr-buffer)
+ (and (buffer-name ,temp-buffer)
+ (kill-buffer ,temp-buffer))))))))
+
+;; Handle missing `kill-new' function.
+(eval-and-compile
+ (if (fboundp 'kill-new)
+
+ (fset 'po-kill-new (symbol-function 'kill-new))
+
+ (defun po-kill-new (string)
+ "Push STRING onto the kill ring, for Emacs 18 where kill-new is missing."
+ (po-with-temp-buffer
+ (insert string)
+ (kill-region (point-min) (point-max))))))
+
+;; Handle missing `read-event' function.
+(eval-and-compile
+ (fset 'po-read-event
+ (cond ((fboundp 'read-event)
+ ;; GNU Emacs.
+ 'read-event)
+ ((fboundp 'next-command-event)
+ ;; XEmacs.
+ 'next-command-event)
+ (t
+ ;; Older Emacses.
+ 'read-char))))
+
+;; Handle missing `force-mode-line-update' function.
+(eval-and-compile
+ (if (fboundp 'force-mode-line-update)
+
+ (fset 'po-force-mode-line-update
+ (symbol-function 'force-mode-line-update))
+
+ (defun po-force-mode-line-update ()
+ "Force the mode-line of the current buffer to be redisplayed."
+ (set-buffer-modified-p (buffer-modified-p)))))
+
+;; Handle portable highlighting. Code has been adapted (OK... stolen! :-)
+;; from `ispell.el'.
+(eval-and-compile
+ (cond
+ (po-EMACS20
+
+ (defun po-create-overlay ()
+ "Create and return a deleted overlay structure.
+The variable `po-highlight-face' selects the face to use for highlighting."
+ (let ((overlay (make-overlay (point) (point))))
+ (overlay-put overlay 'face po-highlight-face)
+ ;; The fun thing is that a deleted overlay retains its face, and is
+ ;; movable.
+ (delete-overlay overlay)
+ overlay))
+
+ (defun po-highlight (overlay start end &optional buffer)
+ "Use OVERLAY to highlight the string from START to END.
+If limits are not relative to the current buffer, use optional BUFFER."
+ (move-overlay overlay start end (or buffer (current-buffer))))
+
+ (defun po-rehighlight (overlay)
+ "Ensure OVERLAY is highlighted."
+ ;; There is nothing to do, as GNU Emacs allows multiple highlights.
+ nil)
+
+ (defun po-dehighlight (overlay)
+ "Display normally the last string which OVERLAY highlighted.
+The current buffer should be in PO mode, when this function is called."
+ (delete-overlay overlay)))
+
+ (po-XEMACS
+
+ (defun po-create-overlay ()
+ "Create and return a deleted overlay structure."
+ (cons (make-marker) (make-marker)))
+
+ (defun po-highlight (overlay start end &optional buffer)
+ "Use OVERLAY to highlight the string from START to END.
+If limits are not relative to the current buffer, use optional BUFFER."
+ (if buffer
+ (save-excursion
+ (set-buffer buffer)
+ (isearch-highlight start end))
+ (isearch-highlight start end))
+ (set-marker (car overlay) start (or buffer (current-buffer)))
+ (set-marker (cdr overlay) end (or buffer (current-buffer))))
+
+ (defun po-rehighlight (overlay)
+ "Ensure OVERLAY is highlighted."
+ (let ((buffer (marker-buffer (car overlay)))
+ (start (marker-position (car overlay)))
+ (end (marker-position (cdr overlay))))
+ (and buffer
+ (name-buffer buffer)
+ (po-highlight overlay start end buffer))))
+
+ (defun po-dehighlight (overlay)
+ "Display normally the last string which OVERLAY highlighted."
+ (isearch-dehighlight t)
+ (setcar overlay (make-marker))
+ (setcdr overlay (make-marker))))
+
+ (t
+
+ (defun po-create-overlay ()
+ "Create and return a deleted overlay structure."
+ (cons (make-marker) (make-marker)))
+
+ (defun po-highlight (overlay start end &optional buffer)
+ "Use OVERLAY to highlight the string from START to END.
+If limits are not relative to the current buffer, use optional BUFFER.
+No doubt that highlighting, when Emacs does not allow it, is a kludge."
+ (save-excursion
+ (and buffer (set-buffer buffer))
+ (let ((modified (buffer-modified-p))
+ (buffer-read-only nil)
+ (inhibit-quit t)
+ (buffer-undo-list t)
+ (text (buffer-substring start end)))
+ (goto-char start)
+ (delete-region start end)
+ (insert-char ? (- end start))
+ (sit-for 0)
+ (setq inverse-video (not inverse-video))
+ (delete-region start end)
+ (insert text)
+ (sit-for 0)
+ (setq inverse-video (not inverse-video))
+ (set-buffer-modified-p modified)))
+ (set-marker (car overlay) start (or buffer (current-buffer)))
+ (set-marker (cdr overlay) end (or buffer (current-buffer))))
+
+ (defun po-rehighlight (overlay)
+ "Ensure OVERLAY is highlighted."
+ (let ((buffer (marker-buffer (car overlay)))
+ (start (marker-position (car overlay)))
+ (end (marker-position (cdr overlay))))
+ (and buffer
+ (name-buffer buffer)
+ (po-highlight overlay start end buffer))))
+
+ (defun po-dehighlight (overlay)
+ "Display normally the last string which OVERLAY highlighted."
+ (let ((buffer (marker-buffer (car overlay)))
+ (start (marker-position (car overlay)))
+ (end (marker-position (cdr overlay))))
+ (if buffer
+ (save-excursion
+ (set-buffer buffer)
+ (let ((modified (buffer-modified-p))
+ (buffer-read-only nil)
+ (inhibit-quit t)
+ (buffer-undo-list t))
+ (let ((text (buffer-substring start end)))
+ (goto-char start)
+ (delete-region start end)
+ (insert-char ? (- end start))
+ (sit-for 0)
+ (delete-region start end)
+ (insert text)
+ (sit-for 0)
+ (set-buffer-modified-p modified)))))
+ (setcar overlay (make-marker))
+ (setcdr overlay (make-marker))))
+
+ )))
+
+;;; Customisation.
+
+(defgroup po nil
+ "Major mode for editing PO files"
+ :group 'i18n)
+
+(defcustom po-auto-edit-with-msgid nil
+ "*Automatically use msgid when editing untranslated entries."
+ :type 'boolean
+ :group 'po)
+
+(defcustom po-auto-fuzzy-on-edit nil
+ "*Automatically mark entries fuzzy when being edited."
+ :type 'boolean
+ :group 'po)
+
+(defcustom po-auto-select-on-unfuzzy nil
+ "*Automatically select some new entry while making an entry not fuzzy."
+ :type 'boolean
+ :group 'po)
+
+(defcustom po-auto-replace-revision-date 'ask
+ "*Automatically revise date in headers. Value is nil, t, or ask."
+ :type '(choice (const nil)
+ (const t)
+ (const ask))
+ :group 'po)
+
+(defcustom po-default-file-header "\
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid \"\"
+msgstr \"\"
+\"Project-Id-Version: PACKAGE VERSION\\n\"
+\"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\\n\"
+\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"
+\"Language-Team: LANGUAGE <LL@li.org>\\n\"
+\"MIME-Version: 1.0\\n\"
+\"Content-Type: text/plain; charset=CHARSET\\n\"
+\"Content-Transfer-Encoding: ENCODING\\n\"
+"
+ "*Default PO file header."
+ :type 'string
+ :group 'po)
+
+(defcustom po-highlighting (or po-EMACS20 po-XEMACS)
+ "*Highlight text whenever appropriate, when non-nil. However, on older
+Emacses, a yet unexplained highlighting bug causes files to get mangled."
+ :type 'boolean
+ :group 'po)
+
+(defcustom po-highlight-face 'highlight
+ "*The face used for PO mode highlighting. For Emacses with overlays.
+Possible values are `highlight', `modeline', `secondary-selection',
+`region', and `underline'.
+This variable can be set by the user to whatever face they desire.
+It's most convenient if the cursor color and highlight color are
+slightly different."
+ :type 'face
+ :group 'po)
+
+(defcustom po-gzip-uuencode-command "gzip -9 | uuencode -m"
+ "*The filter to use for preparing a mail invoice of the PO file.
+Normally \"gzip -9 | uuencode -m\", remove the -9 for lesser compression,
+or remove the -m if you are not using the GNU version of `uuencode'."
+ :type 'string
+ :group 'po)
+
+;;; The following block of declarations has the main purpose of avoiding
+;;; byte compiler warnings. It also introduces some documentation for
+;;; each of these variables, all meant to be local to PO mode buffers.
+
+;; Flag telling that MODE-LINE-STRING should be displayed. See `Window'
+;; page below. Exceptionally, this variable is local to *all* buffers.
+
+(defvar po-mode-flag)
+
+;; PO buffers are kept read-only to prevent random modifications. READ-ONLY
+;; holds the value of the read-only flag before PO mode was entered.
+
+(defvar po-read-only)
+
+;; The current entry extends from START-OF-ENTRY to END-OF-ENTRY, it
+;; includes preceding whitespace and excludes following whitespace. The
+;; start of keyword lines are START-OF-MSGID and START-OF-MSGSTR.
+;; ENTRY-TYPE classifies the entry.
+
+(defvar po-start-of-entry)
+(defvar po-start-of-msgid)
+(defvar po-start-of-msgstr)
+(defvar po-end-of-entry)
+(defvar po-entry-type)
+
+;; A few counters are usefully shown in the Emacs mode line.
+
+(defvar po-translated-counter)
+(defvar po-fuzzy-counter)
+(defvar po-untranslated-counter)
+(defvar po-obsolete-counter)
+(defvar po-mode-line-string)
+
+;; PO mode keeps track of fields being edited, for one given field should
+;; have one editing buffer at most, and for exiting a PO buffer properly
+;; should offer to close all pending edits. Variable EDITED-FIELDS holds an
+;; an list of "slots" of the form: (ENTRY-MARKER EDIT-BUFFER OVERLAY-INFO).
+;; To allow simultaneous edition of the comment and the msgstr of an entry,
+;; ENTRY-MARKER points to the msgid line if a comment is being edited, or to
+;; the msgstr line if the msgstr is being edited. EDIT-BUFFER is the
+;; temporary Emacs buffer used to edit the string. OVERLAY-INFO, when not
+;; nil, holds an overlay (or if overlays are not supported, a cons of two
+;; markers) for this msgid string which became highlighted for the edit.
+
+(defvar po-edited-fields)
+
+;; We maintain a set of movable pointers for returning to entries.
+
+(defvar po-marker-stack)
+
+;; SEARCH path contains a list of directories where files may be found,
+;; in a format suitable for read completion. Each directory includes
+;; its trailing slash. PO mode starts with "./" and "../".
+
+(defvar po-search-path)
+
+;; The following variables are meaningful only when REFERENCE-CHECK
+;; is identical to START-OF-ENTRY, else they should be recomputed.
+;; REFERENCE-ALIST contains all known references for the current
+;; entry, each list element is (PROMPT FILE LINE), where PROMPT may
+;; be used for completing read, FILE is a string and LINE is a number.
+;; REFERENCE-CURSOR is a cycling cursor into REFERENCE-ALIST.
+
+(defvar po-reference-alist)
+(defvar po-reference-cursor)
+(defvar po-reference-check)
+
+;; The following variables are for marking translatable strings in program
+;; sources. KEYWORDS is the list of keywords for marking translatable
+;; strings, kept in a format suitable for reading with completion.
+;; NEXT-FILE-LIST is the list of source files to visit, gotten from the tags
+;; table. STRING-START is the position for the beginning of the last found
+;; string, or nil if the string is invalidated. STRING-END is the position
+;; for the end of the string and indicates where the search should be
+;; resumed, or nil for the beginning of the current file. MARKING-OVERLAY,
+;; if not `nil', holds the overlay which highlight the last found string;
+;; for older Emacses, it holds the cons of two markers around the
+;; highlighted region.
+
+(defvar po-keywords)
+(defvar po-next-file-list)
+(defvar po-string-start)
+(defvar po-string-end)
+(defvar po-marking-overlay)
+
+;;; PO mode variables and constants (usually not to customize).
+
+;; The textdomain should really be "gettext", only trying it for now.
+;; All this requires more thinking, we cannot just do this like that.
+(set-translation-domain "po-mode")
+
+(defun po-mode-version ()
+ "Show Emacs PO mode version."
+ (interactive)
+ (message (_"Emacs PO mode, version %s") (substring "$Revision: 1.43 $" 11 -2)))
+
+(defconst po-help-display-string
+ (_"\
+PO Mode Summary Next Previous Miscellaneous
+*: Later, /: Docum n p Any type . Redisplay
+ /t /M-t Translated /v Version info
+Moving around f M-f Fuzzy ?, h This help
+< First if any o M-o Obsolete = Current index
+> Last if any u M-u Untranslated O Other window
+/SPC Auto select V Validate
+ Msgstr Comments M Mail officially
+Modifying entries RET # Call editor U Undo
+TAB Remove fuzzy mark k K Kill to E Edit out full
+/DEL Fuzzy or fade out w W Copy to Q Forceful quit
+LFD Init with msgid y Y Yank from q Confirm and quit
+
+gettext Keyword Marking Position Stack
+, Find next string Compendiums m Mark and push current
+M-, Mark translatable *c To compendium r Pop and return
+M-. Change mark, mark *M-C Select, save x Exchange current/top
+
+Program Sources Auxiliary Files Lexicography
+s Cycle reference a Cycle file *l Lookup translation
+M-s Select reference M-a Select file *M-l Add/edit translation
+S Consider path A Consider PO file *L Consider lexicon
+M-S Ignore path M-A Ignore PO file *M-L Ignore lexicon
+")
+ "Help page for PO mode.")
+
+(defconst po-mode-menu-layout
+ '("PO"
+ ("Moving around"
+ ["Auto select" po-auto-select-entry t]
+ "---"
+ "Forward"
+ ["Any next" po-next-entry t]
+ ["Next translated" po-next-translated-entry t]
+ ["Next fuzzy" po-next-fuzzy-entry t]
+ ["Next obsolete" po-next-obsolete-entry t]
+ ["Next untranslated" po-next-untranslated-entry t]
+ ["Last file entry" po-last-entry t]
+ "---"
+ "Backward"
+ ["Any previous" po-previous-entry t]
+ ["Previous translated" po-previous-translated-entry t]
+ ["Previous fuzzy" po-previous-fuzzy-entry t]
+ ["Previous obsolete" po-previous-obsolete-entry t]
+ ["Previous untranslated" po-previous-untranslated-entry t]
+ ["First file entry" po-first-entry t]
+ "---"
+ "Position stack"
+ ["Mark and push current" po-push-location t]
+ ["Pop and return" po-pop-location t]
+ ["Exchange current/top" po-exchange-location t]
+ "---"
+ ["Redisplay" po-current-entry t]
+ ["Current index" po-statistics t])
+ ("Modifying entries"
+ ["Undo" po-undo t]
+ "---"
+ "Msgstr"
+ ["Edit msgstr" po-edit-msgstr t]
+ ["Kill msgstr" po-kill-msgstr t]
+ ["Save msgstr" po-kill-ring-save-msgstr t]
+ ["Yank msgstr" po-yank-msgstr t]
+ "---"
+ "Comments"
+ ["Edit comment" po-edit-comment t]
+ ["Kill comment" po-kill-comment t]
+ ["Save comment" po-kill-ring-save-comment t]
+ ["Yank comment" po-yank-comment t]
+ "---"
+ ["Remove fuzzy mark" po-unfuzzy t]
+ ["Fuzzy or fade out" po-fade-out-entry t]
+ ["Init with msgid" po-msgid-to-msgstr t])
+ ("Other files"
+ ["Other window" po-other-window t]
+ "---"
+ "Program sources"
+ ["Cycle reference" po-cycle-source-reference t]
+ ["Select reference" po-select-source-reference t]
+ ["Consider path" po-consider-source-path t]
+ ["Ignore path" po-ignore-source-path t]
+ "---"
+ "Compendiums"
+ ["To compendium" po-save-entry nil]
+ ["Select, save" po-select-and-save-entry nil]
+ "---"
+ "Auxiliary files"
+ ["Cycle file" po-cycle-auxiliary t]
+ ["Select file" po-select-auxiliary t]
+ ["Consider file" po-consider-as-auxiliary t]
+ ["Ignore file" po-ignore-as-auxiliary t]
+ "---"
+ "Lexicography"
+ ["Lookup translation" po-lookup-lexicons nil]
+ ["Add/edit translation" po-edit-lexicon-entry nil]
+ ["Consider lexicon" po-consider-lexicon-file nil]
+ ["Ignore lexicon" po-ignore-lexicon-file nil])
+ "---"
+ "Source marking"
+ ["Find first string" (po-tags-search '(nil)) t]
+ ["Prefer keyword" (po-select-mark-and-mark '(nil)) t]
+ ["Find next string" po-tags-search t]
+ ["Mark preferred" po-mark-translatable t]
+ ["Mark with keyword" po-select-mark-and-mark t]
+ "---"
+ ["Version info" po-mode-version t]
+ ["Help page" po-help t]
+ ["Validate" po-validate t]
+ ["Mail officially" po-send-mail t]
+ ["Edit out full" po-edit-out-full t]
+ "---"
+ ["Forceful quit" po-quit t]
+ ["Soft quit" po-confirm-and-quit t])
+ "Menu layout for PO mode.")
+
+;; FIXME: subedit mode should also have its own layout.
+
+(defconst po-subedit-message
+ (_"Type `C-c C-c' once done, or `C-c C-k' to abort edit")
+ "Message to post in the minibuffer when an edit buffer is displayed.")
+
+(defconst po-content-type-charset-alist
+ '((euc . japanese-iso-8bit))
+ "How to convert Content-Type into a Mule coding system.")
+
+(defvar po-auxiliary-list nil
+ "List of auxiliary PO files, in completing read format.")
+
+(defvar po-auxiliary-cursor nil
+ "Cursor into the `po-auxiliary-list'.")
+
+(defvar po-translation-project-address
+ "translation@iro.umontreal.ca"
+ "Electronic mail address of the Translation Project.")
+
+(defvar po-compose-mail-function
+ (let ((functions '(compose-mail-other-window
+ message-mail-other-window
+ compose-mail
+ message-mail))
+ result)
+ (while (and (not result) functions)
+ (if (fboundp (car functions))
+ (setq result (car functions))
+ (setq functions (cdr functions))))
+ (cond (result)
+ ((fboundp 'mail-other-window)
+ (function (lambda (to subject)
+ (mail-other-window nil to subject))))
+ ((fboundp 'mail)
+ (function (lambda (to subject)
+ (mail nil to subject))))
+ (t (function (lambda (to subject)
+ (error (_"I do not know how to mail to `%s'") to))))))
+ "Function to start composing an electronic message.")
+
+(defvar po-any-msgid-regexp
+ "^\\(#~?[ \t]*\\)?msgid.*\n\\(\\(#~?[ \t]*\\)?\".*\n\\)*"
+ "Regexp matching a whole msgid field, whether obsolete or not.")
+
+(defvar po-any-msgstr-regexp
+ "^\\(#~?[ \t]*\\)?msgstr.*\n\\(\\(#~?[ \t]*\\)?\".*\n\\)*"
+ "Regexp matching a whole msgstr field, whether obsolete or not.")
+
+(defvar po-msgfmt-program "msgfmt"
+ "Path to msgfmt program from GNU gettext package.")
+
+;; Font lock based highlighting code.
+(defconst po-font-lock-keywords
+ '(
+ ("^\\(msgid \\|msgstr \\)?\"\\|\"$" . font-lock-keyword-face)
+ ("\\\\.\\|%[-.0-9ul]*[a-zA-Z]" . font-lock-variable-name-face)
+ ("^# .*\\|^#[:,]?" . font-lock-comment-face)
+ ("^#:\\(.*\\)" 1 font-lock-reference-face)
+ ;; The following line does not work, and I wonder why.
+ ;;("^#,\\(.*\\)" 1 font-function-name-reference-face)
+ )
+ "Additional expressions to highlight in PO mode.")
+
+;; Old activator for `font lock'. Is it still useful? I don't think so.
+;;
+;;(if (boundp 'font-lock-keywords)
+;; (put 'po-mode 'font-lock-keywords 'po-font-lock-keywords))
+
+;; `hilit19' based highlighting code has been disabled, as most probably
+;; nobody really needs it (it also generates ugly byte-compiler warnings).
+;;
+;;(if (fboundp 'hilit-set-mode-patterns)
+;; (hilit-set-mode-patterns 'po-mode
+;; '(("^# .*\\|^#$" nil comment)
+;; ("^#[.,:].*" nil include)
+;; ("^\\(msgid\\|msgstr\\) *\"" nil keyword)
+;; ("^\"\\|\"$" nil keyword))))
+
+;;; Mode activation.
+
+(eval-and-compile
+ (if po-EMACS20
+
+ (defun po-find-file-coding-system (arg-list)
+ "Return a Mule (DECODING . ENCODING) pair, according to PO file charset.
+Called through file-coding-system-alist, before the file is visited for real."
+ (and (eq (car arg-list) 'insert-file-contents)
+ (with-temp-buffer
+ (let ((coding-system-for-read 'no-conversion))
+ ;; Is 4096 enough? FIXME: Retry as needed!
+ (insert-file-contents (nth 1 arg-list) nil 0 4096)
+ (if (re-search-forward
+ "^\"Content-Type: text/plain;[ \t]*charset=\\([^\\]+\\)"
+ nil t)
+ (let* ((charset (intern (downcase (buffer-substring
+ (match-beginning 1)
+ (match-end 1)))))
+ (slot (assq charset
+ po-content-type-charset-alist)))
+ (list (cond (slot (cdr slot))
+ ((memq charset (coding-system-list)) charset)
+ (t 'no-conversion))))
+ '(no-conversion))))))
+
+ ))
+
+(defvar po-mode-map nil
+ "Keymap for PO mode.")
+(if po-mode-map
+ ()
+ ;; The following line because (make-sparse-keymap) does not work on Demacs.
+ (setq po-mode-map (make-keymap))
+ (suppress-keymap po-mode-map)
+ (define-key po-mode-map "\C-i" 'po-unfuzzy)
+ (define-key po-mode-map "\C-j" 'po-msgid-to-msgstr)
+ (define-key po-mode-map "\C-m" 'po-edit-msgstr)
+ (define-key po-mode-map " " 'po-auto-select-entry)
+ (define-key po-mode-map "?" 'po-help)
+ (define-key po-mode-map "#" 'po-edit-comment)
+ (define-key po-mode-map "," 'po-tags-search)
+ (define-key po-mode-map "." 'po-current-entry)
+ (define-key po-mode-map "<" 'po-first-entry)
+ (define-key po-mode-map "=" 'po-statistics)
+ (define-key po-mode-map ">" 'po-last-entry)
+ (define-key po-mode-map "a" 'po-cycle-auxiliary)
+;;;; (define-key po-mode-map "c" 'po-save-entry)
+ (define-key po-mode-map "f" 'po-next-fuzzy-entry)
+ (define-key po-mode-map "h" 'po-help)
+ (define-key po-mode-map "k" 'po-kill-msgstr)
+;;;; (define-key po-mode-map "l" 'po-lookup-lexicons)
+ (define-key po-mode-map "m" 'po-push-location)
+ (define-key po-mode-map "n" 'po-next-entry)
+ (define-key po-mode-map "o" 'po-next-obsolete-entry)
+ (define-key po-mode-map "p" 'po-previous-entry)
+ (define-key po-mode-map "q" 'po-confirm-and-quit)
+ (define-key po-mode-map "r" 'po-pop-location)
+ (define-key po-mode-map "s" 'po-cycle-source-reference)
+ (define-key po-mode-map "t" 'po-next-translated-entry)
+ (define-key po-mode-map "u" 'po-next-untranslated-entry)
+ (define-key po-mode-map "v" 'po-mode-version)
+ (define-key po-mode-map "w" 'po-kill-ring-save-msgstr)
+ (define-key po-mode-map "x" 'po-exchange-location)
+ (define-key po-mode-map "y" 'po-yank-msgstr)
+ (define-key po-mode-map "A" 'po-consider-as-auxiliary)
+ (define-key po-mode-map "E" 'po-edit-out-full)
+ (define-key po-mode-map "K" 'po-kill-comment)
+;;;; (define-key po-mode-map "L" 'po-consider-lexicon-file)
+ (define-key po-mode-map "M" 'po-send-mail)
+ (define-key po-mode-map "O" 'po-other-window)
+ (define-key po-mode-map "Q" 'po-quit)
+ (define-key po-mode-map "S" 'po-consider-source-path)
+ (define-key po-mode-map "U" 'po-undo)
+ (define-key po-mode-map "V" 'po-validate)
+ (define-key po-mode-map "W" 'po-kill-ring-save-comment)
+ (define-key po-mode-map "Y" 'po-yank-comment)
+ (define-key po-mode-map "\177" 'po-fade-out-entry)
+ (define-key po-mode-map "\M-," 'po-mark-translatable)
+ (define-key po-mode-map "\M-." 'po-select-mark-and-mark)
+ (define-key po-mode-map "\M-a" 'po-select-auxiliary)
+;;;; (define-key po-mode-map "\M-c" 'po-select-and-save-entry)
+ (define-key po-mode-map "\M-f" 'po-previous-fuzzy-entry)
+;;;; (define-key po-mode-map "\M-l" 'po-edit-lexicon-entry)
+ (define-key po-mode-map "\M-o" 'po-previous-obsolete-entry)
+ (define-key po-mode-map "\M-t" 'po-previous-translated-entry)
+ (define-key po-mode-map "\M-u" 'po-previous-untranslated-entry)
+ (define-key po-mode-map "\M-s" 'po-select-source-reference)
+ (define-key po-mode-map "\M-A" 'po-ignore-as-auxiliary)
+;;;; (define-key po-mode-map "\M-L" 'po-ignore-lexicon-file)
+ (define-key po-mode-map "\M-S" 'po-ignore-source-path)
+ )
+
+(defun po-mode ()
+ "Major mode for translators when they edit PO files.
+Special commands:\\{po-mode-map}
+Turning on PO mode calls the value of the variable `po-mode-hook',
+if that value is non-nil. Behaviour may be adjusted through some variables,
+all reachable through `M-x customize', in group `Emacs.Editing.I18n.Po'."
+
+ (interactive)
+ (kill-all-local-variables)
+ (setq major-mode 'po-mode
+ mode-name "PO")
+ (use-local-map po-mode-map)
+ (if (fboundp 'easy-menu-define)
+ (progn
+ (easy-menu-define po-mode-menu po-mode-map "" po-mode-menu-layout)
+ (and po-XEMACS (easy-menu-add po-mode-menu))))
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults '(po-font-lock-keywords t))
+
+ (make-local-variable 'po-read-only)
+ (setq po-read-only buffer-read-only
+ buffer-read-only t)
+
+ (make-local-variable 'po-start-of-entry)
+ (make-local-variable 'po-start-of-msgid)
+ (make-local-variable 'po-start-of-msgstr)
+ (make-local-variable 'po-end-of-entry)
+ (make-local-variable 'po-entry-type)
+
+ (make-local-variable 'po-translated-counter)
+ (make-local-variable 'po-fuzzy-counter)
+ (make-local-variable 'po-untranslated-counter)
+ (make-local-variable 'po-obsolete-counter)
+ (make-local-variable 'po-mode-line-string)
+
+ (setq po-mode-flag t)
+
+ (po-check-file-header)
+ (po-compute-counters nil)
+
+ (make-local-variable 'po-edited-fields)
+ (setq po-edited-fields nil)
+
+ (make-local-variable 'po-marker-stack)
+ (setq po-marker-stack nil)
+
+ (make-local-variable 'po-search-path)
+ (setq po-search-path '(("./") ("../")))
+
+ (make-local-variable 'po-reference-alist)
+ (make-local-variable 'po-reference-cursor)
+ (make-local-variable 'po-reference-check)
+ (setq po-reference-alist nil
+ po-reference-cursor nil
+ po-reference-check 0)
+
+ (make-local-variable 'po-keywords)
+ (make-local-variable 'po-next-file-list)
+ (make-local-variable 'po-string-start)
+ (make-local-variable 'po-string-end)
+ (make-local-variable 'po-marking-overlay)
+ (setq po-keywords '(("gettext") ("gettext_noop") ("_") ("N_"))
+ po-next-file-list nil
+ po-string-start nil
+ po-string-end nil
+ po-marking-overlay (po-create-overlay))
+
+ (message (_"You may type `h' or `?' for a short PO mode reminder."))
+ (run-hooks 'po-mode-hook))
+
+;;; Window management.
+
+(make-variable-buffer-local 'po-mode-flag)
+
+(defvar po-mode-line-entry '(po-mode-flag (" " po-mode-line-string))
+ "Mode line format entry displaying MODE-LINE-STRING.")
+
+;; Insert MODE-LINE-ENTRY in mode line, but on first load only.
+(or (member po-mode-line-entry mode-line-format)
+ (let ((entry (member 'global-mode-string mode-line-format)))
+ (setcdr entry (cons po-mode-line-entry (cdr entry)))))
+
+(defun po-update-mode-line-string ()
+ "Compute a new statistics string to display in mode line."
+ (setq po-mode-line-string
+ (concat (format "%dt" po-translated-counter)
+ (if (> po-fuzzy-counter 0)
+ (format "+%df" po-fuzzy-counter))
+ (if (> po-untranslated-counter 0)
+ (format "+%du" po-untranslated-counter))
+ (if (> po-obsolete-counter 0)
+ (format "+%do" po-obsolete-counter))))
+ (po-force-mode-line-update))
+
+(defun po-type-counter ()
+ "Return the symbol name of the counter appropriate for the current entry."
+ (cond ((eq po-entry-type 'obsolete) 'po-obsolete-counter)
+ ((eq po-entry-type 'fuzzy) 'po-fuzzy-counter)
+ ((eq po-entry-type 'translated) 'po-translated-counter)
+ ((eq po-entry-type 'untranslated) 'po-untranslated-counter)
+ (t (error (_"Unknown entry type")))))
+
+(defun po-decrease-type-counter ()
+ "Decrease the counter corresponding to the nature of the current entry."
+ (let ((counter (po-type-counter)))
+ (set counter (1- (eval counter)))))
+
+(defun po-increase-type-counter ()
+ "Increase the counter corresponding to the nature of the current entry.
+Then, update the mode line counters."
+ (let ((counter (po-type-counter)))
+ (set counter (1+ (eval counter))))
+ (po-update-mode-line-string))
+
+;; Avoid byte compiler warnings.
+(defvar po-fuzzy-regexp)
+(defvar po-untranslated-regexp)
+
+(defun po-compute-counters (flag)
+ "Prepare counters for mode line display. If FLAG, also echo entry position."
+ (and flag (po-find-span-of-entry))
+ (setq po-translated-counter 0
+ po-fuzzy-counter 0
+ po-untranslated-counter 0
+ po-obsolete-counter 0)
+ (let ((position 0) (total 0) here)
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward po-any-msgstr-regexp nil t)
+ (and (= (% total 20) 0)
+ (if flag
+ (message (_"Position %d/%d") position total)
+ (message (_"Position %d") total)))
+ (setq here (point))
+ (goto-char (match-beginning 0))
+ (setq total (1+ total))
+ (and flag (eq (point) po-start-of-msgstr) (setq position total))
+ (cond ((eq (following-char) ?#)
+ (setq po-obsolete-counter (1+ po-obsolete-counter)))
+ ((looking-at po-untranslated-regexp)
+ (setq po-untranslated-counter (1+ po-untranslated-counter)))
+ (t (setq po-translated-counter (1+ po-translated-counter))))
+ (goto-char here))
+
+ ;; Make another pass just for the fuzzy entries, kind of kludgey.
+ ;; FIXME: Counts will be wrong if untranslated entries are fuzzy, yet
+ ;; this should not normally happen.
+ (goto-char (point-min))
+ (while (re-search-forward po-fuzzy-regexp nil t)
+ (setq po-fuzzy-counter (1+ po-fuzzy-counter)))
+ (setq po-translated-counter (- po-translated-counter po-fuzzy-counter)))
+
+ ;; Push the results out.
+ (if flag
+ (message (_"\
+Position %d/%d; %d translated, %d fuzzy, %d untranslated, %d obsolete")
+ position total po-translated-counter po-fuzzy-counter
+ po-untranslated-counter po-obsolete-counter)
+ (message "")))
+ (po-update-mode-line-string))
+
+(defun po-redisplay ()
+ "Redisplay the current entry."
+ ;; FIXME: Should try to fit the whole entry on the window. If this is not
+ ;; possible, should try to fit the comment and the msgid. Otherwise,
+ ;; should try to fit the msgid. Else, the first line of the msgid should
+ ;; be at the top of the window.
+ (goto-char po-start-of-msgid))
+
+(defun po-other-window ()
+ "Get the cursor into another window, out of PO mode."
+ (interactive)
+ (if (one-window-p t)
+ (progn
+ (split-window)
+ (switch-to-buffer (other-buffer)))
+ (other-window 1)))
+
+;;; Processing the PO file header entry.
+
+(defun po-check-file-header ()
+ "Create a missing PO mode file header, or replace an oldish one."
+ (save-excursion
+ (let ((buffer-read-only po-read-only)
+ insert-flag end-of-header)
+ (goto-char (point-min))
+ (if (re-search-forward po-any-msgstr-regexp nil t)
+ (progn
+
+ ;; There is at least one entry.
+ (goto-char (match-beginning 0))
+ (previous-line 1)
+ (setq end-of-header (match-end 0))
+ (if (looking-at "msgid \"\"\n")
+
+ ;; There is indeed a PO file header.
+ (if (re-search-forward "\n\"PO-Revision-Date: "
+ end-of-header t)
+ nil
+
+ ;; This is an oldish header. Replace it all.
+ (goto-char end-of-header)
+ (while (> (point) (point-min))
+ (previous-line 1)
+ (insert "#~ ")
+ (beginning-of-line))
+ (beginning-of-line)
+ (setq insert-flag t))
+
+ ;; The first entry is not a PO file header, insert one.
+ (setq insert-flag t)))
+
+ ;; Not a single entry found.
+ (setq insert-flag t))
+
+ (goto-char (point-min))
+ (and insert-flag (insert po-default-file-header "\n")))))
+
+(defun po-replace-revision-date ()
+ "Replace the revision date by current time in the PO file header."
+ (if (fboundp 'format-time-string)
+ (if (or (eq po-auto-replace-revision-date t)
+ (and (eq po-auto-replace-revision-date 'ask)
+ (y-or-n-p (_"May I set PO-Revision-Date? "))))
+ (save-excursion
+ (goto-char (point-min))
+ (if (re-search-forward "^\"PO-Revision-Date:.*" nil t)
+ (let* ((buffer-read-only po-read-only)
+ (time (current-time))
+ (seconds (or (car (current-time-zone time)) 0))
+ (minutes (/ (abs seconds) 60))
+ (zone (format "%c%02d:%02d"
+ (if (< seconds 0) ?- ?+)
+ (/ minutes 60)
+ (% minutes 60))))
+ (replace-match
+ (concat "\"PO-Revision-Date: "
+ (format-time-string "%Y-%m-%d %H:%M" time)
+ zone "\\n\"")
+ t t))))
+ (message ""))
+ (message (_"PO-Revision-Date should be adjusted..."))))
+
+;;; Handling span of entry, entry type and entry attributes.
+
+(defun po-find-span-of-entry ()
+ "Find the extent of the PO file entry where the cursor is. Set variables
+PO-START-OF-ENTRY, PO-START-OF-MSGID, PO-START-OF-MSGSTR, PO-END-OF-ENTRY
+and PO-ENTRY-TYPE to meaningful values. Decreasing priority of type
+interpretation is: obsolete, fuzzy, untranslated or translated."
+ (let ((here (point)))
+ (if (re-search-backward po-any-msgstr-regexp nil t)
+ (progn
+
+ ;; After a backward match, (match-end 0) will not extend
+ ;; beyond point, in case point was *inside* the regexp. We
+ ;; need a dependable (match-end 0), so we redo the match in
+ ;; the forward direction.
+ (re-search-forward po-any-msgstr-regexp)
+ (if (<= (match-end 0) here)
+ (progn
+
+ ;; We most probably found the msgstr of the previous
+ ;; entry. The current entry then starts just after
+ ;; its end, save this information just in case.
+ (setq po-start-of-entry (match-end 0))
+
+ ;; However, it is also possible that we are located in
+ ;; the crumb after the last entry in the file. If
+ ;; yes, we know the middle and end of last PO entry.
+ (setq po-start-of-msgstr (match-beginning 0)
+ po-end-of-entry (match-end 0))
+
+ (if (re-search-forward po-any-msgstr-regexp nil t)
+ (progn
+
+ ;; We definitely were not in the crumb.
+ (setq po-start-of-msgstr (match-beginning 0)
+ po-end-of-entry (match-end 0)))
+
+ ;; We were in the crumb. The start of the last PO
+ ;; file entry is the end of the previous msgstr if
+ ;; any, or else, the beginning of the file.
+ (goto-char po-start-of-msgstr)
+ (setq po-start-of-entry
+ (if (re-search-backward po-any-msgstr-regexp nil t)
+ (match-end 0)
+ (point-min)))))
+
+ ;; The cursor was inside msgstr of the current entry.
+ (setq po-start-of-msgstr (match-beginning 0)
+ po-end-of-entry (match-end 0))
+ ;; The start of this entry is the end of the previous
+ ;; msgstr if any, or else, the beginning of the file.
+ (goto-char po-start-of-msgstr)
+ (setq po-start-of-entry
+ (if (re-search-backward po-any-msgstr-regexp nil t)
+ (match-end 0)
+ (point-min)))))
+
+ ;; The cursor was before msgstr in the first entry in the file.
+ (setq po-start-of-entry (point-min))
+ (goto-char po-start-of-entry)
+ ;; There is at least the PO file header, so this should match.
+ (re-search-forward po-any-msgstr-regexp)
+ (setq po-start-of-msgstr (match-beginning 0)
+ po-end-of-entry (match-end 0)))
+
+ ;; Find start of msgid.
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgid-regexp)
+ (setq po-start-of-msgid (match-beginning 0))
+
+ ;; Classify the entry.
+ (setq po-entry-type
+ (if (eq (following-char) ?#)
+ 'obsolete
+ (goto-char po-start-of-entry)
+ (if (re-search-forward po-fuzzy-regexp po-start-of-msgid t)
+ 'fuzzy
+ (goto-char po-start-of-msgstr)
+ (if (looking-at po-untranslated-regexp)
+ 'untranslated
+ 'translated))))
+
+ ;; Put the cursor back where it was.
+ (goto-char here)))
+
+(defun po-add-attribute (name)
+ "Add attribute NAME to the current entry, unless it is already there."
+ (save-excursion
+ (let ((buffer-read-only po-read-only))
+ (goto-char po-start-of-entry)
+ (if (re-search-forward "\n#[,!] .*" po-start-of-msgid t)
+ (save-restriction
+ (narrow-to-region (match-beginning 0) (match-end 0))
+ (goto-char (point-min))
+ (if (re-search-forward (concat "\\b" name "\\b") nil t)
+ nil
+ (goto-char (point-max))
+ (insert ", " name)))
+ (skip-chars-forward "\n")
+ (while (eq (following-char) ?#)
+ (next-line 1))
+ (insert "#, " name "\n")))))
+
+(defun po-delete-attribute (name)
+ "Delete attribute NAME from the current entry, if any."
+ (save-excursion
+ (let ((buffer-read-only po-read-only))
+ (goto-char po-start-of-entry)
+ (if (re-search-forward "\n#[,!] .*" po-start-of-msgid t)
+ (save-restriction
+ (narrow-to-region (match-beginning 0) (match-end 0))
+ (goto-char (point-min))
+ (if (re-search-forward
+ (concat "\\(\n#[,!] " name "$\\|, " name "$\\| " name ",\\)")
+ nil t)
+ (replace-match "" t t)))))))
+
+;;; Entry positionning.
+
+(defun po-say-location-depth ()
+ "Tell how many entries in the entry location stack."
+ (let ((depth (length po-marker-stack)))
+ (cond ((= depth 0) (message (_"Empty location stack")))
+ ((= depth 1) (message (_"One entry in location stack")))
+ (t (message (_"%d entries in location stack") depth)))))
+
+(defun po-push-location ()
+ "Stack the location of the current entry, for later return."
+ (interactive)
+ (po-find-span-of-entry)
+ (save-excursion
+ (goto-char po-start-of-msgid)
+ (setq po-marker-stack (cons (point-marker) po-marker-stack)))
+ (po-say-location-depth))
+
+(defun po-pop-location ()
+ "Unstack a saved location, and return to the corresponding entry."
+ (interactive)
+ (if po-marker-stack
+ (progn
+ (goto-char (car po-marker-stack))
+ (setq po-marker-stack (cdr po-marker-stack))
+ (po-current-entry)
+ (po-say-location-depth))
+ (error (_"The entry location stack is empty"))))
+
+(defun po-exchange-location ()
+ "Exchange the location of the current entry with the top of stack."
+ (interactive)
+ (if po-marker-stack
+ (progn
+ (po-find-span-of-entry)
+ (goto-char po-start-of-msgid)
+ (let ((location (point-marker)))
+ (goto-char (car po-marker-stack))
+ (setq po-marker-stack (cons location (cdr po-marker-stack))))
+ (po-current-entry)
+ (po-say-location-depth))
+ (error (_"The entry location stack is empty"))))
+
+(defun po-current-entry ()
+ "Display the current entry."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-redisplay))
+
+(defun po-first-entry-with-regexp (regexp)
+ "Display the first entry in the file which msgstr matches REGEXP."
+ (let ((here (point)))
+ (goto-char (point-min))
+ (if (re-search-forward regexp nil t)
+ (progn
+ (goto-char (match-beginning 0))
+ (po-current-entry))
+ (goto-char here)
+ (error (_"There is no such entry")))))
+
+(defun po-last-entry-with-regexp (regexp)
+ "Display the last entry in the file which msgstr matches REGEXP."
+ (let ((here (point)))
+ (goto-char (point-max))
+ (if (re-search-backward regexp nil t)
+ (po-current-entry)
+ (goto-char here)
+ (error (_"There is no such entry")))))
+
+(defun po-next-entry-with-regexp (regexp wrap)
+ "Display the entry following the current entry which msgstr matches REGEXP.
+If WRAP is not nil, the search may wrap around the buffer."
+ (po-find-span-of-entry)
+ (let ((here (point)))
+ (goto-char po-end-of-entry)
+ (if (re-search-forward regexp nil t)
+ (progn
+ (goto-char (match-beginning 0))
+ (po-current-entry))
+ (if (and wrap
+ (progn
+ (goto-char (point-min))
+ (re-search-forward regexp po-start-of-entry t)))
+ (progn
+ (goto-char (match-beginning 0))
+ (po-current-entry)
+ (message (_"Wrapping around the buffer")))
+ (goto-char here)
+ (error (_"There is no such entry"))))))
+
+(defun po-previous-entry-with-regexp (regexp wrap)
+ "Redisplay the entry preceding the current entry which msgstr matches REGEXP.
+If WRAP is not nil, the search may wrap around the buffer."
+ (po-find-span-of-entry)
+ (let ((here (point)))
+ (goto-char po-start-of-entry)
+ (if (re-search-backward regexp nil t)
+ (po-current-entry)
+ (if (and wrap
+ (progn
+ (goto-char (point-max))
+ (re-search-backward regexp po-end-of-entry t)))
+ (progn
+ (po-current-entry)
+ (message (_"Wrapping around the buffer")))
+ (goto-char here)
+ (error (_"There is no such entry"))))))
+
+;; Any entries.
+
+(defun po-first-entry ()
+ "Display the first entry."
+ (interactive)
+ (po-first-entry-with-regexp po-any-msgstr-regexp))
+
+(defun po-last-entry ()
+ "Display the last entry."
+ (interactive)
+ (po-last-entry-with-regexp po-any-msgstr-regexp))
+
+(defun po-next-entry ()
+ "Display the entry following the current entry."
+ (interactive)
+ (po-next-entry-with-regexp po-any-msgstr-regexp nil))
+
+(defun po-previous-entry ()
+ "Display the entry preceding the current entry."
+ (interactive)
+ (po-previous-entry-with-regexp po-any-msgstr-regexp nil))
+
+;; Untranslated entries.
+
+(defvar po-after-entry-regexp
+ "\\(\\'\\|\\(#[ \t]*\\)?[^\"]\\)"
+ "Regexp which should be true after a full msgstr string matched.")
+
+(defvar po-untranslated-regexp
+ (concat "^msgstr[ \t]*\"\"\n" po-after-entry-regexp)
+ "Regexp matching a whole msgstr field, but only if active and empty.")
+
+(defun po-next-untranslated-entry ()
+ "Find the next untranslated entry, wrapping around if necessary."
+ (interactive)
+ (po-next-entry-with-regexp po-untranslated-regexp t))
+
+(defun po-previous-untranslated-entry ()
+ "Find the previous untranslated entry, wrapping around if necessary."
+ (interactive)
+ (po-previous-entry-with-regexp po-untranslated-regexp t))
+
+(defun po-msgid-to-msgstr ()
+ "Use another window to edit msgstr reinitialized with msgid."
+ (interactive)
+ (po-find-span-of-entry)
+ (if (or (eq po-entry-type 'untranslated)
+ (eq po-entry-type 'obsolete)
+ (y-or-n-p (_"Really loose previous translation? ")))
+ (po-set-msgstr (po-get-msgid nil)))
+ (message ""))
+
+;; Obsolete entries.
+
+(defvar po-obsolete-msgstr-regexp
+ "^#~?[ \t]*msgstr.*\n\\(#~?[ \t]*\".*\n\\)*"
+ "Regexp matching a whole msgstr field of an obsolete entry.")
+
+(defun po-next-obsolete-entry ()
+ "Find the next obsolete entry, wrapping around if necessary."
+ (interactive)
+ (po-next-entry-with-regexp po-obsolete-msgstr-regexp t))
+
+(defun po-previous-obsolete-entry ()
+ "Find the previous obsolete entry, wrapping around if necessary."
+ (interactive)
+ (po-previous-entry-with-regexp po-obsolete-msgstr-regexp t))
+
+;; Fuzzy entries.
+
+(defvar po-fuzzy-regexp "^#[,!] .*fuzzy"
+ "Regexp matching the string inserted by msgmerge for translations
+which does not match exactly.")
+
+(defun po-next-fuzzy-entry ()
+ "Find the next fuzzy entry, wrapping around if necessary."
+ (interactive)
+ (po-next-entry-with-regexp po-fuzzy-regexp t))
+
+(defun po-previous-fuzzy-entry ()
+ "Find the next fuzzy entry, wrapping around if necessary."
+ (interactive)
+ (po-previous-entry-with-regexp po-fuzzy-regexp t))
+
+(defun po-unfuzzy ()
+ "Remove the fuzzy attribute for the current entry."
+ (interactive)
+ (po-find-span-of-entry)
+ (cond ((eq po-entry-type 'fuzzy)
+ (po-decrease-type-counter)
+ (po-delete-attribute "fuzzy")
+ (po-current-entry)
+ (po-increase-type-counter)))
+ (if po-auto-select-on-unfuzzy
+ (po-auto-select-entry))
+ (po-update-mode-line-string))
+
+;; Translated entries.
+
+(defun po-next-translated-entry ()
+ "Find the next untranslated entry, wrapping around if necessary."
+ (interactive)
+ (if (= po-translated-counter 0)
+ (error (_"There is no such entry"))
+ (po-next-entry-with-regexp po-untranslated-regexp t)
+ (po-find-span-of-entry)
+ (while (not (eq po-entry-type 'translated))
+ (po-next-entry-with-regexp po-any-msgstr-regexp t)
+ (po-find-span-of-entry))))
+
+(defun po-previous-translated-entry ()
+ "Find the previous untranslated entry, wrapping around if necessary."
+ (interactive)
+ (if (= po-translated-counter 0)
+ (error (_"There is no such entry"))
+ (po-previous-entry-with-regexp po-any-msgstr-regexp t)
+ (po-find-span-of-entry)
+ (while (not (eq po-entry-type 'translated))
+ (po-previous-entry-with-regexp po-untranslated-regexp t)
+ (po-find-span-of-entry))))
+
+;; Auto-selection feature.
+
+(defun po-auto-select-entry ()
+ "Select the next entry having the same type as the current one.
+If none, wrap from the beginning of the buffer with another type,
+going from untranslated to fuzzy, and from fuzzy to obsolete.
+Plain translated entries are always disregarded unless there are
+no entries of the other types."
+ (interactive)
+ (po-find-span-of-entry)
+ (goto-char po-end-of-entry)
+ (if (and (= po-untranslated-counter 0)
+ (= po-fuzzy-counter 0)
+ (= po-obsolete-counter 0))
+
+ ;; All entries are plain translated. Next entry will do, or
+ ;; wrap around if there is none.
+ (if (re-search-forward po-any-msgstr-regexp nil t)
+ (goto-char (match-beginning 0))
+ (goto-char (point-min)))
+
+ ;; If over a translated entry, look for an untranslated one first.
+ ;; Else, look for an entry of the same type first.
+ (let ((goal (if (eq po-entry-type 'translated)
+ 'untranslated
+ po-entry-type)))
+ (while goal
+
+ ;; Find an untranslated entry, or wrap up for a fuzzy entry.
+ (if (eq goal 'untranslated)
+ (if (and (> po-untranslated-counter 0)
+ (re-search-forward po-untranslated-regexp nil t))
+ (progn
+ (goto-char (match-beginning 0))
+ (setq goal nil))
+ (goto-char (point-min))
+ (setq goal 'fuzzy)))
+
+ ;; Find a fuzzy entry, or wrap up for an obsolete entry.
+ (if (eq goal 'fuzzy)
+ (if (and (> po-fuzzy-counter 0)
+ (re-search-forward po-fuzzy-regexp nil t))
+ (progn
+ (goto-char (match-beginning 0))
+ (setq goal nil))
+ (goto-char (point-min))
+ (setq goal 'obsolete)))
+
+ ;; Find an obsolete entry, or wrap up for an untranslated entry.
+ (if (eq goal 'obsolete)
+ (if (and (> po-obsolete-counter 0)
+ (re-search-forward po-obsolete-msgstr-regexp nil t))
+ (progn
+ (goto-char (match-beginning 0))
+ (setq goal nil))
+ (goto-char (point-min))
+ (setq goal 'untranslated))))))
+
+ ;; Display this entry nicely.
+ (po-current-entry))
+
+;;; Killing and yanking fields.
+
+(defun po-extract-unquoted (buffer start end)
+ "Extract and return the unquoted string in BUFFER going from START to END.
+Crumb preceding or following the quoted string is ignored."
+ (po-with-temp-buffer
+ (insert-buffer-substring buffer start end)
+ ;; Remove preceding crumb.
+ (goto-char (point-min))
+ (search-forward "\"")
+ (delete-region (point-min) (point))
+ ;; Remove following crumb.
+ (goto-char (point-max))
+ (search-backward "\"")
+ (delete-region (point) (point-max))
+ ;; Glue concatenated strings.
+ (goto-char (point-min))
+ (while (re-search-forward "\"[ \t]*\\\\?\n\\(#~?\\)?[ \t]*\"" nil t)
+ (replace-match "" t t))
+ ;; Remove escaped newlines.
+ (goto-char (point-min))
+ (while (re-search-forward "\\\\[ \t]*\n" nil t)
+ (replace-match "" t t))
+ ;; Unquote individual characters.
+ (goto-char (point-min))
+ (while (re-search-forward "\\\\[\"abfnt\\0-7]" nil t)
+ (cond ((eq (preceding-char) ?\") (replace-match "\"" t t))
+ ((eq (preceding-char) ?a) (replace-match "\a" t t))
+ ((eq (preceding-char) ?b) (replace-match "\b" t t))
+ ((eq (preceding-char) ?f) (replace-match "\f" t t))
+ ((eq (preceding-char) ?n) (replace-match "\n" t t))
+ ((eq (preceding-char) ?t) (replace-match "\t" t t))
+ ((eq (preceding-char) ?\\) (replace-match "\\" t t))
+ (t (let ((value (- (preceding-char) ?0)))
+ (replace-match "" t t)
+ (while (looking-at "[0-7]")
+ (setq value (+ (* 8 value) (- (following-char) ?0)))
+ (replace-match "" t t))
+ (insert value)))))
+ (buffer-string)))
+
+(defun po-eval-requoted (form prefix obsolete)
+ "Eval FORM, which inserts a string, and return the string fully requoted.
+If PREFIX, precede the result with its contents. If OBSOLETE, comment all
+generated lines in the returned string. Evaluating FORM should insert the
+wanted string in the buffer which is current at the time of evaluation.
+If FORM is itself a string, then this string is used for insertion."
+ (po-with-temp-buffer
+ (if (stringp form)
+ (insert form)
+ (push-mark)
+ (eval form))
+ (goto-char (point-min))
+ (let ((multi-line (re-search-forward "[^\n]\n+[^\n]" nil t)))
+ (goto-char (point-min))
+ (while (re-search-forward "[\"\a\b\f\n\t\\]" nil t)
+ (cond ((eq (preceding-char) ?\") (replace-match "\\\"" t t))
+ ((eq (preceding-char) ?\a) (replace-match "\\a" t t))
+ ((eq (preceding-char) ?\b) (replace-match "\\b" t t))
+ ((eq (preceding-char) ?\f) (replace-match "\\f" t t))
+ ((eq (preceding-char) ?\n)
+ (replace-match (if (or (not multi-line) (eobp))
+ "\\n"
+ "\\n\"\n\"")
+ t t))
+ ((eq (preceding-char) ?\t) (replace-match "\\t" t t))
+ ((eq (preceding-char) ?\\) (replace-match "\\\\" t t))))
+ (goto-char (point-min))
+ (if prefix (insert prefix " "))
+ (insert (if multi-line "\"\"\n\"" "\""))
+ (goto-char (point-max))
+ (insert "\"")
+ (if prefix (insert "\n"))
+ (if obsolete
+ (progn
+ (goto-char (point-min))
+ (while (not (eobp))
+ (or (eq (following-char) ?\n) (insert "#~ "))
+ (search-forward "\n"))))
+ (buffer-string))))
+
+(defun po-get-msgid (kill)
+ "Extract and return the unquoted msgid string.
+If KILL, then add the unquoted string to the kill ring."
+ (let ((string (po-extract-unquoted (current-buffer)
+ po-start-of-msgid po-start-of-msgstr)))
+ (if kill (po-kill-new string))
+ string))
+
+(defun po-get-msgstr (kill)
+ "Extract and return the unquoted msgstr string.
+If KILL, then add the unquoted string to the kill ring."
+ (let ((string (po-extract-unquoted (current-buffer)
+ po-start-of-msgstr po-end-of-entry)))
+ (if kill (po-kill-new string))
+ string))
+
+(defun po-set-msgid (form)
+ "Replace the current msgid, using FORM to get a string.
+Evaluating FORM should insert the wanted string in the current buffer. If
+FORM is itself a string, then this string is used for insertion. The string
+is properly requoted before the replacement occurs.
+
+Returns `nil' if the buffer has not been modified, for if the new msgid
+described by FORM is merely identical to the msgid already in place."
+ (let ((string (po-eval-requoted form "msgid" (eq po-entry-type 'obsolete))))
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgid-regexp po-start-of-msgstr)
+ (and (not (string-equal (po-buffer-substring (match-beginning 0)
+ (match-end 0))
+ string))
+ (let ((buffer-read-only po-read-only))
+ (replace-match string t t)
+ (goto-char po-start-of-msgid)
+ (po-find-span-of-entry)
+ t)))))
+
+(defun po-set-msgstr (form)
+ "Replace the current msgstr, using FORM to get a string.
+Evaluating FORM should insert the wanted string in the current buffer. If
+FORM is itself a string, then this string is used for insertion. The string
+is properly requoted before the replacement occurs.
+
+Returns `nil' if the buffer has not been modified, for if the new msgstr
+described by FORM is merely identical to the msgstr already in place."
+ (let ((string (po-eval-requoted form "msgstr" (eq po-entry-type 'obsolete))))
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgstr-regexp po-end-of-entry)
+ (and (not (string-equal (po-buffer-substring (match-beginning 0)
+ (match-end 0))
+ string))
+ (let ((buffer-read-only po-read-only))
+ (po-decrease-type-counter)
+ (replace-match string t t)
+ (goto-char po-start-of-msgid)
+ (po-find-span-of-entry)
+ (po-increase-type-counter)
+ t)))))
+
+(defun po-kill-ring-save-msgstr ()
+ "Push the msgstr string from current entry on the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-get-msgstr t))
+
+(defun po-kill-msgstr ()
+ "Empty the msgstr string from current entry, pushing it on the kill ring."
+ (interactive)
+ (po-kill-ring-save-msgstr)
+ (po-set-msgstr ""))
+
+(defun po-yank-msgstr ()
+ "Replace the current msgstr string by the top of the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-set-msgstr (if (eq last-command 'yank) '(yank-pop 1) '(yank)))
+ (setq this-command 'yank))
+
+(defun po-fade-out-entry ()
+ "Mark an active entry as fuzzy; obsolete a fuzzy or untranslated entry;
+or completely delete an obsolete entry, saving its msgstr on the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+
+ (cond ((eq po-entry-type 'translated)
+ (po-decrease-type-counter)
+ (po-add-attribute "fuzzy")
+ (po-current-entry)
+ (po-increase-type-counter))
+
+ ((or (eq po-entry-type 'fuzzy)
+ (eq po-entry-type 'untranslated))
+ (if (yes-or-no-p (_"Should I really obsolete this entry? "))
+ (progn
+ (po-decrease-type-counter)
+ (save-excursion
+ (save-restriction
+ (narrow-to-region po-start-of-entry po-end-of-entry)
+ (let ((buffer-read-only po-read-only))
+ (goto-char (point-min))
+ (skip-chars-forward "\n")
+ (while (not (eobp))
+ (insert "#~ ")
+ (search-forward "\n")))))
+ (po-current-entry)
+ (po-increase-type-counter)))
+ (message ""))
+
+ ((and (eq po-entry-type 'obsolete)
+ (po-check-for-pending-edit po-start-of-msgid)
+ (po-check-for-pending-edit po-start-of-msgstr))
+ (po-decrease-type-counter)
+ (po-update-mode-line-string)
+ (po-get-msgstr t)
+ (let ((buffer-read-only po-read-only))
+ (delete-region po-start-of-entry po-end-of-entry))
+ (goto-char po-start-of-entry)
+ (if (re-search-forward po-any-msgstr-regexp nil t)
+ (goto-char (match-beginning 0))
+ (re-search-backward po-any-msgstr-regexp nil t))
+ (po-current-entry)
+ (message ""))))
+
+;;; Killing and yanking comments.
+
+(defvar po-active-comment-regexp
+ "^\\(#\n\\|# .*\n\\)+"
+ "Regexp matching the whole editable comment part of an active entry.")
+
+(defvar po-obsolete-comment-regexp
+ "^\\(#~? #\n\\|#~? # .*\n\\)+"
+ "Regexp matching the whole editable comment part of an obsolete entry.")
+
+(defun po-get-comment (kill-flag)
+ "Extract and return the editable comment string, uncommented.
+If KILL-FLAG, then add the unquoted comment to the kill ring."
+ (let ((buffer (current-buffer))
+ (obsolete (eq po-entry-type 'obsolete)))
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (if (re-search-forward (if obsolete po-obsolete-comment-regexp
+ po-active-comment-regexp)
+ po-end-of-entry t)
+ (po-with-temp-buffer
+ (insert-buffer-substring buffer (match-beginning 0) (match-end 0))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (if (looking-at (if obsolete "#~? # ?" "#~? ?"))
+ (replace-match "" t t))
+ (forward-line 1))
+ (and kill-flag (copy-region-as-kill (point-min) (point-max)))
+ (buffer-string))
+ ""))))
+
+(defun po-set-comment (form)
+ "Using FORM to get a string, replace the current editable comment.
+Evaluating FORM should insert the wanted string in the current buffer.
+If FORM is itself a string, then this string is used for insertion.
+The string is properly recommented before the replacement occurs."
+ (let ((obsolete (eq po-entry-type 'obsolete))
+ string)
+ (po-with-temp-buffer
+ (if (stringp form)
+ (insert form)
+ (push-mark)
+ (eval form))
+ (if (not (or (bobp) (= (preceding-char) ?\n)))
+ (insert "\n"))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (insert (if (= (following-char) ?\n)
+ (if obsolete "#~ #" "#")
+ (if obsolete "#~ # " "# ")))
+ (search-forward "\n"))
+ (setq string (buffer-string)))
+ (goto-char po-start-of-entry)
+ (if (re-search-forward
+ (if obsolete po-obsolete-comment-regexp po-active-comment-regexp)
+ po-end-of-entry t)
+ (if (not (string-equal (po-buffer-substring (match-beginning 0)
+ (match-end 0))
+ string))
+ (let ((buffer-read-only po-read-only))
+ (replace-match string t t)))
+ (skip-chars-forward " \t\n")
+ (let ((buffer-read-only po-read-only))
+ (insert string))))
+ (po-current-entry))
+
+(defun po-kill-ring-save-comment ()
+ "Push the msgstr string from current entry on the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-get-comment t))
+
+(defun po-kill-comment ()
+ "Empty the msgstr string from current entry, pushing it on the kill ring."
+ (interactive)
+ (po-kill-ring-save-comment)
+ (po-set-comment "")
+ (po-redisplay))
+
+(defun po-yank-comment ()
+ "Replace the current comment string by the top of the kill ring."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-set-comment (if (eq last-command 'yank) '(yank-pop 1) '(yank)))
+ (setq this-command 'yank)
+ (po-redisplay))
+
+;;; Editing management and submode.
+
+;; In a string edit buffer, BACK-POINTER points to one of the slots of the
+;; list EDITED-FIELDS kept in the PO buffer. See its description elsewhere.
+;; Reminder: slots have the form (ENTRY-MARKER EDIT-BUFFER OVERLAY-INFO).
+
+(defvar po-subedit-back-pointer)
+
+(defun po-clean-out-killed-edits ()
+ "From EDITED-FIELDS, clean out any edit having a killed edit buffer."
+ (let ((cursor po-edited-fields))
+ (while cursor
+ (let ((slot (car cursor)))
+ (setq cursor (cdr cursor))
+ (if (buffer-name (nth 1 slot))
+ nil
+ (let ((overlay (nth 2 slot)))
+ (and overlay (po-dehighlight overlay)))
+ (setq po-edited-fields (delete slot po-edited-fields)))))))
+
+(defun po-check-all-pending-edits ()
+ "Resume any pending edit. Return nil if some remains."
+ (po-clean-out-killed-edits)
+ (or (null po-edited-fields)
+ (let ((slot (car po-edited-fields)))
+ (goto-char (nth 0 slot))
+ (pop-to-buffer (nth 1 slot))
+ (let ((overlay (nth 2 slot)))
+ (and overlay (po-rehighlight overlay)))
+ (message po-subedit-message)
+ nil)))
+
+(defun po-check-for-pending-edit (position)
+ "Resume any pending edit at POSITION. Return nil if such edit exists."
+ (po-clean-out-killed-edits)
+ (let ((marker (make-marker)))
+ (set-marker marker position)
+ (let ((slot (assoc marker po-edited-fields)))
+ (if slot
+ (progn
+ (goto-char marker)
+ (pop-to-buffer (nth 1 slot))
+ (let ((overlay (nth 2 slot)))
+ (and overlay (po-rehighlight overlay)))
+ (message po-subedit-message)))
+ (not slot))))
+
+(defun po-edit-out-full ()
+ "Get out of PO mode, leaving PO file buffer in fundamental mode."
+ (interactive)
+ (if (and (po-check-all-pending-edits)
+ (yes-or-no-p (_"Should I let you edit the whole PO file? ")))
+ (progn
+ (setq buffer-read-only po-read-only)
+ (fundamental-mode)
+ (message (_"Type `M-x po-mode RET' once done")))))
+
+(defvar po-subedit-mode-map nil
+ "Keymap while editing a PO mode entry (or the full PO file).")
+(if po-subedit-mode-map
+ ()
+ (setq po-subedit-mode-map (make-sparse-keymap))
+ (define-key po-subedit-mode-map "\C-c\C-a" 'po-subedit-cycle-auxiliary)
+ (define-key po-subedit-mode-map "\C-c\C-c" 'po-subedit-exit)
+ (define-key po-subedit-mode-map "\C-c\C-k" 'po-subedit-abort))
+
+(defun po-subedit-abort ()
+ "Exit the subedit buffer, merely discarding its contents."
+ (interactive)
+ (let* ((edit-buffer (current-buffer))
+ (back-pointer po-subedit-back-pointer)
+ (marker (nth 0 back-pointer))
+ (overlay (nth 2 back-pointer))
+ (buffer (marker-buffer marker)))
+ (if (null buffer)
+ (error (_"Corresponding PO buffer does not exist anymore"))
+ (or (one-window-p) (delete-window))
+ (switch-to-buffer buffer)
+ (goto-char marker)
+ (and overlay (po-dehighlight overlay))
+ (kill-buffer edit-buffer)
+ (setq po-edited-fields (delete back-pointer po-edited-fields)))))
+
+(defun po-subedit-exit ()
+ "Exit the subedit buffer, replacing the string in the PO buffer."
+ (interactive)
+ (goto-char (point-max))
+ (skip-chars-backward " \t\n")
+ (if (eq (preceding-char) ?<)
+ (delete-region (1- (point)) (point-max)))
+ (let ((string (buffer-string)))
+ (po-subedit-abort)
+ (po-find-span-of-entry)
+ (cond ((= (point) po-start-of-msgid)
+ (po-set-comment string)
+ (po-redisplay))
+ ((= (point) po-start-of-msgstr)
+ (let ((replaced (po-set-msgstr string)))
+ (if (and replaced
+ po-auto-fuzzy-on-edit
+ (eq po-entry-type 'translated))
+ (progn
+ (po-decrease-type-counter)
+ (po-add-attribute "fuzzy")
+ (po-current-entry)
+ (po-increase-type-counter)))))
+ (t (debug)))))
+
+(defun po-edit-string (string type expand-tabs)
+ "Prepare a pop up buffer for editing STRING, which is of a given TYPE.
+TYPE may be 'comment or 'msgstr. If EXPAND-TABS, expand tabs to spaces.
+Run functions on po-subedit-mode-hook."
+ (let ((marker (make-marker)))
+ (set-marker marker (cond ((eq type 'comment) po-start-of-msgid)
+ ((eq type 'msgstr) po-start-of-msgstr)))
+ (if (po-check-for-pending-edit marker)
+ (let ((edit-buffer (generate-new-buffer
+ (concat "*" (buffer-name) "*")))
+ (buffer (current-buffer))
+ overlay slot)
+ (if (and (eq type 'msgstr) po-highlighting)
+ ;; ;; Try showing all of msgid in the upper window while editing.
+ ;; (goto-char (1- po-start-of-msgstr))
+ ;; (recenter -1)
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgid-regexp nil t)
+ (let ((end (1- (match-end 0))))
+ (goto-char (match-beginning 0))
+ (re-search-forward "msgid +" nil t)
+ (setq overlay (po-create-overlay))
+ (po-highlight overlay (point) end buffer))))
+ (setq slot (list marker edit-buffer overlay)
+ po-edited-fields (cons slot po-edited-fields))
+ (pop-to-buffer edit-buffer)
+ (make-local-variable 'po-subedit-back-pointer)
+ (setq po-subedit-back-pointer slot)
+ (erase-buffer)
+ (insert string "<")
+ (goto-char (point-min))
+ (and expand-tabs (setq indent-tabs-mode nil))
+ (use-local-map po-subedit-mode-map)
+ (run-hooks 'po-subedit-mode-hook)
+ (message po-subedit-message)))))
+
+(defun po-edit-comment ()
+ "Use another window to edit the current translator comment."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-edit-string (po-get-comment nil) 'comment nil))
+
+(defun po-edit-msgstr ()
+ "Use another window to edit the current msgstr."
+ (interactive)
+ (po-find-span-of-entry)
+ (po-edit-string (if (and po-auto-edit-with-msgid
+ (eq po-entry-type 'untranslated))
+ (po-get-msgid nil)
+ (po-get-msgstr nil))
+ 'msgstr
+ t))
+
+;;; String normalization and searching.
+
+(defun po-normalize-old-style (explain)
+ "Normalize old gettext style fields using K&R C multiline string syntax.
+To minibuffer messages sent while normalizing, add the EXPLAIN string."
+ (let ((here (point-marker))
+ (counter 0)
+ (buffer-read-only po-read-only))
+ (goto-char (point-min))
+ (message (_"Normalizing %d, %s") counter explain)
+ (while (re-search-forward
+ "\\(^#?[ \t]*msg\\(id\\|str\\)[ \t]*\"\\|[^\" \t][ \t]*\\)\\\\\n"
+ nil t)
+ (if (= (% counter 10) 0)
+ (message (_"Normalizing %d, %s") counter explain))
+ (replace-match "\\1\"\n\"" t nil)
+ (setq counter (1+ counter)))
+ (goto-char here)
+ (message (_"Normalizing %d...done") counter)))
+
+(defun po-normalize-field (field explain)
+ "Normalize FIELD of all entries. FIELD is either the symbol msgid or msgstr.
+To minibuffer messages sent while normalizing, add the EXPLAIN string."
+ (let ((here (point-marker))
+ (counter 0))
+ (goto-char (point-min))
+ (while (re-search-forward po-any-msgstr-regexp nil t)
+ (if (= (% counter 10) 0)
+ (message (_"Normalizing %d, %s") counter explain))
+ (goto-char (match-beginning 0))
+ (po-find-span-of-entry)
+ (cond ((eq field 'msgid) (po-set-msgid (po-get-msgid nil)))
+ ((eq field 'msgstr) (po-set-msgstr (po-get-msgstr nil))))
+ (goto-char po-end-of-entry)
+ (setq counter (1+ counter)))
+ (goto-char here)
+ (message (_"Normalizing %d...done") counter)))
+
+;; Normalize, but the British way! :-)
+(defsubst po-normalise () (po-normalize))
+
+(defun po-normalize ()
+ "Normalize all entries in the PO file."
+ (interactive)
+ (po-normalize-old-style (_"pass 1/3"))
+ (po-normalize-field t (_"pass 2/3"))
+ (po-normalize-field nil (_"pass 3/3"))
+ ;; The last PO file entry has just been processed.
+ (if (not (= po-end-of-entry (point-max)))
+ (let ((buffer-read-only po-read-only))
+ (kill-region po-end-of-entry (point-max))))
+ ;; A bizarre format might have fooled the counters, so recompute
+ ;; them to make sure their value is dependable.
+ (po-compute-counters nil))
+
+;;; Multiple PO files.
+
+(defun po-show-auxiliary-list ()
+ "Echo the current auxiliary list in the message area."
+ (if po-auxiliary-list
+ (let ((cursor po-auxiliary-cursor)
+ string)
+ (while cursor
+ (setq string (concat string (if string " ") (car (car cursor)))
+ cursor (cdr cursor)))
+ (setq cursor po-auxiliary-list)
+ (while (not (eq cursor po-auxiliary-cursor))
+ (setq string (concat string (if string " ") (car (car cursor)))
+ cursor (cdr cursor)))
+ (message string))
+ (message (_"No auxiliary files."))))
+
+(defun po-consider-as-auxiliary ()
+ "Add the current PO file to the list of auxiliary files."
+ (interactive)
+ (if (member (list buffer-file-name) po-auxiliary-list)
+ nil
+ (setq po-auxiliary-list
+ (nconc po-auxiliary-list (list (list buffer-file-name))))
+ (or po-auxiliary-cursor
+ (setq po-auxiliary-cursor po-auxiliary-list)))
+ (po-show-auxiliary-list))
+
+(defun po-ignore-as-auxiliary ()
+ "Delete the current PO file from the list of auxiliary files."
+ (interactive)
+ (setq po-auxiliary-list (delete (list buffer-file-name) po-auxiliary-list)
+ po-auxiliary-cursor po-auxiliary-list)
+ (po-show-auxiliary-list))
+
+(defun po-seek-equivalent-translation (name string)
+ "Search a PO file NAME for a `msgid' STRING having a non-empty `msgstr'.
+STRING is the full quoted msgid field, including the `msgid' keyword. When
+found, display the file over the current window, with the `msgstr' field
+possibly highlighted, the cursor at start of msgid, then return `t'.
+Otherwise, move nothing, and just return `nil'."
+ (let ((current (current-buffer))
+ (buffer (find-file-noselect name)))
+ (set-buffer buffer)
+ (let ((start (point))
+ found)
+ (goto-char (point-min))
+ (while (and (not found) (search-forward string nil t))
+ ;; Screen out longer `msgid's.
+ (if (looking-at "^msgstr ")
+ (progn
+ (po-find-span-of-entry)
+ ;; Ignore an untranslated entry.
+ (or (string-equal
+ (buffer-substring po-start-of-msgstr po-end-of-entry)
+ "msgstr \"\"\n")
+ (setq found t)))))
+ (if found
+ (progn
+ (switch-to-buffer buffer)
+ (po-find-span-of-entry)
+ (if po-highlighting
+ (progn
+ (goto-char po-start-of-entry)
+ (re-search-forward po-any-msgstr-regexp nil t)
+ (let ((end (1- (match-end 0))))
+ (goto-char (match-beginning 0))
+ (re-search-forward "msgstr +" nil t)
+ ;; FIXME:
+ (po-highlight (po-create-overlay) (point) end))))
+ (goto-char po-start-of-msgid))
+ (goto-char start)
+ (po-find-span-of-entry)
+ (select-buffer current))
+ found)))
+
+(defun po-cycle-auxiliary ()
+ "Select the next auxiliary file having an entry with same `msgid'."
+ (interactive)
+ (po-find-span-of-entry)
+ (if po-auxiliary-list
+ (let ((string (buffer-substring po-start-of-msgid po-start-of-msgstr))
+ (cursor po-auxiliary-cursor)
+ found name)
+ (while (and (not found) cursor)
+ (setq name (car (car cursor)))
+ (if (and (not (string-equal buffer-file-name name))
+ (po-seek-equivalent-translation name string))
+ (setq found t
+ po-auxiliary-cursor cursor))
+ (setq cursor (cdr cursor)))
+ (setq cursor po-auxiliary-list)
+ (while (and (not found) cursor)
+ (setq name (car (car cursor)))
+ (if (and (not (string-equal buffer-file-name name))
+ (po-seek-equivalent-translation name string))
+ (setq found t
+ po-auxiliary-cursor cursor))
+ (setq cursor (cdr cursor)))
+ (or found (message (_"No other translation found")))
+ found)))
+
+(defun po-subedit-cycle-auxiliary ()
+ "Cycle auxiliary file, but from the translation edit buffer."
+ (interactive)
+ (if po-buffer-of-edited-entry
+ (let ((buffer (current-buffer)))
+ (pop-to-buffer po-buffer-of-edited-entry)
+ (po-cycle-auxiliary)
+ (pop-to-buffer buffer))
+ (error (_"Not editing a PO file entry"))))
+
+(defun po-select-auxiliary ()
+ "Select one of the available auxiliary files and locate an equivalent
+entry. If an entry having the same `msgid' cannot be found, merely select
+the file without moving its cursor."
+ (interactive)
+ (po-find-span-of-entry)
+ (if po-auxiliary-list
+ (let ((string (buffer-substring po-start-of-msgid po-start-of-msgstr))
+ (name (car (assoc (completing-read (_"Which auxiliary file? ")
+ po-auxiliary-list nil t)
+ po-auxiliary-list))))
+ (po-consider-as-auxiliary)
+ (or (po-seek-equivalent-translation name string)
+ (find-file name)))))
+
+;;; Original program sources as context.
+
+(defun po-show-source-path ()
+ "Echo the current source search path in the message area."
+ (if po-search-path
+ (let ((cursor po-search-path)
+ string)
+ (while cursor
+ (setq string (concat string (if string " ") (car (car cursor)))
+ cursor (cdr cursor)))
+ (message string))
+ (message (_"Empty source path."))))
+
+(defun po-consider-source-path (directory)
+ "Add a given DIRECTORY, requested interactively, to the source search path."
+ (interactive "DDirectory for search path: ")
+ (setq po-search-path (cons (list (if (string-match "/$" directory)
+ directory
+ (concat directory "/")))
+ po-search-path))
+ (setq po-reference-check 0)
+ (po-show-source-path))
+
+(defun po-ignore-source-path ()
+ "Delete a directory, selected with completion, from the source search path."
+ (interactive)
+ (setq po-search-path
+ (delete (list (completing-read (_"Directory to remove? ")
+ po-search-path nil t))
+ po-search-path))
+ (setq po-reference-check 0)
+ (po-show-source-path))
+
+(defun po-ensure-source-references ()
+ "Extract all references into a list, with paths resolved, if necessary."
+ (po-find-span-of-entry)
+ (if (= po-start-of-entry po-reference-check)
+ ()
+ (setq po-reference-alist nil)
+ (save-excursion
+ (goto-char po-start-of-entry)
+ (if (re-search-forward "^#:" po-start-of-msgid t)
+ (while (looking-at "\\(\n#:\\)? *\\([^: ]+\\):\\([0-9]+\\)")
+ (goto-char (match-end 0))
+ (let* ((name (po-buffer-substring (match-beginning 2)
+ (match-end 2)))
+ (line (po-buffer-substring (match-beginning 3)
+ (match-end 3)))
+ (path po-search-path)
+ file)
+ (while (and (progn (setq file (concat (car (car path)) name))
+ (not (file-exists-p file)))
+ path)
+ (setq path (cdr path)))
+ (if path
+ (setq po-reference-alist
+ (cons (list (concat file ":" line)
+ file
+ (string-to-int line))
+ po-reference-alist)))))))
+ (setq po-reference-alist (nreverse po-reference-alist)
+ po-reference-cursor po-reference-alist
+ po-reference-check po-start-of-entry)))
+
+(defun po-show-source-context (triplet)
+ "Show the source context given a TRIPLET which is (PROMPT FILE LINE)."
+ (find-file-other-window (car (cdr triplet)))
+ (goto-line (car (cdr (cdr triplet))))
+ (other-window 1)
+ (let ((maximum 0)
+ position
+ (cursor po-reference-alist))
+ (while (not (eq triplet (car cursor)))
+ (setq maximum (1+ maximum)
+ cursor (cdr cursor)))
+ (setq position (1+ maximum)
+ po-reference-cursor cursor)
+ (while cursor
+ (setq maximum (1+ maximum)
+ cursor (cdr cursor)))
+ (message (_"Displaying %d/%d: \"%s\"") position maximum (car triplet))))
+
+(defun po-cycle-source-reference ()
+ "Display some source context for the current entry.
+If the command is repeated many times in a row, cycle through contexts."
+ (interactive)
+ (po-ensure-source-references)
+ (if po-reference-cursor
+ (po-show-source-context
+ (car (if (eq last-command 'po-cycle-source-reference)
+ (or (cdr po-reference-cursor) po-reference-alist)
+ po-reference-cursor)))
+ (error (_"No resolved source references"))))
+
+(defun po-select-source-reference ()
+ "Select one of the available source contexts for the current entry."
+ (interactive)
+ (po-ensure-source-references)
+ (if po-reference-alist
+ (po-show-source-context
+ (assoc
+ (completing-read (_"Which source context? ") po-reference-alist nil t)
+ po-reference-alist))
+ (error (_"No resolved source references"))))
+
+;;; Program sources strings though tags table.
+
+;;; C mode.
+
+;;; A few long string cases (submitted by Ben Pfaff).
+
+;; #define string "This is a long string " \
+;; "that is continued across several lines " \
+;; "in a macro in order to test \\ quoting\\" \
+;; "\\ with goofy strings.\\"
+
+;; char *x = "This is just an ordinary string "
+;; "continued across several lines without needing "
+;; "to use \\ characters at end-of-line.";
+
+;; char *y = "Here is a string continued across \
+;; several lines in the manner that was sanctioned \
+;; in K&R C compilers and still works today, \
+;; even though the method used above is more esthetic.";
+
+;;; End of long string cases.
+
+(defun po-find-c-string (keywords)
+ "Find the next C string, excluding those marked by any of KEYWORDS.
+Returns (START . END) for the found string, or (nil . nil) if none found."
+ (let (start end)
+ (while (and (not start)
+ (re-search-forward "\\([\"']\\|/\\*\\|//\\)" nil t))
+ (cond ((= (preceding-char) ?*)
+ ;; Disregard comments.
+ (search-forward "*/"))
+
+ ((= (preceding-char) ?/)
+ ;; Disregard C++ comments.
+ (end-of-line)
+ (forward-char 1))
+
+ ((= (preceding-char) ?\')
+ ;; Disregard character constants.
+ (forward-char (if (= (following-char) ?\\) 3 2)))
+
+ ((save-excursion
+ (beginning-of-line)
+ (looking-at "^# *\\(include\\|line\\)"))
+ ;; Disregard lines being #include or #line directives.
+ (end-of-line))
+
+ ;; Else, find the end of the (possibly concatenated) string.
+ (t (setq start (1- (point))
+ end nil)
+ (while (not end)
+ (cond ((= (following-char) ?\")
+ (if (looking-at "\"[ \t\n\\\\]*\"")
+ (goto-char (match-end 0))
+ (forward-char 1)
+ (setq end (point))))
+ ((= (following-char) ?\\) (forward-char 2))
+ (t (skip-chars-forward "^\"\\\\"))))
+
+ ;; Check before string for keyword and opening parenthesis.
+ (goto-char start)
+ (skip-chars-backward " \n\t")
+ (if (= (preceding-char) ?\()
+ (progn
+ (backward-char 1)
+ (skip-chars-backward " \n\t")
+ (let ((end-keyword (point)))
+ (skip-chars-backward "_A-Za-z0-9")
+ (if (member (list (po-buffer-substring (point)
+ end-keyword))
+ keywords)
+
+ ;; Disregard already marked strings.
+ (progn
+ (goto-char end)
+ (setq start nil
+ end nil)))))))))
+
+ ;; Return the found string, if any.
+ (cons start end)))
+
+(defun po-mark-c-string (start end keyword)
+ "Mark the C string, from START to END, with KEYWORD.
+Return the adjusted value for END."
+ (goto-char end)
+ (insert ")")
+ (goto-char start)
+ (insert keyword)
+ (if (not (string-equal keyword "_"))
+ (progn (insert " ") (setq end (1+ end))))
+ (insert "(")
+ (+ end 2 (length keyword)))
+
+;;; Emacs LISP mode.
+
+(defun po-find-emacs-lisp-string (keywords)
+ "Find the next Emacs LISP string, excluding those marked by any of KEYWORDS.
+Returns (START . END) for the found string, or (nil . nil) if none found."
+ (let (start end)
+ (while (and (not start)
+ (re-search-forward "[;\"?]" nil t))
+
+ (cond ((= (preceding-char) ?\;)
+ ;; Disregard comments.
+ (search-forward "\n"))
+
+ ((= (preceding-char) ?\?)
+ ;; Disregard character constants.
+ (forward-char (if (= (following-char) ?\\) 2 1)))
+
+ ;; Else, find the end of the string.
+ (t (setq start (1- (point)))
+ (while (not (= (following-char) ?\"))
+ (skip-chars-forward "^\"\\\\")
+ (if (= (following-char) ?\\) (forward-char 2)))
+ (forward-char 1)
+ (setq end (point))
+
+ ;; Check before string for keyword and opening parenthesis.
+ (goto-char start)
+ (skip-chars-backward " \n\t")
+ (let ((end-keyword (point)))
+ (skip-chars-backward "-_A-Za-z0-9")
+ (if (and (= (preceding-char) ?\()
+ (member (list (po-buffer-substring (point)
+ end-keyword))
+ keywords))
+
+ ;; Disregard already marked strings.
+ (progn
+ (goto-char end)
+ (setq start nil
+ end nil)))))))
+
+ ;; Return the found string, if any.
+ (cons start end)))
+
+(defun po-mark-emacs-lisp-string (start end keyword)
+ "Mark the Emacs LISP string, from START to END, with KEYWORD.
+Return the adjusted value for END."
+ (goto-char end)
+ (insert ")")
+ (goto-char start)
+ (insert "(" keyword)
+ (if (not (string-equal keyword "_"))
+ (progn (insert " ") (setq end (1+ end))))
+ (+ end 2 (length keyword)))
+
+;;; Processing generic to all programming modes.
+
+(eval-and-compile
+ (autoload 'visit-tags-table-buffer "etags"))
+
+(defun po-tags-search (restart)
+ "Find an unmarked translatable string through all files in tags table.
+Disregard some simple strings which are most probably non-translatable.
+With prefix argument, restart search at first file."
+ (interactive "P")
+
+ ;; Take care of restarting the search if necessary.
+ (if restart (setq po-next-file-list nil))
+
+ ;; Loop doing things until an interesting string is found.
+ (let ((keywords po-keywords)
+ found buffer start
+ (end po-string-end))
+ (while (not found)
+
+ ;; Reinitialize the source file list if necessary.
+ (if (not po-next-file-list)
+ (progn
+ (setq po-next-file-list
+ (save-excursion
+ (visit-tags-table-buffer)
+ (copy-sequence (tags-table-files))))
+ (or po-next-file-list (error (_"No files to process")))
+ (setq end nil)))
+
+ ;; Try finding a string after resuming the search position.
+ (message (_"Scanning %s...") (car po-next-file-list))
+ (save-excursion
+ (setq buffer (find-file-noselect (car po-next-file-list)))
+ (set-buffer buffer)
+ (goto-char (or end (point-min)))
+
+ (cond ((member mode-name '("C" "C++"))
+ (let ((pair (po-find-c-string keywords)))
+ (setq start (car pair)
+ end (cdr pair))))
+ ((string-equal mode-name "Emacs-Lisp")
+ (let ((pair (po-find-emacs-lisp-string keywords)))
+ (setq start (car pair)
+ end (cdr pair))))
+ (t (message (_"Unknown source mode for PO mode, skipping..."))
+ (setq start nil
+ end nil))))
+
+ ;; Advance to next file if no string was found.
+ (if (not start)
+ (progn
+ (setq po-next-file-list (cdr po-next-file-list))
+ (if po-next-file-list
+ (setq end nil)
+ (setq po-string-end nil)
+ (and po-highlighting (po-dehighlight po-marking-overlay))
+ (error (_"All files processed"))))
+
+ ;; Push the string just found string into a work buffer for study.
+ (po-with-temp-buffer
+ (insert (po-extract-unquoted buffer start end))
+ (goto-char (point-min))
+
+ ;; Do not disregard if at least three letters in a row.
+ (if (re-search-forward "[A-Za-z][A-Za-z][A-Za-z]" nil t)
+ (setq found t)
+
+ ;; Disregard if two letters, and more punctuations than letters.
+ (if (re-search-forward "[A-Za-z][A-Za-z]" nil t)
+ (let ((total (buffer-size)))
+ (goto-char (point-min))
+ (while (re-search-forward "[A-Za-z]+" nil t)
+ (replace-match "" t t))
+ (if (< (* 2 (buffer-size)) total)
+ (setq found t))))
+
+ ;; Disregard if single letters or no letters at all.
+ ))))
+
+ ;; Ensure the string is being displayed.
+
+ (if (one-window-p t) (split-window) (other-window 1))
+ (switch-to-buffer buffer)
+ (goto-char start)
+ (or (pos-visible-in-window-p start) (recenter '(nil)))
+ (if (pos-visible-in-window-p end)
+ (goto-char end)
+ (goto-char end)
+ (recenter -1))
+ (other-window 1)
+ (and po-highlighting (po-highlight po-marking-overlay start end buffer))
+
+ ;; Save the string for later commands.
+ (message (_"Scanning %s...done") (car po-next-file-list))
+ (setq po-string-start start
+ po-string-end end)))
+
+(defun po-mark-found-string (keyword)
+ "Mark last found string in program sources as translatable, using KEYWORD."
+ (and po-highlighting (po-dehighlight po-marking-overlay))
+ (let ((buffer (find-file-noselect (car po-next-file-list)))
+ (start po-string-start)
+ (end po-string-end)
+ line string)
+
+ ;; Mark string in program sources.
+ (setq string (po-extract-unquoted buffer start end))
+ (save-excursion
+ (set-buffer buffer)
+ (setq line (count-lines (point-min) start)
+ end (cond ((member mode-name '("C" "C++"))
+ (po-mark-c-string start end keyword))
+ ((string-equal mode-name "Emacs-Lisp")
+ (po-mark-emacs-lisp-string start end keyword))
+ (t (error (_"Cannot mark in unknown source mode"))))))
+ (setq po-string-end end)
+
+ ;; Add PO file entry.
+ (let ((buffer-read-only po-read-only))
+ (goto-char (point-max))
+ (insert "\n" (format "#: %s:%d\n" (car po-next-file-list) line))
+ (save-excursion
+ (insert (po-eval-requoted string "msgid" nil) "msgstr \"\"\n"))
+ (setq po-untranslated-counter (1+ po-untranslated-counter))
+ (po-update-mode-line-string))))
+
+(defun po-mark-translatable ()
+ "Mark last found string in program sources as translatable, using `_'."
+ (interactive)
+ (if (and po-string-start po-string-end)
+ (progn
+ (po-mark-found-string "_")
+ (setq po-string-start nil))
+ (error (_"No such string"))))
+
+(defun po-select-mark-and-mark (arg)
+ "Mark last found string in program sources as translatable, ask for keywoard,
+using completion. With prefix argument, just ask the name of a preferred
+keyword for subsequent commands, also added to possible completions."
+ (interactive "P")
+ (if arg
+ (let ((keyword (list (read-from-minibuffer (_"Keyword: ")))))
+ (setq po-keywords (cons keyword (delete keyword po-keywords))))
+ (if (and po-string-start po-string-end)
+ (let* ((default (car (car po-keywords)))
+ (keyword (completing-read (format (_"Mark with keywoard? [%s] ")
+ default)
+ po-keywords nil t )))
+ (if (string-equal keyword "") (setq keyword default))
+ (po-mark-found-string keyword)
+ (setq po-string-start nil))
+ (error (_"No such string")))))
+
+;;; Miscellaneous features.
+
+(defun po-help ()
+ "Provide an help window for PO mode."
+ (interactive)
+ (po-with-temp-buffer
+ (insert po-help-display-string)
+ (goto-char (point-min))
+ (save-window-excursion
+ (switch-to-buffer (current-buffer))
+ (delete-other-windows)
+ (message (_"Type any character to continue"))
+ (po-read-event))))
+
+(defun po-undo ()
+ "Undo the last change to the PO file."
+ (interactive)
+ (let ((buffer-read-only po-read-only))
+ (undo))
+ (po-compute-counters nil))
+
+(defun po-statistics ()
+ "Say how many entries in each category, and the current position."
+ (interactive)
+ (po-compute-counters t))
+
+(defun po-validate ()
+ "Use `msgfmt' for validating the current PO file contents."
+ (interactive)
+
+ ;; If modifications were done already, change the last revision date.
+ (if (buffer-modified-p)
+ (po-replace-revision-date))
+
+ ;; This `let' is for protecting the previous value of compile-command.
+ (let ((compile-command (concat po-msgfmt-program
+ " --statistics -c -v -o /dev/null "
+ buffer-file-name)))
+ (compile compile-command)))
+
+(defun po-guess-archive-name ()
+ "Return the ideal file name for this PO file in the central archives."
+ (let (start-of-header end-of-header package version team)
+ (save-excursion
+ ;; Find the PO file header entry.
+ (goto-char (point-min))
+ (re-search-forward po-any-msgstr-regexp)
+ (setq start-of-header (match-beginning 0)
+ end-of-header (match-end 0))
+ ;; Get the package and version.
+ (goto-char start-of-header)
+ (if (re-search-forward
+ "\n\"Project-Id-Version:\\( GNU\\)? \\([^\n ]+\\) \\([^\n ]+\\)\\\\n\"$"
+ end-of-header t)
+ (setq package (buffer-substring (match-beginning 2) (match-end 2))
+ version (buffer-substring (match-beginning 3) (match-end 3))))
+ (if (or (not package) (string-equal package "PACKAGE")
+ (not version) (string-equal version "VERSION"))
+ (error (_"Project-Id-Version field does not have a proper value")))
+ ;; Get the team.
+ (goto-char start-of-header)
+ (if (re-search-forward "\n\"Language-Team:.*<\\(.*\\)@li.org>\\\\n\"$"
+ end-of-header t)
+ (setq team (buffer-substring (match-beginning 1) (match-end 1))))
+ (if (or (not team) (string-equal team "LL"))
+ (error (_"Language-Team field does not have a proper value")))
+ ;; Compose the name.
+ (concat package "-" version "." team ".po"))))
+
+(defun po-guess-team-address ()
+ "Return the team address related to this PO file."
+ (let (team)
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward po-any-msgstr-regexp)
+ (goto-char (match-beginning 0))
+ (if (re-search-forward
+ "\n\"Language-Team: +\\(.*<\\(.*\\)@li.org>\\)\\\\n\"$"
+ (match-end 0) t)
+ (setq team (buffer-substring (match-beginning 2) (match-end 2))))
+ (if (or (not team) (string-equal team "LL"))
+ (error (_"Language-Team field does not have a proper value")))
+ (buffer-substring (match-beginning 1) (match-end 1)))))
+
+(defun po-send-mail ()
+ "Start composing a letter, possibly including the current PO file."
+ (interactive)
+ (let* ((team-flag (y-or-n-p
+ (_"\
+Write to your team? (`n' means writing to translation project) ")))
+ (address (if team-flag
+ (po-guess-team-address)
+ po-translation-project-address)))
+ (if (not (y-or-n-p (_"Include current PO file? ")))
+ (apply po-compose-mail-function address
+ (read-string (_"Subject? ")) nil)
+ (if (buffer-modified-p)
+ (error (_"The file is not even saved, you did not validate it.")))
+ (if (and (y-or-n-p (_"You validated (`V') this file, didn't you? "))
+ (or (zerop po-untranslated-counter)
+ (y-or-n-p
+ (format (_"%d entries are untranslated, include anyway? ")
+ po-untranslated-counter)))
+ (or (zerop po-fuzzy-counter)
+ (y-or-n-p
+ (format (_"%d entries are still fuzzy, include anyway? ")
+ po-fuzzy-counter)))
+ (or (zerop po-obsolete-counter)
+ (y-or-n-p
+ (format (_"%d entries are obsolete, include anyway? ")
+ po-obsolete-counter))))
+ (let ((buffer (current-buffer))
+ (name (po-guess-archive-name))
+ (transient-mark-mode nil))
+ (apply po-compose-mail-function address
+ (if team-flag
+ (read-string (_"Subject? "))
+ (format "TP-Robot %s" name))
+ nil)
+ (goto-char (point-min))
+ (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator) "\n"))
+ (save-excursion
+ (insert-buffer buffer)
+ (shell-command-on-region
+ (region-beginning) (region-end)
+ (concat po-gzip-uuencode-command " " name ".gz") t))))))
+ (message ""))
+
+(defun po-confirm-and-quit ()
+ "Confirm if quit should be attempted and then, do it.
+This is a failsafe. Confirmation is asked if only the real quit would not."
+ (interactive)
+ (if (po-check-all-pending-edits)
+ (progn
+ (if (or (buffer-modified-p)
+ (> po-untranslated-counter 0)
+ (> po-fuzzy-counter 0)
+ (> po-obsolete-counter 0)
+ (y-or-n-p (_"Really quit editing this PO file? ")))
+ (po-quit))
+ (message ""))))
+
+(defun po-quit ()
+ "Save the PO file and kill buffer. However, offer validation if
+appropriate and ask confirmation if untranslated strings remain."
+ (interactive)
+ (if (po-check-all-pending-edits)
+ (let ((quit t))
+
+ ;; Offer validation of newly modified entries.
+ (if (and (buffer-modified-p)
+ (not (y-or-n-p
+ (_"File was modified; skip validation step? "))))
+ (progn
+ (message "")
+ (po-validate)
+ ;; If we knew that the validation was all successful, we should
+ ;; just quit. But since we do not know yet, as the validation
+ ;; might be asynchronous with PO mode commands, the safest is to
+ ;; stay within PO mode, even if this implies that another
+ ;; `po-quit' command will be later required to exit for true.
+ (setq quit nil)))
+
+ ;; Offer to work on untranslated entries.
+ (if (and quit
+ (or (> po-untranslated-counter 0)
+ (> po-fuzzy-counter 0)
+ (> po-obsolete-counter 0))
+ (not (y-or-n-p
+ (_"Unprocessed entries remain; quit anyway? "))))
+ (progn
+ (setq quit nil)
+ (po-auto-select-entry)))
+
+ ;; Clear message area.
+ (message "")
+
+ ;; Or else, kill buffers and quit for true.
+ (if quit
+ (progn
+ (and (buffer-modified-p) (po-replace-revision-date))
+ (save-buffer)
+ (kill-buffer (current-buffer)))))))
+
+;;; po-mode.el ends here
diff --git a/misc/tcl_gettext.c b/misc/tcl_gettext.c
new file mode 100644
index 0000000..f399ca0
--- /dev/null
+++ b/misc/tcl_gettext.c
@@ -0,0 +1,165 @@
+/* tcl_gettext - Module implementing gettext interface for Tcl.
+ Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, December 1995.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <libintl.h>
+#include <locale.h>
+#include <string.h>
+
+/* Data for Tcl interpreter interface. */
+#include "tcl.h"
+
+/* Prototypes for local functions. */
+static int
+tcl_gettext (ClientData client_data, Tcl_Interp *interp, int argc,
+ char *argv[]);
+static int
+tcl_textdomain (ClientData client_data, Tcl_Interp *interp, int argc,
+ char *argv[]);
+static int
+tcl_bindtextdomain (ClientData client_data, Tcl_Interp *interp, int argc,
+ char *argv[]);
+
+
+/* Initialization functions. Called from the tclAppInit.c/tkAppInit.c
+ or while the dynamic loading with Tcl7.x, x>= 5. */
+int
+Gettext_Init (interp)
+ Tcl_Interp *interp;
+{
+ Tcl_CreateCommand (interp, "gettext", tcl_gettext, (ClientData) 0,
+ (Tcl_CmdDeleteProc *) NULL);
+ Tcl_CreateCommand (interp, "textdomain", tcl_textdomain, (ClientData) 0,
+ (Tcl_CmdDeleteProc *) NULL);
+ Tcl_CreateCommand (interp, "bindtextdomain", tcl_bindtextdomain,
+ (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
+
+ return TCL_OK;
+}
+
+
+static int
+tcl_gettext (client_data, interp, argc, argv)
+ ClientData client_data;
+ Tcl_Interp *interp;
+ int argc;
+ char *argv[];
+{
+ const char *domainname = NULL;
+ int category = LC_MESSAGES;
+ const char *msgid;
+
+ /* The pointer which is assigned in the following statement might
+ reference an invalid part of the address space. But we don't use
+ this value before we know the pointer is correct. */
+ msgid = argv[1];
+
+ switch (argc)
+ {
+ case 4:
+#ifdef LC_CTYPE
+ if (strcmp (argv[3], "LC_CTYPE") == 0)
+ category = LC_CTYPE;
+ else
+#endif
+#ifdef LC_COLLATE
+ if (strcmp (argv[3], "LC_COLLATE") == 0)
+ category = LC_COLLATE;
+ else
+#endif
+#ifdef LC_MESSAGES
+ if (strcmp (argv[3], "LC_MESSAGES") == 0)
+ category = LC_MESSAGES;
+ else
+#endif
+#ifdef LC_MONETARY
+ if (strcmp (argv[3], "LC_MONETARY") == 0)
+ category = LC_MONETARY;
+ else
+#endif
+#ifdef LC_NUMERIC
+ if (strcmp (argv[3], "LC_NUMERIC") == 0)
+ category = LC_NUMERIC;
+ else
+#endif
+#ifdef LC_TIME
+ if (strcmp (argv[3], "LC_TIME") == 0)
+ category = LC_TIME;
+ else
+#endif
+ {
+ interp->result = gettext ("invalid third argument");
+ return TCL_ERROR;
+ }
+ /* FALLTHROUGH */
+
+ case 3:
+ domainname = argv[1];
+ msgid = argv[2];
+ /* FALLTHROUGH */
+
+ case 2:
+ interp->result = dcgettext (domainname, msgid, category);
+ break;
+
+ default:
+ interp->result = gettext ("wrong number of arguments");
+ return TCL_ERROR;
+ }
+
+ return TCL_OK;
+}
+
+
+static int
+tcl_textdomain (client_data, interp, argc, argv)
+ ClientData client_data;
+ Tcl_Interp *interp;
+ int argc;
+ char *argv[];
+{
+ if (argc != 2)
+ {
+ interp->result = gettext ("wrong number of arguments");
+ return TCL_ERROR;
+ }
+
+ interp->result = textdomain (argv[1]);
+
+ return TCL_OK;
+}
+
+
+static int
+tcl_bindtextdomain (client_data, interp, argc, argv)
+ ClientData client_data;
+ Tcl_Interp *interp;
+ int argc;
+ char *argv[];
+{
+ if (argc != 3)
+ {
+ interp->result = gettext ("wrong number of arguments");
+ return TCL_ERROR;
+ }
+
+ return bindtextdomain (argv[1], argv[2]) == NULL ? TCL_ERROR : TCL_OK;
+}
diff --git a/missing b/missing
new file mode 100755
index 0000000..7789652
--- /dev/null
+++ b/missing
@@ -0,0 +1,190 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing - GNU libit 0.0"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`configure.in'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`configure.in'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`configure.in'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755
index 0000000..4f58503
--- /dev/null
+++ b/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
+
+errstatus=0
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644
index 0000000..aebf9df
--- /dev/null
+++ b/po/ChangeLog
@@ -0,0 +1,508 @@
+2000-05-06 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.in.in: Handle case where generation if $(PACKAGE).po fails.
+ (dist): Run update-po first.
+
+ * POTFILES.in: Replace po-gram.gen.c with po-gram-gen.c.
+
+1998-06-01 21:27 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in: Allow parallel `make dist' by splitting dependencies
+ for `dist'. Reported by Alexander V. Lukyanov <lav@yars.free.net>.
+
+1998-04-28 18:07 Ulrich Drepper <drepper@cygnus.com>
+
+ * po/Makefile.in.in: Only try to put newly generated .pot in place
+ when the generation succeeded.
+
+1997-09-10 00:30 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (install-data-yes): Use mkinstalldirs with
+ $(SHELL).
+
+1997-08-21 15:01 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in: Change copyright.
+
+1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (install-data-yes): Don't change directory to
+ install.
+ Reported by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
+
+1997-08-15 22:45 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (MKINSTALLDIRS): Use top_srcdir to find script.
+ Patch by Akim Demaille <demaille@inf.enst.fr>.
+
+1997-05-01 03:43 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (maintainer-clean): Remove GMOFILES. (POTFILES):
+ Don't redirect output directly to destination file.
+ Patch by Jim Meyering <meyering@asic.sc.ti.com>.
+
+Tue Aug 27 02:04:45 1996 Ulrich Drepper <drepper@myware.rz.uni-karlsruhe.de>
+
+ * ko.po: New version of korean translation.
+
+ * es.po: Initial revision
+
+Tue Aug 20 01:40:28 1996 Ulrich Drepper <drepper@myware.rz.uni-karlsruhe.de>
+
+ * fr.po: Update from Franc,ois of 960819.
+
+Sun Aug 18 20:47:47 1996 Ulrich Drepper <drepper@myware.rz.uni-karlsruhe.de>
+
+ * pl.po: Update 960818.
+
+Thu Jul 18 19:00:11 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (distdir): Again work around shells which cannot
+ handle empty `for' list. Reported by Jim Meyering.
+
+Tue Jul 9 21:20:00 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (install-data): Add indirection so that nothing
+ is installed if no internationalization is wanted.
+ (install-data-no, install-data-yes): New goals. install-data-yes
+ does the real work. Reported by Kjetil Torgrim Homme.
+
+Sat Jul 6 11:18:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
+
+ * Makefile.in.in (install-data): Use $(top_srcdir) instead of
+ $(top-srcdir).
+
+Wed Jun 26 11:28:36 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (install-data): Add another `else' clause for
+ those buggy systems. Patch by Fred Fish <fnf@ninemoons.com>.
+
+Sat Jun 22 04:58:22 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (MKINSTALLDIRS): New variable. Path to
+ mkinstalldirs script.
+ (install): use MKINSTALLDIRS variable or if the script is not present
+ try to find it in the $top_scrdir).
+
+Fri Jun 21 01:21:33 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (install-data): Use @ to prevent printing the
+ command, but use echo to inform user what is installed.
+
+Mon Jun 3 02:39:24 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (installcheck): New goal to fulfill needs of
+ automake's distcheck.
+ (install): Combine with install-src goal. The additional installation
+ is done if $(PACKAGE) = gettext.
+ (install-src): Goal removed.
+
+Sat Jun 1 11:50:11 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in.in (dvi, info, tags): New goals added.
+ Reported by Jim Meyering.
+
+Fri May 31 22:55:44 1996 Karl Heuer <kwzh@gnu.ai.mit.edu>
+
+ * Makefile.in.in ($(PACKAGE).pot): If xgettext is not found and
+ therefore $(XGETTEXT) is set to : nothing is created. In this
+ case nothing is done.
+
+Fri May 31 22:33:52 1996 Karl Heuer <kwzh@gnu.ai.mit.edu>
+
+ * Makefile.in.in (stamp-cat-id, mostlyclean): Avoid filename with
+ more than 14 characters. Rename cat-id-tbl.tmp.c to
+ cat-id-tbl.tmp.
+
+Mon May 27 23:42:16 1996 Arne H. Juul <arnej@pvv.unit.no>
+
+ * Makefile.in.in (install-data): Work around another Buglix
+ /bin/sh sillyness.
+
+Thu Apr 4 13:02:56 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (all-gettext): We must create the catalogs.
+
+ * Makefile.in.in (distclean): Remove *.cat.m files generated by
+ some gencat programs.
+
+ * Makefile.in.in: When using GNU gettext tools prefer just built
+ binaries in src/ subdirectory. For all packages but GNU gettext
+ itself this will not change anything.
+
+Tue Apr 2 16:28:54 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (all-gettext): New goal. Same as all-no.
+
+ * Makefile.in.in (install-data): Some systems using catgets()
+ install two files: XXX.cat and XXX.cat.m. Handle this case.
+ (uninstall): Remove .cat.m files, too.
+ Reported by Marcus Daniels.
+
+ * Makefile.in.in (MSGMERGE): Remove -f option. This is the
+ default now.
+
+Mon Mar 25 00:05:18 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (MSGMERGE): Always use -f option.
+
+Sun Mar 24 23:25:01 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in: Don't use tupdate anymore. msgmerge seems to
+ work now.
+
+Sat Mar 2 00:47:48 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (all-no): Rename from all_no.
+
+Thu Feb 15 04:38:29 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (all): Define to `all-@USE_NLS@'.
+ (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
+ is former all.
+
+Sun Dec 24 14:21:20 1995 Jun Young <bangjy@nownuri.nowcom.co.kr>
+
+ * ko.po: Initial revision.
+
+Tue Dec 19 22:11:33 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (Makefile): Explicitly use $(SHELL) for running
+ shell scripts.
+
+Fri Dec 15 17:40:09 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (install-data): Simpler shell code by Andreas
+ Schwab.
+
+Tue Dec 5 11:57:35 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (mostlyclean):
+ Remove *.o files. Reported by Larry Schwimmer.
+
+Sun Dec 3 01:21:55 1995 Ulrich Drepper <drepper@myware>
+
+ * fr.po: Version for 0.10 by Franc,ois Pinard.
+
+Sun Nov 26 02:26:56 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (mostlyclean): Remove cat-id-tbl.tmp.c.
+
+Sun Nov 26 02:00:02 1995 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in.in (.po.cat): Add missing line continuation.
+
+Sat Nov 25 16:53:44 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (CPPFLAGS): New variable. Initialize from @CPPFLAGS@.
+
+Sat Nov 25 02:39:33 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (.po.cat): New rules substituting implicit rules.
+ AIX 3.x's make does not know implicit, transitive rules. Reported
+ by Nelson Beebe.
+
+Fri Nov 24 19:57:32 1995 Ulrich Drepper <drepper@myware>
+
+ * de.po: New format after xgettext changes.
+
+Tue Nov 21 16:32:10 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (DEFS): Add variable to get -DHAVE_CONFIG_H.
+
+Sat Nov 11 17:49:33 1995 Ulrich Drepper <drepper@myware>
+
+ * de.po: Messages of new programs msgmerge and msgunfmt.
+
+ * Makefile.in.in (POTFILES): Correct bug after change to single quotes.
+
+ * POTFILES.in: Add new files after adding Peter Miller's files.
+
+Thu Nov 9 01:48:59 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in:
+ ($(PACKAGE).pot): Don't give list of input files on command line. Use
+ POTFILES.in file instead.
+
+ * de.po:
+ Corrections after splitting usage message in xgettext.c and gettextp.c.
+
+ * de.po: Adjust for new message due to --directory option in xgettext.
+
+Wed Nov 8 23:46:41 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (.po.pox): Find .pot file in $(srcdir).
+
+Mon Nov 6 21:32:22 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (.po.gmo): Finally make ultimate rule which
+ places .gmo always on $(srcdir). Patch by Franc,ois Pinard.
+
+Mon Nov 6 17:08:05 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in: Some more cleanups by Franc,ois Pinard.
+
+Mon Nov 6 16:46:24 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (dist): Force order for parallel build.
+
+ * Makefile.in.in:
+ ($(PACKAGE).pot): Address $(PACKAGE).pot file in $(srcdir).
+ `rm -f' old file instead of using `mv -f'.
+
+ * fr.po: Translations for version 0.9.8 by Franc,ois Pinard.
+
+Mon Nov 6 00:46:30 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in:
+ [implicit rules]: Use $< instead of $*. I hope this is portable but
+ it seems to be the only way to use the VPATH.
+
+Sun Nov 5 20:19:00 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in:
+ ($(PACKAGE).pot): We cannot use _N as the abbreviation. Sun uses this
+ in ctype.h. Use N_ instead.
+
+ * Makefile.in.in (dist-gettext): Make synonym for dist.
+
+Sun Nov 5 16:35:52 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (.po.gmo): Remove .gmo file prior generation.
+
+Sun Nov 5 12:42:11 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (po.msg): Remove $(srcdir) path.
+ (stamp-cat-id): Place stamp-cat-id and cat-id-tbl.c file in $(srcdir).
+
+ * Makefile.in.in (.po.pox, .po.mo, .po.gmo): Remove $(scrdir) path
+ because we now only have one version of each file so that we do
+ not rely on make's VPATH.
+
+ * Makefile.in.in (update-po):
+ Enter $(srcdir) before doing anything and don't remove
+ output file of tupdate if the exit code is not zero.
+
+ * Makefile.in.in (do-dist): Suppress error message when ln failed.
+
+ * Makefile.in.in (dist): Split goal. Call two new rules to get
+ correct sequence.
+ (update-po): Update .po files by calling tupdate.
+ (do-dist): Actually write files to $(distdir). The dependency
+ makes sure that especially the .gmo have a correct time stamp.
+
+ * Makefile.in.in: ($(PACKAGE).pot): Replace _C by _N.
+
+Fri Nov 3 00:37:26 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in:
+ ($(PACKAGE).pot): Keyword for marking string constants is now _C
+ instrad of _GTM. Suggested by Franc,ois Pinard.
+
+Thu Nov 2 01:36:20 1995 Ulrich Drepper <drepper@myware>
+
+ * fr.po: Version for 0.9.5 by Franc,ois.
+
+Wed Nov 1 10:58:59 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (dist): Protect touch $(GMOFILES) against empty
+ $(GMOFILES). Reported by Tom Troley.
+ (dist, POTFILES): Use single instead of double quotes wherever
+ possible.
+
+ * Makefile.in.in (install-data, uninstall, dist): Don't use if
+ test anymore. Using a variable should be all we need to prevent
+ errors.
+
+ * Makefile.in.in (install, uninstall, dist):
+ Correct handling for case where
+ $(CATALOGS) is empty. Reported by Tom Tromey.
+
+Tue Oct 31 22:33:21 1995 Ulrich Drepper <drepper@myware>
+
+ * de.po: Update for 0.9.6.
+
+Fri Oct 27 02:23:26 1995 Ulrich Drepper <drepper@myware>
+
+ * sv.po: Initial revision.
+
+Mon Sep 25 22:32:23 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (.po.gmo):
+ Undo last change. .gmo is now legal suffix. Proposed by
+ Marcus Daniels.
+
+Sun Sep 24 12:32:06 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (.po.gmo):
+ Add missing move after last change in msgfmt program.
+
+Sat Sep 23 14:41:28 1995 Ulrich Drepper <drepper@myware>
+
+ * de.po: All translations for 0.9.4.
+
+Thu Sep 21 01:08:01 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (dist):
+ Protect goal against empty CATALOGS and/or GMOFILES variables.
+
+ * Makefile.in.in (PACKAGE.pot): Add _GMT as an additional keyword.
+
+Mon Sep 18 11:12:26 1995 Ulrich Drepper <drepper@myware>
+
+ * de.po: Adjust for msgcmp program messages.
+
+ * POTFILES.in: Add src/msgcmp.c, src/po-gram.gen.c, and src/po-lex.c.
+
+Sat Aug 19 17:34:29 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in: Make install-src depend on install. This helps
+ gettext to install the sources and other packages can use the
+ install goal.
+
+Sat Aug 19 11:29:37 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (install-src): Better indentation.
+ (uninstall): Remove po-Makefile.in.in.
+
+Fri Aug 18 23:43:39 1995 Ulrich Drepper <drepper@myware>
+
+ * no@nynorsk.po: Initial revision
+
+ * no.po: Version for 0.9.2.
+
+ * Makefile.in.in:
+ ($(PACKAGE).pot): Now runs from $(top_srcdir). This helps to keep the
+ generate #: lines clean.
+
+ * de.po: For version 0.9.3.
+
+ * Makefile.in.in (install-data):
+ Added missing ';' and fix wrong variable reference.
+ Reported by Franc,ois Pinard.
+
+Tue Aug 15 12:54:09 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (gnulocaledir):
+ Always point to share/ subdirectory to install .gmo files.
+
+Tue Aug 15 07:08:45 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (DEFS): Remove unneeded variable.
+
+ * Makefile.in.in (POTFILES): Correct case where $(srcdir) = ".".
+
+Tue Aug 15 06:18:28 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (POTFILES):
+ Correct sed command after change of format. Done in aclocal.m4
+ on 950813.
+
+Mon Aug 14 23:47:30 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (gettextsrcdir):
+ Directory in which Makefile.in.in is installed for use
+ in gettextize shell script.
+
+Sun Aug 13 14:19:38 1995 Ulrich Drepper <drepper@myware>
+
+ * POTFILES.in: Paths to files are now relative to srcdir, not to po/.
+
+Tue Aug 8 13:09:17 1995 Ulrich Drepper <drepper@myware>
+
+ * no.po: Changes for 0.9.1 by Karl O/ygard.
+
+ * no.po: Change for 0.9 by Karl O/ygard.
+
+Fri Aug 4 15:46:32 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (dist): Remove `copying instead' message.
+
+Wed Aug 2 23:38:23 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (.po.pox): Add $(srcdir) path to .po file.
+
+ * no.po, fr.po, de.po: Version for 0.9.
+
+Tue Aug 1 23:48:49 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (all): Add cat-id-tbl.c as dependency.
+
+Tue Aug 1 08:43:54 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (install-data, uninstall, dist):
+ Use sed instead of expr to get basename.
+
+Sat Jul 29 22:57:04 1995 Ulrich Drepper <drepper@myware>
+
+ * no.po: Initial revision.
+ By norwegian Translation Team.
+
+Tue Jul 25 23:45:00 1995 Ulrich Drepper <drepper@myware>
+
+ * POTFILES.in: Change header to include copyright.
+
+Wed Jul 19 23:56:03 1995 Ulrich Drepper <drepper@myware>
+
+ * POTFILES.in: Don't mention libiberty.
+ Reported by Franc,ois Pinard.
+
+ * de.po:
+ Revert to 1.22, because messages are gone. Some scripts still
+ seem to have bugs...
+
+Tue Jul 18 16:20:35 1995 Ulrich Drepper <drepper@myware>
+
+ * gettext.pot, de.po, fr.po: Version for 0.8.
+
+Sun Jul 16 00:58:09 1995 Ulrich Drepper <drepper@myware>
+
+ * fr.po: Latest version (for 0.7.3) by Franc,ois.
+
+Thu Jul 13 22:26:18 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (TUPDATE):
+ Don't address tupdate.perl in ../src. Now it is assumed that
+ tupdate is already installed in a directory in PATH.
+
+Thu Jul 13 01:37:15 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (check): New goal.
+ (.po.msg): po-to-msg.sed is now called po2msg.sed.
+ (stamp-cat-id): po-to-tbl.sed is now called po2tbl.sed.
+
+Wed Jul 12 15:14:23 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (.po.gmo):
+ Strange make: if both files are found through VPATH no explicit
+ path must be given.
+
+Tue Jul 11 21:51:01 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in (TUPDATE): tupdate is now found in ../src
+
+Tue Jul 4 00:45:26 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in: Remove unnecessary $(srcdir).
+ Correct path to po-to-msg.sed script for .po.msg goal.
+
+Mon Jul 3 14:52:06 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in.in: Installation of .gmo files need if.
+ (POTFILES,Makefile): Correct path to original version.
+ (TRANSCSRCS): Renamed to POTFILES.
+
+ * fr.po: Update to new .po file format and version 0.7.
+
+Sun Jul 2 23:59:23 1995 Ulrich Drepper <drepper@myware>
+
+ * de.po: Update to new .po file format and version 0.7.
+ Adopt for new multi-line format.
+
+Sun Jul 2 02:19:20 1995 Ulrich Drepper <drepper@myware>
+
+ * First official release. This directory contains the sources
+ of the message catalog. These are given in the .po file format
+ specified in the Uniforum proposal. With the help of the system's
+ tools or the ones provided by this package every other format
+ needed can be constructed.
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..f470f33
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,249 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: cat-id-tbl.c $(CATALOGS)
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in \
+ && test ! -f $(PACKAGE).po \
+ || ( rm -f $(srcdir)/$(PACKAGE).pot \
+ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(datadir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(gettextsrcdir)/po-Makefile.in.in
+
+check: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+ $(MAKE) update-po
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+Makefile: Makefile.in.in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..41e92de
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,20 @@
+# List of files which containing translatable strings.
+# Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+
+# Files from the compatibility library
+lib/error.c
+lib/getopt.c
+lib/xmalloc.c
+
+# Package source files
+src/gettextp.c
+src/message.c
+src/msgcmp.c
+src/msgcomm.c
+src/msgfmt.c
+src/msgmerge.c
+src/msgunfmt.c
+src/po-gram-gen.c
+src/po-lex.c
+src/xget-lex.c
+src/xgettext.c
diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c
new file mode 100644
index 0000000..a6e37d7
--- /dev/null
+++ b/po/cat-id-tbl.c
@@ -0,0 +1,286 @@
+/* Automatically generated by po2tbl.sed from gettext.pot. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "libgettext.h"
+
+const struct _msg_ent _msg_tbl[] = {
+ {"", 1},
+ {"Unknown system error", 2},
+ {"%s: option `%s' is ambiguous\n", 3},
+ {"%s: option `--%s' doesn't allow an argument\n", 4},
+ {"%s: option `%c%s' doesn't allow an argument\n", 5},
+ {"%s: option `%s' requires an argument\n", 6},
+ {"%s: unrecognized option `--%s'\n", 7},
+ {"%s: unrecognized option `%c%s'\n", 8},
+ {"%s: illegal option -- %c\n", 9},
+ {"%s: invalid option -- %c\n", 10},
+ {"%s: option requires an argument -- %c\n", 11},
+ {"%s: option `-W %s' is ambiguous\n", 12},
+ {"%s: option `-W %s' doesn't allow an argument\n", 13},
+ {"Memory exhausted", 14},
+ {"\
+Copyright (C) %s Free Software Foundation, Inc.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", 15},
+ {"Written by %s.\n", 16},
+ {"missing arguments", 17},
+ {"too many arguments", 18},
+ {"Try `%s --help' for more information.\n", 19},
+ {"\
+Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n\
+ -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n\
+ -e enable expansion of some escape sequences\n\
+ -E (ignored for compatibility)\n\
+ -h, --help display this help and exit\n\
+ -n suppress trailing newline\n\
+ -V, --version display version information and exit\n\
+ [TEXTDOMAIN] MSGID retrieve translated message corresponding\n\
+ to MSGID from TEXTDOMAIN\n", 20},
+ {"\
+\n\
+If the TEXTDOMAIN parameter is not given, the domain is determined from the\n\
+environment variable TEXTDOMAIN. If the message catalog is not found in the\n\
+regular directory, another location can be specified with the environment\n\
+variable TEXTDOMAINDIR.\n\
+When used with the -s option the program behaves like the `echo' command.\n\
+But it does not simply copy its arguments to stdout. Instead those messages\n\
+found in the selected catalog are translated.\n\
+Standard search directory: %s\n", 21},
+ {"Report bugs to <bug-gnu-utils@gnu.org>.\n", 22},
+ {"\
+internationalized messages should not contain the `\\%c' escape sequence", 23},
+ {"cannot create output file \"%s\"", 24},
+ {"standard output", 25},
+ {"error while writing \"%s\" file", 26},
+ {"no input files given", 27},
+ {"exactly 2 input files required", 28},
+ {"\
+Usage: %s [OPTION] def.po ref.po\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -h, --help display this help and exit\n\
+ -V, --version output version information and exit\n\
+\n\
+Compare two Uniforum style .po files to check that both contain the same\n\
+set of msgid strings. The def.po file is an existing PO file with the\n\
+old translations. The ref.po file is the last created PO file\n\
+(generally by xgettext). This is useful for checking that you have\n\
+translated each and every message in your program. Where an exact match\n\
+cannot be found, fuzzy matching is used to produce better diagnostics.\n", 29},
+ {"this message is used but not defined...", 30},
+ {"...but this definition is similar", 31},
+ {"this message is used but not defined in %s", 32},
+ {"warning: this message is not used", 33},
+ {"duplicate message definition", 34},
+ {"...this is the location of the first definition", 35},
+ {"this message has no definition in the \"%s\" domain", 36},
+ {"while preparing output", 37},
+ {"%s and %s are mutually exclusive", 38},
+ {"at least two files must be specified", 39},
+ {"impossible selection criteria specified (%d < n < %d)", 40},
+ {"\
+Usage: %s [OPTION] INPUTFILE ...\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -e, --no-escape do not use C escapes in output (default)\n\
+ -E, --escape use C escapes in output, no extended chars\n\
+ -f, --files-from=FILE get list of input files from FILE\n\
+ --force-po write PO file even if empty\n\
+ -F, --sort-by-file sort output by file location\n\
+ -h, --help display this help and exit\n", 41},
+ {"\
+ -i, --indent write the .po file using indented style\n\
+ --no-location do not write '#: filename:line' lines\n\
+ -n, --add-location generate '#: filename:line' lines \
+(default)\n\
+ --omit-header don't write header with `msgid \"\"' entry\n\
+ -o, --output=FILE write output to specified file\n\
+ -p, --output-dir=DIR output files will be placed in directory \
+DIR\n\
+ -s, --sort-output generate sorted output and remove \
+duplicates\n\
+ --strict write out strict Uniforum conforming .po \
+file\n\
+ -T, --trigraphs understand ANSI C trigraphs for input\n\
+ -u, --unique shorthand for --less-than=2, requests\n\
+ that only unique messages be printed\n", 42},
+ {"\
+ -V, --version output version information and exit\n\
+ -w, --width=NUMBER set output page width\n\
+ -<, --less-than=NUMBER print messages with less than this many\n\
+ definitions, defaults to infinite if not\n\
+ set\n\
+ ->, --more-than=NUMBER print messages with more than this many\n\
+ definitions, defaults to 1 if not set\n\
+\n\
+Find messages which are common to two or more of the specified PO files.\n\
+By using the --more-than option, greater commonality may be requested\n\
+before messages are printed. Conversely, the --less-than option may be\n\
+used to specify less commonality before messages are printed (i.e.\n\
+--less-than=2 will only print the unique messages). Translations,\n\
+comments and extract comments will be preserved, but only from the first\n\
+PO file to define them. File positions from all PO files will be\n\
+preserved.\n", 43},
+ {"error while opening \"%s\" for reading", 44},
+ {"this file may not contain domain directives", 45},
+ {"no input file given", 46},
+ {"error while opening \"%s\" for writing", 47},
+ {"%d translated messages", 48},
+ {", %d fuzzy translations", 49},
+ {", %d untranslated messages", 50},
+ {"\
+Usage: %s [OPTION] filename.po ...\n\
+Generate binary message catalog from textual translation description.\n\
+\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n\
+ -c, --check perform language dependent checks on strings\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -f, --use-fuzzy use fuzzy entries in output\n\
+ -h, --help display this help and exit\n\
+ --no-hash binary file will not include the hash table\n\
+ -o, --output-file=FILE specify output file name as FILE\n\
+ --statistics print statistics about translations\n\
+ --strict enable strict Uniforum mode\n\
+ -v, --verbose list input file anomalies\n\
+ -V, --version output version information and exit\n\
+\n\
+Giving the -v option more than once increases the verbosity level.\n\
+\n\
+If input file is -, standard input is read. If output file is -,\n\
+output is written to standard output.\n", 51},
+ {"while creating hash table", 52},
+ {"%s: warning: PO file header missing, fuzzy, or invalid", 53},
+ {"domain name \"%s\" not suitable as file name", 54},
+ {"domain name \"%s\" not suitable as file name: will use prefix", 55},
+ {"`domain %s' directive ignored", 56},
+ {"empty `msgstr' entry ignored", 57},
+ {"fuzzy `msgstr' entry ignored", 58},
+ {"headerfield `%s' missing in header", 59},
+ {"header field `%s' should start at beginning of line", 60},
+ {"some header fields still have the initial default value", 61},
+ {"field `%s' still has initial default value", 62},
+ {"%s: warning: source file contains fuzzy translation", 63},
+ {"`msgid' and `msgstr' entries do not both begin with '\\n'", 64},
+ {"`msgid' and `msgstr' entries do not both end with '\\n'", 65},
+ {"number of format specifications in `msgid' and `msgstr' does not match", 66},
+ {"format specifications for argument %u are not the same", 67},
+ {"\
+Usage: %s [OPTION] def.po ref.po\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -C, --compendium=FILE additional library of message translations,\n\
+ may be specified more than once\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -e, --no-escape do not use C escapes in output (default)\n\
+ -E, --escape use C escapes in output, no extended chars\n\
+ --force-po write PO file even if empty\n\
+ -h, --help display this help and exit\n\
+ -i, --indent indented output style\n\
+ -o, --output-file=FILE result will be written to FILE\n\
+ --no-location suppress '#: filename:line' lines\n\
+ --add-location preserve '#: filename:line' lines (default)\n\
+ --strict strict Uniforum output style\n\
+ -v, --verbose increase verbosity level\n\
+ -V, --version output version information and exit\n\
+ -w, --width=NUMBER set output page width\n", 68},
+ {"\
+\n\
+Merges two Uniforum style .po files together. The def.po file is an\n\
+existing PO file with the old translations which will be taken over to\n\
+the newly created file as long as they still match; comments will be\n\
+preserved, but extract comments and file positions will be discarded.\n\
+The ref.po file is the last created PO file (generally by xgettext), any\n\
+translations or comments in the file will be discarded, however dot\n\
+comments and file positions will be preserved. Where an exact match\n\
+cannot be found, fuzzy matching is used to produce better results. The\n\
+results are written to stdout unless an output file is specified.\n", 69},
+ {"\
+%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete \
+%d.\n", 70},
+ {" done.\n", 71},
+ {"\
+Usage: %s [OPTION] [FILE]...\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -e, --no-escape do not use C escapes in output (default)\n\
+ -E, --escape use C escapes in output, no extended chars\n\
+ --force-po write PO file even if empty\n\
+ -h, --help display this help and exit\n\
+ -i, --indent write indented output style\n\
+ -o, --output-file=FILE write output into FILE instead of standard output\n\
+ --strict write strict uniforum style\n\
+ -V, --version output version information and exit\n\
+ -w, --width=NUMBER set output page width\n", 72},
+ {"\
+\n\
+Convert binary .mo files to Uniforum style .po files.\n\
+Both little-endian and big-endian .mo files are handled.\n\
+If no input file is given or it is -, standard input is read.\n\
+By default the output is written to standard output.\n", 73},
+ {"error while reading \"%s\"", 74},
+ {"file \"%s\" truncated", 75},
+ {"seek \"%s\" offset %ld failed", 76},
+ {"file \"%s\" is not in GNU .mo format", 77},
+ {"missing `msgstr' section", 78},
+ {"found %d fatal errors", 79},
+ {"too many errors, aborting", 80},
+ {"keyword \"%s\" unknown", 81},
+ {"invalid control sequence", 82},
+ {"end-of-line within string", 83},
+ {"end-of-file within string", 84},
+ {"standard input", 85},
+ {"%s:%d: warning: unterminated character constant", 86},
+ {"%s:%d: warning: unterminated string literal", 87},
+ {"--join-existing cannot be used when output is written to stdout", 88},
+ {"xgettext cannot work without keywords to look for", 89},
+ {"warning: file `%s' extension `%s' is unknown; will try C", 90},
+ {"\
+Usage: %s [OPTION] INPUTFILE ...\n\
+Extract translatable string from given input files.\n\
+\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -a, --extract-all extract all strings\n\
+ -c, --add-comments[=TAG] place comment block with TAG (or those\n\
+ preceding keyword lines) in output file\n\
+ -C, --c++ shorthand for --language=C++\n\
+ --debug more detailed formatstring recognision result\n\
+ -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -e, --no-escape do not use C escapes in output (default)\n\
+ -E, --escape use C escapes in output, no extended chars\n\
+ -f, --files-from=FILE get list of input files from FILE\n\
+ --force-po write PO file even if empty\n\
+ --foreign-user omit FSF copyright in output for foreign user\n\
+ -F, --sort-by-file sort output by file location\n", 91},
+ {"\
+ -h, --help display this help and exit\n\
+ -i, --indent write the .po file using indented style\n\
+ -j, --join-existing join messages with existing file\n\
+ -k, --keyword[=WORD] additonal keyword to be looked for (without\n\
+ WORD means not to use default keywords)\n\
+ -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n\
+ -L, --language=NAME recognise the specified language (C, C++, PO),\n\
+ otherwise is guessed from file extension\n\
+ -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n\
+ -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n\
+ --no-location do not write '#: filename:line' lines\n", 92},
+ {"\
+ -n, --add-location generate '#: filename:line' lines (default)\n\
+ --omit-header don't write header with `msgid \"\"' entry\n\
+ -o, --output=FILE write output to specified file\n\
+ -p, --output-dir=DIR output files will be placed in directory DIR\n\
+ -s, --sort-output generate sorted output and remove duplicates\n\
+ --strict write out strict Uniforum conforming .po file\n\
+ -T, --trigraphs understand ANSI C trigraphs for input\n\
+ -V, --version output version information and exit\n\
+ -w, --width=NUMBER set output page width\n\
+ -x, --exclude-file=FILE entries from FILE are not extracted\n\
+\n\
+If INPUTFILE is -, standard input is read.\n", 93},
+ {"language `%s' unknown", 94},
+};
+
+int _msg_tbl_length = 94;
diff --git a/po/da.gmo b/po/da.gmo
new file mode 100644
index 0000000..5838b72
--- /dev/null
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
new file mode 100644
index 0000000..db9b056
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,819 @@
+# gettext-0.10/po/da.po -- initial revision -*- po -*-
+# Copyright (C) 1996 Free Software Foundation, Inc.
+# Thorbjoern Ravn Andersen <ravn@dit.ou.dk>, 1996.
+msgid ""
+msgstr ""
+"Project-Id-Version: gettext 0.10.31\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1997-08-29 07:21 MDT\n"
+"Last-Translator: Thorbjoern Ravn Andersen <ravn@mip.ou.dk>\n"
+"Language-Team: Danish <da@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-Latin-1\n"
+"Content-Transfer-Encoding: Base64\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "Ukendt systemfejl"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: tilvalget '%s' kan betyde flere ting\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: tilvalget '--%s' tager ikke et argument\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: tilvalget `%c%s' tager ikke et argument\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: tilvalget `%s' kræver et argument\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: ukendt tilvalg `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: ukendt tilvalg `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ulovligt tilvalg -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ugyldigt tilvalg -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: tilvalget '%c' kræver et argument\n"
+
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: tilvalget '%s' kan betyde flere ting\n"
+
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: tilvalget '--%s' tager ikke et argument\n"
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "ikke mere ledig hukommelse"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"Dette er frit programmel; kildeteksten indeholder kopibetingelser. Der er\n"
+"INGEN garanti -- end ikke for SALGBARHED eller VELEGNETHED TIL NOGET SÆRLIGT\n"
+"FORMÅL.\n"
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Skrevet af %s.\n"
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "argumenter mangler"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "for mange argumenter"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Information fås med `%s --help'\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Brug: %s [TILVALG] [[[TEKSTDOMÆNE] TEKSTID] | [-s [TEKSTID]...]]\n"
+" -d, --domain=TEKSTDOMÆNE hent oversatte tekster fra TEKSTDOMÆNE\n"
+" -e aktivér fortolkning af visse escape-sekvenser\n"
+" -E (ignoreret af hensyn til kompabilitet)\n"
+" -h, --help vis denne hjælp og afslut\n"
+" -n undertryk afsluttende linieskift\n"
+" -V, --version vis versionsinformation og afslut\n"
+" [TEKSTDOMÆNE] TEKSTID hent den oversatte tekst fra TEKSTDOMÆNE\n"
+" svarende til TEKSTID\n"
+"\n"
+"(TEKSTID svarer til 'msgid' felterne)\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Hvis TEKSTDOMÆNE parameteren ikke angives, bestemmes domænet ud fra værdien af\n"
+"miljøvariablen TEXTDOMAIN. Hvis tekstkataloget ikke kan findes i det\n"
+"sædvanlige filkatalog, kan en anden placering angives vha miljøvariablen\n"
+"TEXTDOMAINDIR.\n"
+"Når tilvalget -s bruges, opfører programmet sig som 'echo' kommandoen, men\n"
+"argumenterne bliver ikke blot kopieret til standard uddata. I stedet\n"
+"oversættes de tekster der findes i det valgte tekstkatalog.\n"
+"Standard filkataloget for søgning er: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+#, fuzzy
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr "Rapportér fejl på engelsk til <bug-gnu-utils@prep.ai.mit.edu>.\n"
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr "oversættelige tekster må ikke indeholde `\\%c' escapesekvensen"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "kan ikke oprette uddatafil '%s'"
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "standard uddata"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "fejl ved skrivning til filen '%s'"
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "ingen filer angivet som inddata"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "der kræves netop to inddatafiler"
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Brug: %s [TILVALG] def.po ref.po\n"
+"Hvis et langt tilvalg tager et argument, gælder det også for den\n"
+"tilsvarende korte udgave.\n"
+" -D, --directory=FILKATALOG gennemsøg også FILKATALOG efter inddatafiler\n"
+" -h, --help vis denne hjælpetekst og afslut\n"
+" -V, --version vis versions information og afslut\n"
+"\n"
+"Sammenlign to .po filer i Uniforum format for at kontrollere at de begge\n"
+"indeholder det samme sæt af msgid tekststrenge. PO-filen 'def.po' indeholder\n"
+"de gamle oversættelser og PO-filen 'ref.po' er den nyeste udgave (sædvanligvis\n"
+"oprettet af xgettext). Dette er en praktisk måde at kontrollere at hver\n"
+"eneste tekst i programmet er oversat. Hvis der ikke er nøjagtigt sammenfald\n"
+"mellem msgid-tekststrengene, benyttes en upræcis sammenligningsmetode til at\n"
+"give bedre fejlretningsinformation.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "denne tekst bruges men er ikke erklæret..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...men denne tekst ligner"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "denne tekst er brugt, men ikke erklæret i %s"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "advarsel: denne tekst bliver ikke brugt"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "tekst erklæret mere end en gang"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "... her er den første erklæring"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "denne besked har ingen erklæring i '%s' domænet"
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "under udskriftsforberedelse"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s og %s udelukker hinanden"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr ""
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr ""
+
+#: src/msgcomm.c:400
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Brug: %s [TILVALG] INDDATAFIL ...\n"
+"Hvis et langt tilvalg tager et argument, gælder det også for den korte\n"
+"udgave af tilvalget.\n"
+" -a, --extract-all træk alle tekster ud\n"
+" -c, --add-comments[=MÆRKE] placér kommentarafsnit for MÆRKE (eller \n"
+" de foregående nøgleordslinier) i uddata\n"
+" -C, --c++ genkend kommentarer i C++ stil\n"
+" --debug mere detaljeret resultat af strenggenkendelse \n"
+" -d, --default-domain=NAVN send uddata til NAVN.po (standard messages.po)\n"
+" -D, --directory=FILKATALOG gennemsøg også FILKATALOG efter inddatafiler\n"
+" -e, --no-escape brug ikke C-escapetegn i uddata (standard)\n"
+" -E, --escape brug C-escapetegn i uddata. Ingen specialtegn\n"
+" -f, --files-from=FIL hent inddatafilliste fra FIL\n"
+" --force-po udskriv PO fil selv hvis den er tom\n"
+" --foreign-user undlad FSF copyright i udskrift til fremmed bruger\n"
+" -F, --sort-by-file sortér uddata efter filposition\n"
+
+#: src/msgcomm.c:412
+#, fuzzy
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -n, --add-location skriv '#: filenavn:linie' linier "
+"(standard)\n"
+" --omit-header undlad skrivning af `msgid' teksten i "
+"hovedet\n"
+" -o, --output=FIL uddata skrives til FIL\n"
+" -p, --output-dir=FILKATALOG uddatafiler placeres i FILKATALOG\n"
+" -s, --sort-output sortér uddata og fjern gentagelser\n"
+" --strict uddata overholder 'streng Uniforum'-stil\n"
+" -T, --trigraphs forstå ANSI C trigrafer i inddata\n"
+" -V, --version vis versionsinformation og afslut\n"
+" -w, --width=TAL\t\t angiv uddatabredde\n"
+" -x, --exclude-file=FIL tekster i FIL benyttes ikke\n"
+"\n"
+"Hvis INPUTFIL er -, læses fra standard inddata.\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "fejl ved læse-åbning af '%s'"
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "denne fil må ikke indeholde 'domain' kommandoer"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "ingen inddatafil angivet"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "fejl opstået ved skrive-åbning af '%s'"
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d oversatte tekster"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d upræcise oversættelser"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d uoversatte tekster"
+
+#: src/msgfmt.c:366
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Brug: %s [TILVALG] filnavn.po ...\n"
+"Hvis et langt tilvalg tager et argument, gælder det også for den\n"
+"tilsvarende korte udgave.\n"
+" -a, --alignment=TAL tekststrenge placeres på adresser som er\n"
+" multipla af TAL bytes (standard %d)\n"
+" -c, --check lav sprogafhængige check af tekster\n"
+" -D, --directory=FILKATALOG gennemsøg også FILKATALOG efter inddatafiler\n"
+" -f, --use-fuzzy marker upræcisheder med 'fuzzy' i uddata\n"
+" -h, --help vis denne hjælpetekst og afslut\n"
+" --no-hash den binære fil vil ikke indeholde hashtabellen\n"
+" -o, --output-file=FIL angiv FIL som uddatafil\n"
+" --statistics udskriv statistik over oversættelser\n"
+" --strict aktivér 'strict Uniforum'-stil\n"
+" -v, --verbose vis anormaliteter i inddata\n"
+" -V, --version vis versionsinformation og afslut\n"
+"\n"
+"Angives -v mere end en gang, forøges informationsmængden tilsvarende.\n"
+"\n"
+"Hvis inddatafilen er -, læses fra standard-input. Hvis uddatafilen er -,\n"
+"skrives uddata til standard-output.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "under oprettelsen af hashtabel"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "%s: advarsel: kildetekstfilen indeholder løse oversættelser (fuzzy)"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "domænet '%s' kan ikke bruges som filnavn"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr "domænet '%s' er ikke brugbart som filnavn. Vil bruge præfiks istedet"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "`domain %s'-kommando ignoreres"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "tom `msgstr'-kommando ignoreret"
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "\"fuzzy\" `msgstr'-tekst ignoreret"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "feltet `%s' mangler i hovedet"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "feltet `%s' bør starte ved liniens begyndelse"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr "nogle felter i hovedet har stadig den oprindelige standardværdi"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "feltet `%s' har stadig den oprindelige standardværdi"
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "%s: advarsel: kildetekstfilen indeholder løse oversættelser (fuzzy)"
+
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "`msgid' og `msgstr' teksterne begynder ikke begge med '\\n'"
+
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "`msgid' og `msgstr' teksterne slutter ikke begge med '\\n'"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr "forskelligt antal formater i `msgid' og `msgstr'"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "formaterne for argument %u er forskellige"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Brug: %s [TILVALG] def.po ref.po\n"
+"Hvis et langt tilvalg kræver et argument, gælder det også for det tilsvarende\n"
+"korte tilvalg.\n"
+" -D, --directory=FILKATALOG gennemsøg også FILKATALOG efter inddatafiler\n"
+" -e, --no-escape brug ikke C-escapesekvenser i uddata (standard)\n"
+" --force-po skriv PO filen selv om den er tom\n"
+" -E, --escape brug C-escapesekvenser i uddata uden specialtegn\n"
+" -h, --help vis denne hjælp og afslut\n"
+" -i, --indent benyt indrykket stil for uddata\n"
+" -o, --output-file=FIL uddata skrives til FIL\n"
+" --no-location undertryk '#: filnavn:linie' linier\n"
+" --add-location bevar '#: filnavn:liine' liner (standard)\n"
+" --strict benyt 'streng Uniforum' stil for uddata\n"
+" -v, --verbose forøg udskreven information\n"
+" -V, --version vis versionsinformation og afslut\n"
+" -w, --width=TAL\t sæt udskrivningsbredde\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Kombinerer to .po filer i Uniforum-stil. `def.po' filen (som allerede findes)\n"
+"indholder gamle oversættelser som vil blive overført til den nye PO fil under\n"
+"forudsætning af at de stadig passer. Kommentarer vil blive bevaret i\n"
+"modsætning til fil-udtrækskommentarer og filpositioner. `ref.po' filen er den\n"
+"sidst oprettede PO fil (sædvanligvis af xgettext), hvorfra alle oversættelser\n"
+"og kommentarer vil blive bortkastet, men 'punktum'-kommentarer og\n"
+"filpositioner vil blive bevaret. Når der ikke kan findes en nøjagtig\n"
+"overensstemmelse, vil 'løs søgning' (fuzzy matching) blive brugt til at give\n"
+"bedre resultater. Med mindre en uddatafil er angivet, vil resultaterne blive\n"
+"skrevet til standard uddata.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%sLæste %d gamle + %d reference, samlede %d, upræcise %d, mangler %d, "
+"forældede %d.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " afsluttet.\n"
+
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Brug: %s [TILVALG] def.po ref.po\n"
+"Hvis et langt tilvalg kræver et argument, gælder det også for det tilsvarende\n"
+"korte tilvalg.\n"
+" -e, --no-escape brug ikke C-escapesekvenser i uddata (standard)\n"
+" -E, --escape brug C-escapesekvenser i uddata. Ingen specialtegn\n"
+" -h, --help vis denne hjælp og afslut\n"
+" -i, --indent benyt indrykket stil for uddata\n"
+" -o, --output-file=FIL uddata skrives til FIL\n"
+" --strict benyt 'streng Uniforum' stil for uddata\n"
+" -V, --version vis versionsinformation og afslut\n"
+" -w, --width=TAL angiv udskrivningsbredde\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Omform binære .mo filer til Uniforum .po filer. Både 'little-endian'\n"
+"og 'big-endian' .mo filer kan håndteres. Hvis inddatafilen er -,\n"
+"læses standard inddata. Som standard skrives til standard uddata.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "fejl ved læsning af '%s'"
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "filen '%s' blev afkortet"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "seek '%s' offset %ld mislykkedes"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "filen '%s' er ikke i GNU .mo format"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "`msgstr' afsnit mangler"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "fandt %d fatale fejl"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "afbryder kørslen på grund af for mange fejl"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "ukendt nøgleord '%s'"
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "ulovlig kontrolsekvens"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "tekststreng var ikke afsluttet ved linieskift"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "tekststreng ikke afsluttet da filens slutning blev nået"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "standard inddata"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr "%s:%d: advarsel: tegnkonstant ikke afsluttet korrekt"
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr "%s:%d: advarsel: streng'literal' ikke afsluttet"
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+"--join-existing kan ikke benyttes når uddata sendes til standard uddata"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr ""
+"advarsel: ukendt type for fil `%s' med endelse `%s'; C benyttes i stedet"
+
+#: src/xgettext.c:544
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Brug: %s [TILVALG] INDDATAFIL ...\n"
+"Hvis et langt tilvalg tager et argument, gælder det også for den korte\n"
+"udgave af tilvalget.\n"
+" -a, --extract-all træk alle tekster ud\n"
+" -c, --add-comments[=MÆRKE] placér kommentarafsnit for MÆRKE (eller \n"
+" de foregående nøgleordslinier) i uddata\n"
+" -C, --c++ genkend kommentarer i C++ stil\n"
+" --debug mere detaljeret resultat af strenggenkendelse \n"
+" -d, --default-domain=NAVN send uddata til NAVN.po (standard messages.po)\n"
+" -D, --directory=FILKATALOG gennemsøg også FILKATALOG efter inddatafiler\n"
+" -e, --no-escape brug ikke C-escapetegn i uddata (standard)\n"
+" -E, --escape brug C-escapetegn i uddata. Ingen specialtegn\n"
+" -f, --files-from=FIL hent inddatafilliste fra FIL\n"
+" --force-po udskriv PO fil selv hvis den er tom\n"
+" --foreign-user undlad FSF copyright i udskrift til fremmed bruger\n"
+" -F, --sort-by-file sortér uddata efter filposition\n"
+
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help vis denne hjælp og afslut\n"
+" -i, --indent skriv .po-filen i indrykket stil\n"
+" -j, --join-existing kombiner tekster med eksisterende fil\n"
+" -k, --keyword[=ORD] søg efter yderligere nøgleord. Hvis ORD ikke \n"
+" angives, bruges standard-nøgleord ikke).\n"
+" -l, --string-limit=TAL sæt grænse for tekststrenglængde til TAL (%u)\n"
+" -L, --language=NAVN genkend det angivne sprog (C, C++, PO),\n"
+" ellers gættes det fra filendelsen\n"
+" -m, --msgstr-prefix[=STRENG] brug STRENG/'' som prefiks for `msgstr' tekster\n"
+" -M, --msgstr-suffix[=STRENG] brug STRENG/'' som suffiks for `msgstr' tekster\n"
+" --no-location undlad skrivning af '#: filnavn:linie' linier\n"
+
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location skriv '#: filenavn:linie' linier (standard)\n"
+" --omit-header undlad skrivning af `msgid' teksten i hovedet\n"
+" -o, --output=FIL uddata skrives til FIL\n"
+" -p, --output-dir=FILKATALOG uddatafiler placeres i FILKATALOG\n"
+" -s, --sort-output sortér uddata og fjern gentagelser\n"
+" --strict uddata overholder 'streng Uniforum'-stil\n"
+" -T, --trigraphs forstå ANSI C trigrafer i inddata\n"
+" -V, --version vis versionsinformation og afslut\n"
+" -w, --width=TAL\t\t angiv uddatabredde\n"
+" -x, --exclude-file=FIL tekster i FIL benyttes ikke\n"
+"\n"
+"Hvis INPUTFIL er -, læses fra standard inddata.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr "ukendt sprog `%s'"
+
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "%s: advarsel: \"header\" element ikke angivet"
+
+#~ msgid "Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.\n"
+#~ msgstr "Rapportér fejl på engelsk til <bug-gnu-utils@prep.ai.mit.edu>.\n"
diff --git a/po/de.gmo b/po/de.gmo
new file mode 100644
index 0000000..ff67cd0
--- /dev/null
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..1256054
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,848 @@
+# German translations for GNU gettext package.
+# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995-1997.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.35\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1998-04-30 23:23-0700\n"
+"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "unbekannter Systemfehler"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: Option »%s« ist mehrdeutig\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: Option »--%s« erwartet kein Argument\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: Option »%c%s« erwartet kein Argument\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: Option »%s« erwartet ein Argument\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: unbekannte Option »--%s«\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: unbekannte Option »%c%s«\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: unzulässige Option -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ungültige Option -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: Option erwartet ein Argument -- %c\n"
+
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: Option »-W %s« ist mehrdeutig\n"
+
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: Option »-W %s« erwartet kein Argument\n"
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "virtueller Speicher erschöpft"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Copyright © %s Free Software Foundation, Inc.\n"
+"Dies ist freie Software; in den Quellen befindet sich die Lizenzbedingung.\n"
+"Es gibt KEINERLEI Garantie; nicht einmal für die TAUGLICHKEIT oder\n"
+"die VERWENDBARKEIT ZU EINEN ANGEGEBENEN ZWECK.\n"
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Geschrieben von %s.\n"
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "Argumente fehlen"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "zu viele Argumente"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "»%s --help« gibt weitere Informationen.\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Benutzung: %s [OPTION] [[[TEXTBEREICH] SCHLÜSSEL] | [-s [MSGID]...]]\n"
+" -d, --domain=BEREICH Übersetzungen kommen aus Namensbereich BEREICH\n"
+" -e schalte Übersetzung von Sonderzeichendarstellung an\n"
+" -E (Aus Kompatibilitätsgründen ignoriert)\n"
+" -h, --help zeige diese Hilfe und beende\n"
+" -n gebe kein abschließendes Zeilenendezeichen aus\n"
+" -V, --version zeige Versionsnummer und beende\n"
+" [BEREICH] SCHLÜSSEL hole die Übersetzung zu SCHLÜSSEL aus\n"
+" dem Namensbereich BEREICH\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Wenn der BEREICH Parameter nicht gegeben wurde, wird der Bereich durch die\n"
+"Umgebungsvariable TEXTDOMAIN bestimmt. Wenn der Katalog dieses Bereiches\n"
+"sich nicht im Standardverzeichnis des Systems befindet, kann durch die\n"
+"Umgebungsvariable TEXTDOMAINDIR ein anderes Verzeichnis angegeben werden.\n"
+"\n"
+"Wenn die -s Option angeschaltet ist, verhält sich das Programm wie das\n"
+"`echo' Kommando. Aber anstatt alle Argumente einfach auszugeben, werden\n"
+"diese, falls im Namensbereich vorhanden, übersetzt.\n"
+"Standardverzeichnis: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr "Fehler bitte an <bug-gnu-utils@gnu.org> melden.\n"
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"internationalisierbare Meldungen sollten nicht die Ersatzdarstellung »\\%c« "
+"enthalten"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "Ausgabedatei »%s« kann nicht erzeugt werden"
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "Standard Ausgabe"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "Fehler beim Schreiben von Datei »%s«"
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "keine Eingabedateien gegeben"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "es werden genau zwei Eingabedateien benötigt"
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Benutzung: %s [OPTION] Datei1.po Def.po Ref.po\n"
+"Notwendige Argumente für Optionen in Langform sind auch für die\n"
+"Kurzform notwendig.\n"
+" -D, --directory=VERZEICHNIS füge VERZEICHNIS in Liste für Verzeichnisse\n"
+" mit PO Dateien ein\n"
+" -h, --help zeige diese Hilfe und beende\n"
+" -V, --version zeige Versionsnummer und beende\n"
+"\n"
+"Vergleiche zwei .po Dateien im Uniforum Format um zu sicherzustellen, daß\n"
+"beide die gleichen `msgid' Einträge enthalten. Die Datei Def.po enthält die\n"
+"alten Übersetzungen, die Datei Ref.po ist die letzte (i.A. durch xgettext)\n"
+"erzeugte PO Datei. Mit Hilfe diese Programms läßt sich also überprüfen, ob\n"
+"jede Meldung im Programm übersetzt wurde. Wenn keine exakte Übereinstimmung\n"
+"gefunden wurde, wird mittels inexakter Suche versucht, eine bessere\n"
+"Hilfestellung zu geben.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "diese Meldung wird benutzt, wird aber nicht definiert..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...aber diese Definition ist ähnlich"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "diese Meldung wird benutzt, wird aber nicht in %s definiert"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "Warnung: diese Meldung wird nicht benutzt"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "Mehrfachdefinition der Meldung"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...dies ist die Stelle der ersten Definition"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "diese Meldung hat im Bereich »%s« keine Definition"
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "beim Vorbereiten der Ausgabe"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s und %s schließen sich gegenseitig aus"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr "es müssen mindestens zwei Dateien angegeben werden"
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr "unmögliches Auswahlkriterium (%d < n < %d)"
+
+#: src/msgcomm.c:400
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Benutzung: %s [OPTION] EINGABEDATEI ...\n"
+"Notwendige Argumente für Optionen in Langform sind auch für die\n"
+"Kurzform notwendig.\n"
+" -d, --default-domain=NAME Ausgabe in NAME.po (anstatt in messages.po)\n"
+" -D, --directory=VERZEICHNIS füge VERZEICHNIS in Liste für Verzeichnisse\n"
+" mit PO Dateien ein\n"
+" -e, --no-escape keine C Ersatzdarstellung in Ausgabe (Std)\n"
+" -E, --escape Ersatzdarstellung für nicht-ASCII Zeichen\n"
+" -f, --files-from=DATEI hole Namen der Eingabedateien aus DATEI\n"
+" --force-po PO Datei wird auch bei Fehlern geschrieben\n"
+" -F, --sort-by-file sortiere Ausgabe nach Dateivorkommen\n"
+" -h, --help zeige diese Hilfe und beende\n"
+
+#: src/msgcomm.c:412
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -i, --indent erzeuge .po Datei mit Einrückungen\n"
+" --no-location schreibe keine »#: Datei:Zeile« Zeilen\n"
+" -n, --add-location erzeuge '#: Dateiname:Zeilennummer' "
+"(default)\n"
+" --omit-header `msgid \"\"' Eintrag in Kopfteil nicht "
+"erzeugen\n"
+" -o, --output=DATEI schreibe Ausgabe in DATEI\n"
+" -p, --output-dir=VERZEICHNIS Ausgabedateien kommen nach VERZEICHNIS\n"
+" -s, --sort-output sortiere Ausgabe und entferne Dubletten\n"
+" --strict erzeuge .po Datei streng nach Uniforum "
+"Form\n"
+" -T, --trigraphs ANSI C Trigraph Zeichen werden erkannt\n"
+" -u, --unique Abkürzung für --less-than=2, fordert "
+"Meldungen\n"
+" an, die nur einmal vorkommen\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+" -V, --version zeige Versionsnummer und beende\n"
+" -w, --width=ANZAHL setze Breite der Ausgabeseite\n"
+" -<, --less-than=ANZAHL zeige Meldungen mit weniger als ANZAHL "
+"Definitionen\n"
+" (Standardwert: unendlich)\n"
+" ->, --more-than=ANZAHL zeige Meldungen mit mehr als ANZAH{ "
+"Definitionen\n"
+" (Standardwert: 1)\n"
+"\n"
+"Suche Meldungen, die in zwei oder mehr der angegebenen PO Dateien "
+"vorkommen.\n"
+"Wenn die --more-than Option verwendet wird, kann eine größere Verbreitung\n"
+"gefordert werden. Auf der anderen Seite können mit --less-than nur "
+"Meldungen\n"
+"mit geringerer Verbreitung angezeigt werden. D.h., --less-than=2 wird nur\n"
+"Meldungen anzeigen, die nur einmal vorkommen. Úbersetzungen, Kommentare "
+"und\n"
+"extrahierte Kommentare werden beibehalten, aber nur von der ersten PO Datei\n"
+"die sie definiert. Positionen der Meldungen in den Quellen werden für alle\n"
+"PO Dateien festgehalten.\n"
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "Öffnen der Datei »%s« zum Lesen fehlgeschlagen"
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "diese Datei darf keine `domain' Anweisung enthalten"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "Eingabedatei fehlt"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "Öffnen der Datei »%s« zum Schreiben fehlgeschlagen"
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d übersetzte Meldungen"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d ungenaue Übersetzungen"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d unübersetzte Meldungen"
+
+#: src/msgfmt.c:366
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Benutzung: %s [OPTION] Dateiname.po ...\n"
+"Erzeuge binären Datein mit Meldungen aus der textuellen Beschreibung.\n"
+"\n"
+"Notwendige Argumente für Optionen in Langform sind auch für die\n"
+"Kurzform notwendig.\n"
+" -a, --alignment=ZAHL Ausgaben an ZAHL (Std: %d) Bytegrenze ausrichten\n"
+" -c, --check Überprüfe Formatelemente in Meldungen\n"
+" -D, --directory=VERZEICHNIS füge VERZEICHNIS in Liste für Verzeichnisse\n"
+" mit PO Dateien ein\n"
+" -f, --use-fuzzy benutze auch ungenaue Übersetzungen\n"
+" -h, --help zeige diese Hilfe und beende\n"
+" --no-hash Binärdatei wird keine Hash-Tabelle enthalten\n"
+" -o, --output-file=DATEI lege DATEI als Ausgabedatei fest\n"
+" --statistics zeige Statistik für Übersetzungen an\n"
+" --strict verfahre strikt nach Uniforum Spezifikation\n"
+" -v, --verbose zeige Unregelmäßigkeiten in Eingabe auf\n"
+" -V, --version zeige Versionsnummer und beende\n"
+"\n"
+"Wenn die Eingabedatei - ist, wird die Eingabe von Standard Eingabe gelesen.\n"
+"Ist die Ausgabedatei -, wird nach Standard Ausgabe geschrieben.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "beim Anlegen der Hash-Tabelle"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "%s: Warnung: Quelldatei enthält ungenaue Übersetzungen"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "Bereichsname »%s« ist nicht als Dateiname geeignet"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr ""
+"Bereichsname »%s« ist nicht als Dateiname geeignet: werde Präfix verwenden"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "»domain %s« Anweisung wird ignoriert"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "leerer »msgstr« Eintrag wird ignoriert"
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "ungenauer »msgstr« Eintrag wird ignoriert"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "Im Kopfeintrag fehlt das Feld »%s«"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "Feld »%s« im Kopfeintrag sollte in der ersten Spalte anfangen"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr ""
+"Einige Felder im Kopfeintrag haben immer noch den vorgegebenen Standardwert"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "Feld »%s« hat immer noch den vorgegebenen Standardwert"
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "%s: Warnung: Quelldatei enthält ungenaue Übersetzungen"
+
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "»msgid« und »msgstr« Eintrag beginnt nicht jeweils mit »\\n«"
+
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "»msgid« und »msgstr« Eintrag endet nicht jeweils mit »\\n«"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr ""
+"Anzahl der Formatelemente in »msgid« and »msgstr« stimmen nicht überein"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "Formatelemente für Argument %u stimmen nicht überein"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Benutzung: %s [OPTION] Def.po Ref.po\n"
+"Notwendige Argumente für Optionen in Langform sind auch für die\n"
+"Kurzform notwendig.\n"
+" -D, --directory=VERZEICHNIS füge VERZEICHNIS in Liste für Verzeichnisse\n"
+" mit PO Dateien ein\n"
+" -e, --no-escape verwende keine C Ersatzdarstellung in Ausgabe\n"
+" (Standardeinstellung)\n"
+" -E, --escape keine nicht-ASCII Zeichen in Ausgabe verwenden\n"
+" --force-po erzeuge PO Datei auch wenn sie leer ist\n"
+" -h, --help zeige diese Hilfe und beende\n"
+" -i, --indent Ausgabe wird eingerückt dargestellt\n"
+" -o, --output-file=DATEI schreibe Ausgabe nach DATEI\n"
+" --no-location erzeuge kein '#: Dateiname:Zeile' Zeilen\n"
+" --add-location erhalte '#: Dateiname:Zeile' Zeilen (Standard)\n"
+" --strict erzeuge .po Datei streng nach Uniforum Form\n"
+" -v, --verbose zeige Unregelmäßigkeiten in Eingabe auf\n"
+" -V, --version zeige Versionsnummer und beende\n"
+" -w, --width=ANZAHL lege Breite der Ausgabe auf ANZAHL Spalten fest\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Verschmelze zwei .po Dateien im Uniforum Format. Die Datei Def.po ist eine\n"
+"PO Datei mit alten Übersetzungen die, solange sie immer noch passen, in die\n"
+"neu zu erzeugende Datei übernommen werden; Kommentare des Übersetzers werden\n"
+"übernommen, aber von xgettext extrahierte Kommentare werden verworfen. Die\n"
+"Datei Ref.po ist die letzte (i.A. durch xgettext) erzeugte PO Datei mit den\n"
+"aktuellen Meldungen. Übersetzungen und Übersetzerkommentare werden\n"
+"verworfen, die #. und #: Kommentare aber übernommen. Wenn es keine exakte\n"
+"Übereinstimmung bei Meldungen gibt wird mittels inexakter Suche versucht,\n"
+"ein besseres Ergebnis zu erzielen. Solange nicht anders angegeben wird das\n"
+"Ergebnis nach Standard Ausgabe geschrieben.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%s%d alte + %d Referenzeinträge gelesen,\n"
+"%d stimmen überein, %d ungefähr, %d fehlen, %d veraltet.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " fertig.\n"
+
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Benutzung: %s [OPTION] DATEI1.mo DATEI2.po\n"
+"Notwendige Argumente für Optionen in Langform sind auch für die\n"
+"Kurzform notwendig.\n"
+" -e, --no-escape verwende keine C Ersatzdarstellung in Ausgabe (Std)\n"
+" -E, --escape verwende Ersatzdarstellung für nicht-ASCII Zeichen\n"
+" --force-po erzeuge PO Datei auch wenn sie leer ist\n"
+" -h, --help zeige diese Hilfe und beende\n"
+" -i, --indent Ausgabe wird eingerückt dargestellt\n"
+" -o, --output-file=DATEI schreibe Ausgabe in DATEI anstatt Standardausgabe\n"
+" --strict erzeuge .po Datei streng nach Uniforum Form\n"
+" -V, --version zeige Versionsnummer und beende\n"
+" -w, --width=ANZAHL lege Breite der Ausgabe auf ANZAHL Spalten fest\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Wandle binäre .mo Dateien zurück in .po Dateien im Uniforum Format. Es\n"
+"werden sowohl big-endian als auch little-endian Dateien behandelt. Wenn die\n"
+"Eingabedatei - ist, wird von Standard Eingabe gelesen. Standardmäßig\n"
+"wird die Ausgabe nach Standard Ausgabe geschrieben.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "Fehler beim Lesen von »%s«"
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "Datei »%s« ist verstümmelt"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "Positionieren in Datei »%s« auf Position %ld fehlgeschlagen"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "Datei »%s« ist keine Datei im GNU .mo Format"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "»msgstr« Abschnitt fehlt"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "es sind %d fatale Fehler aufgetreten"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "zu viele Fehler: Abbruch"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "Schlüsselwort »%s« ist unbekannt"
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "ungültiges Kontrollzeichen"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "Zeilenende innerhalb einer Zeichenkette"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "Dateiende innerhalb einer Zeichenkette"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "Standard Eingabe"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr "%s:%d: Warnung: Zeichenkonstante ohne korrektes Ende"
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr "%s:%d: Warnung: Zeichenkette nicht korrekt beendet"
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+"--join-existing kann nicht benutzt werden, wenn nach Standard Ausgabe "
+"geschrieben wird"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr ""
+"Warnung: Typ der Datei »%s« mit Anhängsel »%s« ist unbekannt; werde es mit C "
+"versuchen"
+
+#: src/xgettext.c:544
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Benutzung: %s [OPTION] EINGABEDATEI ...\n"
+"Schreibe aus allen Eingabedateien alle Meldungen, die übersetzt werden\n"
+"müssen heraus.\n"
+"\n"
+"Notwendige Argumente für Optionen in Langform sind auch für die\n"
+"Kurzform notwendig.\n"
+" -a, --extract-all schreibe alle Zeichenketten heraus\n"
+" -c, --add-comments[=KENNUNG] Kommentare mit Kennung (oder die aus Zeilen\n"
+" vor einem Schlüsselwort) herausschreiben\n"
+" -C, --c++ behandle auch C++ Kommentare\n"
+" --debug detaillierte Formatstringbewertung in Ausgabe\n"
+" -d, --default-domain=NAME Ausgabe in NAME.po (anstatt in messages.po)\n"
+" -D, --directory=VERZEICHNIS füge VERZEICHNIS in Liste für Verzeichnisse\n"
+" mit PO Dateien ein\n"
+" -e, --no-escape keine C Ersatzdarstellung in Ausgabe (Std)\n"
+" -E, --escape Ersatzdarstellung für nicht-ASCII Zeichen\n"
+" -f, --files-from=DATEI hole Namen der Eingabedateien aus DATEI\n"
+" --force-po PO Datei wird auch bei Fehlern geschrieben\n"
+" --foreign-user füge keine FSF Copyright Zeile in Ausgabe ein\n"
+" -F, --sort-by-file sortiere Ausgabe nach Dateivorkommen\n"
+
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help zeige diese Hilfe und beende\n"
+" -i, --indent Ausgabe wird eingerückt dargestellt\n"
+" -j, --join-existing hänge Ausgaben an existierende Datei an\n"
+" -k, --keyword[=WORT] zusätzliches Wort nach dem gesucht wird (ohne\n"
+" WORT schaltet Suche nach Standardworten ab)\n"
+" -l, --string-limit=ZAHL begrenze Zeichenkettenlänge auf Zahl\n"
+" (statt Defaultwert %u)\n"
+" -L, --language=NAME bearbeitete Eingabe entsprechend Sprache\n"
+" NAME (C, C++, PO)\n"
+" -m, --msgstr-prefix[=KETTE] nehme KETTE oder \"\" als Präfix für msgstr\n"
+" -M, --msgstr-suffix[=KETTE] nehme KETTE oder \"\" als Suffix für msgstr\n"
+" --no-location erzeuge keine '#: Dateiname:Zeile' Zeilen\n"
+
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location erzeuge '#: Dateiname:Zeilennummer' (default)\n"
+" --omit-header `msgid \"\"' Eintrag in Kopfteil nicht erzeugen\n"
+" -o, --output=DATEI schreibe Ausgabe in DATEI\n"
+" -p, --output-dir=VERZEICHNIS Ausgabedateien kommen nach VERZEICHNIS\n"
+" -s, --sort-output sortiere Ausgabe und entferne Dubletten\n"
+" --strict erzeuge .po Datei streng nach Uniforum Form\n"
+" -T, --trigraphs ANSI C Trigraph Zeichen werden erkannt\n"
+" -V, --version zeige Versionsnummer und beende\n"
+" -w, --width=ANZAHL lege Breite der Ausgabe auf ANZAHL Spalten fest\n"
+" -x, --exclude-file=DATEI Einträge aus DATEI werden nicht bearbeitet\n"
+"\n"
+"Wenn EINGABEDATEI - ist, wird von Standard Eingabe gelesen.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr "Programmiersprache `%s' unbekannt"
+
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "%s: Warnung: kein Kopfeintrag gefunden"
diff --git a/po/el.gmo b/po/el.gmo
new file mode 100644
index 0000000..970dc29
--- /dev/null
+++ b/po/el.gmo
Binary files differ
diff --git a/po/el.po b/po/el.po
new file mode 100644
index 0000000..cd72db0
--- /dev/null
+++ b/po/el.po
@@ -0,0 +1,1151 @@
+# Greek messages for GNU gettext.
+# Copyright © 1998 Free Software Foundation, Inc.
+# Simos KSenitellis <simos@teiath.gr>, 1998.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.34\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1998-05-17 13:12+0200\n"
+"Last-Translator: Simos KSenitellis <simos@teiath.gr>\n"
+"Language-Team: Greek <simos@teiath.gr>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-7\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#
+# File: lib/error.c, line: 103
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "¶ãíùóôï óöÜëìá óõóôÞìáôïò"
+
+#
+# File: lib/getopt.c, line: 680
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: ç åðéëïãÞ `%s' åßíáé äéöïñïýìåíç\n"
+
+#
+# File: lib/getopt.c, line: 704
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: ç åðéëïãÞ `--%s' äåí åðéôñÝðåé ðáñÜìåôñï\n"
+
+#
+# File: lib/getopt.c, line: 709
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: ç åðéëïãÞ `%c%s' äåí åðéôñÝðåé ðáñÜìåôñï\n"
+
+#
+# File: lib/getopt.c, line: 726
+# File: lib/getopt.c, line: 899
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: ç åðéëïãÞ `%s' áðáéôåß ðáñÜìåôñï\n"
+
+#
+# File: lib/getopt.c, line: 755
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: ìç áíáãíùñßóéìç åðéëïãÞ `--%s'\n"
+
+#
+# File: lib/getopt.c, line: 759
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: ìç áíáãíùñßóéìç åðéëïãÞ `%c%s'\n"
+
+#
+# File: lib/getopt.c, line: 785
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ìç áðïäåêôÞ åðéëïãÞ -- %c\n"
+
+#
+# File: lib/getopt.c, line: 788
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ìç Ýãêõñç åðéëïãÞ -- %c\n"
+
+#
+# File: lib/getopt.c, line: 818
+# File: lib/getopt.c, line: 948
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: ç åðéëïãÞ áðáéôåß ðáñÜìåôñï -- %c\n"
+
+#
+# File: lib/getopt.c, line: 865
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: ç åðéëïãÞ `-W %s' åßíáé äéöïñïýìåíç\n"
+
+#
+# File: lib/getopt.c, line: 883
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: ç åðéëïãÞ `-W %s' äåí åðéôñÝðåé ðáñÜìåôñï\n"
+
+#
+# File: lib/xmalloc.c, line: 82
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "H ìíÞìç åîáíôëÞèçêå"
+
+#
+# File: src/gettextp.c, line: 134
+# File: src/msgcmp.c, line: 144
+# File: src/msgcomm.c, line: 285
+# File: src/msgfmt.c, line: 257
+# File: src/msgmerge.c, line: 254
+# File: src/msgunfmt.c, line: 175
+# File: src/xgettext.c, line: 394
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"ÐíåõìáôéêÜ Äéêáéþìáôá (C) %s Free Software Foundation, Inc.\n"
+"Áõôü ôï ðñüãñáììá åßíáé åëåýèåñï ëïãéóìéêü· äåßôå ôï ðçãáßï êþäéêá ãéá ôïõò\n"
+"êáíïíéóìïýò áíôéãñáöÞò. Äåí õðÜñ÷åé ÊÁÌÉÁ ÅÃÃÕÇÓÇ· ïýôå áêüìá ãéá\n"
+"ËÅÉÔÏÕÑÃÉÊÏÔÇÔÁ Þ ÊÁÔÁËËÇËÏÔÇÔÁ ÃÉÁ ÅÍÁ ÓÕÃÊÅÊÑÉÌÅÍÏ ÓÊÏÐÏ.\n"
+
+#
+# File: src/gettextp.c, line: 139
+# File: src/msgcmp.c, line: 149
+# File: src/msgcomm.c, line: 290
+# File: src/msgfmt.c, line: 262
+# File: src/msgmerge.c, line: 259
+# File: src/msgunfmt.c, line: 180
+# File: src/xgettext.c, line: 399
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr "ÃñáììÝíï áðü ôïí/ôçí %s.\n"
+
+#
+# File: src/gettextp.c, line: 154
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "õðïëåßðïíôáé ïñßóìáôá"
+
+#
+# File: src/gettextp.c, line: 164
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "ðÜñá ðïëëÜ ïñßóìáôá"
+
+#
+# File: src/gettextp.c, line: 228
+# File: src/msgcmp.c, line: 181
+# File: src/msgcomm.c, line: 395
+# File: src/msgfmt.c, line: 361
+# File: src/msgmerge.c, line: 301
+# File: src/msgunfmt.c, line: 210
+# File: src/xgettext.c, line: 532
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "ÄïêéìÜóôå `%s --help' ãéá ðåñéóóüôåñåò ðëçñïöïñßåò.\n"
+
+#
+# File: src/gettextp.c, line: 233
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"×ñÞóç: %s [ÅÐÉËÏÃÇ] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN áíÜêôçóç ìåôáöñáóìÝíùí ìçíõìÜôùí áðü ôï TEXTDOMAIN\n"
+" -e åíåñãïðïßçóç ôçò áíáäßðëùóçò ïñéóìÝíùí óåéñþí\n"
+" ÷áñáêôÞñùí äéáöõãÞò\n"
+" -E (áãíïåßôáé ãéá ëüãïõò óõìâáôüôçôáò)\n"
+" -h, --help åìöÜíéóç áõôÞò ôçò âïÞèåéáò êáé Ýîïäïò\n"
+" -n áðïâïëÞ ÷áñáêôÞñá áëëáãÞò ãñáììÞò óôï ôÝëïò ôçò óåéñÜò\n"
+" -v, --version åìöÜíéóç ðëçñïöïñéþí Ýêäïóçò êáé Ýîïäïò\n"
+" [TEXTDOMAIN] MSGID áíÜêôçóç áíôßóôïé÷ïõ ìåôáöñáóìÝíïõ ìçíýìáôïò ðïõ áíôéóôïé÷åß\n"
+" óôï MSGID áðü ôï TEXTDOMAIN\n"
+
+#
+# File: src/gettextp.c, line: 245
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Áí ç ðáñÜìåôñïò TEXTDOMAIN äå äßíåôáé, ôüôå ðåñéï÷Þ áíáêôÜôáé áðü ôç\n"
+"ìåôáâëçôÞ ðåñéâÜëëïíôïò TEXTDOMAIN. Áí ï êáôÜëïãïò ìçíõìÜôùí äå âñåèåß óôï\n"
+"êáèéåñùìÝíï êáôÜëïãï, åëÝã÷åôáé ç ôéìÞ ôçò ìåôáâëçôÞò ðåñéâÜëëïíôïò TEXTDOMAINDIR.\n"
+"¼ôáí ãßíåôáé ÷ñÞóç ôçò åðéëïãÞò -s, ôï ðñüãñáììá óõìðåñéöÝñåôáé óáí\n"
+"ôçí åíôïëÞ `echo'. ÁëëÜ äåí áíôéãñÜöåé áðëÜ ôá ïñßóìáôá óôçí êáíïíéêÞ Ýîïäï.\n"
+"Áíôßèåôá, ôá ìçíýìáôá ðïõ âñßóêïíôáé óôï åðéëåãìÝíï êáôÜëïãï, ìåôáöñÜæïíôáé.\n"
+"ÊáèéåñùìÝíïò êáôÜëïãïò áíáæÞôçóçò: %s\n"
+
+#
+# File: src/gettextp.c, line: 255
+# File: src/msgcmp.c, line: 200
+# File: src/msgcomm.c, line: 442
+# File: src/msgfmt.c, line: 388
+# File: src/msgmerge.c, line: 334
+# File: src/msgunfmt.c, line: 234
+# File: src/xgettext.c, line: 584
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr "Óôåßëôå áíáöïñÝò óöáëìÜôùí óôï <bug-gnu-utils@gnu.org>.\n"
+
+#
+# File: src/message.c, line: 784
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"ôá ìçíýìáôá ðñïò ìåôÜöñáóç äåí ðñÝðåé íá ðåñéÝ÷ïõí ôï ÷áñáêôÞñá äéáöõãÞò "
+"`\\%c'"
+
+#
+# File: src/message.c, line: 1115
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "áäõíáìßá äçìéïõñãßáò áñ÷åßïõ åîüäïõ \"%s\""
+
+#
+# File: src/message.c, line: 1122
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "êáíïíéêÞ Ýîïäïò"
+
+#
+# File: src/message.c, line: 1182
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "óöÜëìá óôçí åããñáöÞ ôïõ áñ÷åßïõ \"%s\""
+
+#
+# File: src/msgcmp.c, line: 160
+# File: src/msgmerge.c, line: 270
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "äåí êáèïñßóôçêáí áñ÷åßá åéóüäïõ"
+
+#
+# File: src/msgcmp.c, line: 165
+# File: src/msgmerge.c, line: 275
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "áðáéôïýíôáé áêñéâþò äýï áñ÷åßá åéóüäïõ"
+
+#
+# File: src/msgcmp.c, line: 186
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"×ñÞóç: %s [ÅÐÉËÏÃÇ] def.po ref.po\n"
+"Ïé õðï÷ñåùôéêïß ðáñÜìåôñïé óôá ðåñéöñáóôéêÜ ïñßóìáôá åßíáé õðï÷ñåùôéêïß\n"
+"êáé ãéá ôá óýíôïìá ïñßóìáôá.\n"
+" -D, --directory=ÊÁÔÁËÏÃÏÓ ðñüóèåóå ôïí ÊÁÔÁËÏÃÏ óôç ëßóôá\n"
+" ãéá áíáæÞôçóç áñ÷åßùí åéóüäïõ.\n"
+" -h, --help åìöÜíéóç áõôÞò ôçò âïÞèåéáò êáé Ýîïäïò\n"
+" -V, --version åìöÜíéóç ðëçñïöïñéþí Ýêäïóçò ðñïãñÜììáôïò êáé Ýîïäïò\n"
+"\n"
+"Óýãêñéóç äýï áñ÷åßùí .po ôçò ìïñöÞò Uniforum ãéá ôïí Ýëåã÷ï áí êáé ôá äýï\n"
+"ðåñéÝ÷ïõí ôï ßäéï óýíïëï áðü msgid áëöáñéèìéôéêÜ. Ôï áñ÷åßï def.po åßíáé\n"
+"Ýíá ðñïûðÜñ÷ïí áñ÷åßï PO ìå ôéò ðáëéÝò ìåôáöñÜóåéò. Ôï áñ÷åßï ref.po file\n"
+"åßíáé ôï ðéï ðñüóöáôï áñ÷åßï PO (ãåíéêÜ äçìéïõñãçìÝíï áðü ôï ðñüãñáììá\n"
+"xgettext). Åßíáé ÷ñÞóéìï ãéá ôï Ýëåã÷ï üôé üëá ôá ìçíýìáôá ôïõò ðñïãñÜììáôïò\n"
+"Ý÷ïõí ìåôáöñáóôåß. Åêåß ðïõ äåí åíôïðßæåôáé áêñéâÞò áíôéóôoé÷ßá,\n"
+"ãßíåôáé åëáóôéêü ôáßñéáóìá ãéá êáëýôåñá áðïôåëÝóìáôá.\n"
+
+#
+# File: src/msgcmp.c, line: 259
+# File: src/msgmerge.c, line: 714
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "áõôü ôï ìÞíõìá ÷ñçóéìïðïåßôáé, áëëÜ äåí ïñßæåôáé..."
+
+#
+# File: src/msgcmp.c, line: 261
+# File: src/msgmerge.c, line: 716
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...áëëÜ áõôüò ï ïñéóìüò åßíáé ðáñüìïéïò"
+
+#
+# File: src/msgcmp.c, line: 267
+# File: src/msgmerge.c, line: 743
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "áõôü ôï ìÞíõìá ÷ñçóéìïðïåßôáé, áëëÜ äåí ïñßæåôáé óôï %s"
+
+#
+# File: src/msgcmp.c, line: 281
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "ðñïåéäïðïßçóç: áõôü ôï ìÞíõìá äåí ÷ñçóéìïðïåßôáé"
+
+#
+# File: src/msgcmp.c, line: 355
+# File: src/msgfmt.c, line: 632
+# File: src/msgmerge.c, line: 493
+# File: src/xgettext.c, line: 1063
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "åðáíáëáìâáíüìåíïò ïñéóìüò ìçíýìáôïò"
+
+#
+# File: src/msgcmp.c, line: 356
+# File: src/msgfmt.c, line: 633
+# File: src/msgmerge.c, line: 494
+# File: src/xgettext.c, line: 1064
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...áõôÞ åßíáé ç èÝóç ôïõ ðñþôïõ ïñéóìïý"
+
+#
+# File: src/msgcmp.c, line: 396
+# File: src/msgmerge.c, line: 542
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "áõôü ôï ìÞíõìá äåí Ý÷åé ïñéóìü óôç ðåñéï÷Þ \"%s\""
+
+#
+# File: src/msgcomm.c, line: 238
+# File: src/xgettext.c, line: 340
+# File: src/xgettext.c, line: 1258
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "êáèþò ðñïåôïéìáæüôáí ç Ýîïäïò"
+
+#
+# File: src/msgcomm.c, line: 273
+# File: src/msgcomm.c, line: 277
+# File: src/xgettext.c, line: 378
+# File: src/xgettext.c, line: 382
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "ôá %s êáé %s åßíáé áìïéâáßá áðïêëåéþìåíá"
+
+#
+# File: src/msgcomm.c, line: 341
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr "ðñÝðåé íá ïñéóôïýí ôïõëÜ÷éóôïí äýï áñ÷åßá"
+
+#
+# File: src/msgcomm.c, line: 360
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr "Ý÷åé åðéëå÷èåß áäýíáôï êñéôÞñéï åðéëïãÞò (%d < n < %d)"
+
+#
+# File: src/msgcomm.c, line: 400
+#: src/msgcomm.c:400
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"×ñÞóç: %s [ÅÐÉËÏÃÇ] ÁÑ×ÅÉÏÅÉÓÏÄÏÕ ...\n"
+"Ïé õðï÷ñåùôéêïß ðáñÜìåôñïé óôá ðåñéöñáóôéêÜ ïñßóìáôá åßíáé õðï÷ñåùôéêïß\n"
+"êáé ãéá ôá óýíôïìá ïñßóìáôá.\n"
+" -d, --default-domain=ÏÍÏÌÁ ÷ñÞóç ôïõ ÏÍÏÌÁ.po ãéá Ýîïäï (áíôß ôïõ messages.po)\n"
+" -D, --directory=ÊÁÔÁËÏÃÏÓ ðñïóèÞêç ôïõ ÊÁÔÁËÏÃÏÓ óôçí áíáæÞôçóç áñ÷åßùí åéóüäïõ\n"
+" -e, --no-escape áðïöõãÞ ÷ñÞóçò êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï\n"
+" (åî ïñéóìïý)\n"
+" -E, --escape ÷ñÞóç êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï, ü÷é üìùò\n"
+" êáé åêôåôáìÝíïõò ÷áñáêôÞñåò.\n"
+" -f, --files-from=ÁÑ×ÅÉÏ ëÞøç ëßóôáò áñ÷åßùí åéóüäïõ áðü ÁÑ×ÅÉÏ\n"
+" --force-po äçìéïõñãßá áñ÷åßïõ PO áêüìá êáé áí åßíáé Üäåéï\n"
+" -F, --sort-by-file ôáîéíüìçóç åîüäïõ âÜóç ôçò èÝóçò áñ÷åßïõ\n"
+" -h, --help åìöÜíéóç áõôÞò ôçò âïÞèåéáò êáé Ýîïäïò\n"
+
+#
+# File: src/msgcomm.c, line: 412
+#: src/msgcomm.c:412
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -i, --indent äçìéïõñãßá .po áñ÷åßïõ ìå ìïñöïðïéçìÝíç "
+"Ýîïäï\n"
+" --no-location áðïöõãÞ åìöÜíéóçò ãñáììþí '#: "
+"filename:line'\n"
+" -n, --add-location äçìéïõñãßá ãñáììþí '#: filename:line' (åî "
+"ïñéóìïý)\n"
+" --omit-header íá ìç ãñáöôåß êåöáëßäá ìå åããñáöÞ `msgid "
+"\"\"'\n"
+" -o, --output=ÁÑ×ÅÉÏ åããñáöÞ åîüäïõ óôï åðéëåãìÝíï áñ÷åßï\n"
+" -p, --output-dir=ÊÁÔÁËÏÃÏÓ ôá áñ÷åßá åîüäïõ èá ôïðïèåôçèïýí "
+"óôïêáôÜëïãï ÊÁÔÁËÏÃÏÓ\n"
+" -s, --sort-output äçìéïõñãßá ôáîéíïìçìÝíçò åîüäïõ êáé "
+"áðáëïéöÞ åðáíáëÞøåùí\n"
+" --strict äçìéïõñãßá áñ÷åßï .po ðïõ óõìöùíïýí áðüëõôá "
+"ìå ôï ðñüôõðï Uniforum\n"
+" -T, --trigraphs áðïäï÷Þ ANSI C ôñéãñáììÜôùí óôçí åßóïäï\n"
+" -u, --unique óõíôïìïãñáößá ôïõ --less-than=2, áßôçóç "
+"ãéá\n"
+" åìöÜíéóç ìüíï ôùí ìïíáäéêþí ìçíõìÜôùí\n"
+
+#
+# File: src/msgcomm.c, line: 425
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+" -V, --version åìöÜíéóç ðëçñïöïñéþí Ýêäïóçò ðñïãñÜììáôïò\n"
+" êáé Ýîïäïò\n"
+" -w, --width=ÁÑÉÈÌÏÓ ïñéóìüò ðëÜôïõò óåëßäáò åîüäïõ\n"
+" -<, --less-than=ÁÑÉÈÌÏÓ åìöÜíéóç ìçíõìÜôùí ìå ëéãüôåñá áðü ÁÑÉÈÌÏÓ\n"
+" ïñéóìïýò, åî ïñéóìïý óå Üðåéñï áí äåí "
+"ôåèåß\n"
+" ->, --more-than=ÁÑÉÈÌÏÓ åìöÜíéóç ìçíõìÜôùí ìå ðåñéóóüôåñá áðü "
+"ÁÑÉÈÌÏÓ\n"
+" ïñéóìïýò, åî ïñéóìïý óå Ýíá áí äåí ôåèåß\n"
+"\n"
+"Åýñåóç ìçíõìÜôùí ðïõ åßíáé êïéíÜ óå äýï Þ ðåñéóóüôåñá ïñéóìÝíá áñ÷åßá PO.\n"
+"Ìå ôç ÷ñÞóç ôçò åðéëïãÞò --more-than option, ìðïñåß íá æçôçèåß ìåãáëýôåñç\n"
+"óõããÝíåéá ðñéí åìöáíéóôïýí ôá ìçíýìáôá. Áíôßèåôá, ìå ôçí åðéëïãÞ "
+"--less-than\n"
+"ìðïñåß íá ïñéóôåß ìéêñüôåñç óõããÝíåéá ðñéí åìöáíéóôïýí ôá ìçíýìáôá (ð.÷.\n"
+"ôï --less-than=2 èá åìöáíßóåé ìüíï ôá ìïíáäéêÜ ìçíýìáôá). Ïé ìåôáöñÜóåéò,\n"
+"ôá ó÷üëéá êáé ôá ìçíýìáôá óå ìïñöÞ ó÷ïëßùí èá äéáôçñçèïýí, áëëÜ ìüíï áðü ôï\n"
+"ðñþôï áñ÷åßï PO ðïõ ôá Ý÷åé ïñßóåé. Ïé èÝóåéò áñ÷åßïõ áðü üëá ôá áñ÷åßá PO\n"
+"èá äéáôçñçèïýí.\n"
+
+#
+# File: src/msgcomm.c, line: 476
+# File: src/msgunfmt.c, line: 357
+# File: src/po-lex.c, line: 74
+# File: src/xget-lex.c, line: 159
+# File: src/xget-lex.c, line: 174
+# File: src/xget-lex.c, line: 191
+# File: src/xgettext.c, line: 618
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "óöÜëìá óôï Üíïéãìá ôïõ \"%s\" ãéá áíÜãíùóç"
+
+#
+# File: src/msgcomm.c, line: 557
+# File: src/xgettext.c, line: 660
+# File: src/xgettext.c, line: 970
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "áõôü ôï áñ÷åßï äåí ìðïñåß íá ðåñéÝ÷åé ïäçãßåò ãéá ôç ðåñéï÷Þ"
+
+#
+# File: src/msgfmt.c, line: 273
+# File: src/xgettext.c, line: 410
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "äåí äüèçêå áñ÷åßï åéóüäïõ"
+
+#
+# File: src/msgfmt.c, line: 321
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "óöÜëìá êáôÜ ôï Üíïéãìá ôïõ áñ÷åßïõ \"%s\" ãéá åããñáöÞ"
+
+#
+# File: src/msgfmt.c, line: 343
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d ìåôáöñáóìÝíá ìõíÞìáôá"
+
+#
+# File: src/msgfmt.c, line: 345
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d ðñïóåããéóôéêÝò ìåôáöñÜóåéò"
+
+#
+# File: src/msgfmt.c, line: 347
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d ìç ìåôáöñáóìÝíá ìçíýìáôá"
+
+#
+# File: src/msgfmt.c, line: 366
+#: src/msgfmt.c:366
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"×ñÞóç: %s [ÅÐÉËÏÃÇ] filename.po ...\n"
+"Äçìéïõñãßá äõáäéêïý êáôáëüãïõ ìçíõìÜôùí áðü ëåêôéêÞ ìåôÜöñáóç ðåñéãñáöþí.\n"
+"\n"
+"Ïé õðï÷ñåùôéêïß ðáñÜìåôñïé óôá ðåñéöñáóôéêÜ ïñßóìáôá åßíáé õðï÷ñåùôéêïß\n"
+"êáé ãéá ôá óýíôïìá ïñßóìáôá.\n"
+" -a, --alignment=ÁÑÉÈÌÏÓ óôïß÷çóç áëöáñéèìçôéêþí óå ÁÑÉÈÌÏÓ áðü bytes\n"
+" (åî ïñéóìïý ôéìÞ: %d)\n"
+" -c, --check åêôÝëåóç åëÝã÷ùí åîáñôçìÝíùí áðü ôç ãëþóóá\n"
+" óôá áëöáñéèìçôéêÜ\n"
+" -D, --directory=ÊÁÔÁËÏÃÏÓ ðñüóèåóå ôïí ÊÁÔÁËÏÃÏ óôç ëßóôá ãéá áíáæÞôçóç\n"
+" áñ÷åßùí åéóüäïõ.\n"
+" -f, --use-fuzzy ÷ñÞóç ðñïóåããéóôéêþí åããñáöþí óôçí Ýîïäï\n"
+" -h, --help åìöÜíéóç áõôÞò ôçò âïÞèåéáò êáé Ýîïäïò\n"
+" --no-hash äõáäéêÜ áñ÷åßá äåí óõìðåñéëáìâÜíïíôáé óôï\n"
+" hash table\n"
+" -o, --output-file=ÁÑ×ÅÉÏ êáèïñéóìüò ôïõ ÁÑ×ÅÉÏ óáí áñ÷åßï åîüäïõ\n"
+" --statistics åìöÜíéóç óôáôéóôéêþí ãéá ôéò ìåôáöñÜóåéò\n"
+" --strict åíåñãïðïßçóç êáôÜóôáóçò áõóôçñïý Uniforum\n"
+" -v, --verbose åìöÜíéóç óöáëìÜôùí áñ÷åßïõ åéóüäïõ\n"
+" -V, --version åìöÜíéóç ðëçñïöïñéþí Ýêäïóçò êáé Ýîïäïò\n"
+"\n"
+"Äßíïíôáò ôçí ðáñÜìåôñï -v ðåñéóóüôåñåò áðü ìéá öïñÝò, áõîÜíåé ôï âáèìü\n"
+"ðåñéöñáóôéêüôçôáò ôùí ìçíõìÜôùí\n"
+"\n"
+"Áí ôï áñ÷åßï åéóüäïõ åßíáé ôï -, ãßíåôáé áíÜãíùóç ôçò êáíïíéêÞò åéóüäïõ.\n"
+"Áí ôï áñ÷åßï åîüäïõ åßíáé -, ôüôå ç Ýîïäïò ãñÜöåôáé óôçí êáíïíéêÞ Ýîïäï.\n"
+
+#
+# File: src/msgfmt.c, line: 409
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "êáôÜ ôç äçìéïõñãßá ôïõ hash table"
+
+#
+# File: src/msgfmt.c, line: 672
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr ""
+"%s: ðñïåéäïðïßçóç: ôï áñ÷åßï åéóüäïõ ðåñéÝ÷åé ðñïóåããéóôéêÝò ìåôáöñÜóåéò"
+
+#
+# File: src/msgfmt.c, line: 473
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "ôï üíïìá ãéá ôç ðåñéï÷Þ \"%s\" äåí åßíáé êáôÜëëçëï ãéá üíïìá áñ÷åßïõ"
+
+#
+# File: src/msgfmt.c, line: 478
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr ""
+"ôï üíïìá ãéá ôç ðåñéï÷Þ \"%s\" äåí åßíáé êáôÜëëçëï ãéá üíïìá áñ÷åßïõ· èá "
+"ãßíåé ÷ñÞóç ðñïèÝìáôïò"
+
+#
+# File: src/msgfmt.c, line: 491
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "ç ïäçãßá `domain %s' áãíïåßôáé"
+
+#
+# File: src/msgfmt.c, line: 519
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "ç êåíÞ åããñáöÞ `msgstr' áãíïåßôáé"
+
+#
+# File: src/msgfmt.c, line: 520
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "ç ðñïóåããéóôéêÞ åããñáöÞ `msgstr' áãíïåßôáé"
+
+#
+# File: src/msgfmt.c, line: 563
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "ôï ðåäßï `%s' Ý÷åé ðáñáëçöèåß áðü ôç êåöáëßäá"
+
+#
+# File: src/msgfmt.c, line: 566
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "ôï ðåäßá êåöáëßäáò `%s' èá Ýðñåðå íá îåêéíÜ óôçí áñ÷Þ ôçò ãñáììÞò"
+
+#
+# File: src/msgfmt.c, line: 576
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr "ìåñéêÜ ðåäßá ôçò êåöáëßäáò Ý÷ïõí áêüìá ôçí áñ÷éêÞ åî ïñéóìïý ôéìÞ"
+
+#
+# File: src/msgfmt.c, line: 587
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "ôï ðåäßï `%s' Ý÷åé áêüìá ôçí áñ÷éêÞ åî ïñéóìïý ôéìÞ"
+
+#
+# File: src/msgfmt.c, line: 672
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr ""
+"%s: ðñïåéäïðïßçóç: ôï áñ÷åßï åéóüäïõ ðåñéÝ÷åé ðñïóåããéóôéêÝò ìåôáöñÜóåéò"
+
+#
+# File: src/msgfmt.c, line: 874
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "Ïé åããñáöÝò `msgid' êáé `msgstr' äåí îåêéíïýí êáé ïé äýï ìå '\\n'"
+
+#
+# File: src/msgfmt.c, line: 882
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "Ïé åããñáöÝò `msgid' êáé `msgstr' äåí ôåëåéþíïõí êáé ïé äýï ìå '\\n'"
+
+#
+# File: src/msgfmt.c, line: 896
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr ""
+"ï áñéèìüò ôùí áíáöïñþí óå ìïñöïðïéÞóåéò ôùí `msgid' êáé `msgstr' äå óõìðßðôåé"
+
+#
+# File: src/msgfmt.c, line: 913
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "ïé ìïñöïðïéÞóåéò ãéá ôç ðáñÜìåôñï %u äåí åßíáé ßäéåò"
+
+#
+# File: src/msgmerge.c, line: 306
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"×ñÞóç: %s [ÅÐÉËÏÃÇ] def.po ref.po\n"
+"Ïé õðï÷ñåùôéêïß ðáñÜìåôñïé óôá ðåñéöñáóôéêÜ ïñßóìáôá åßíáé õðï÷ñåùôéêïß\n"
+"êáé ãéá ôá óýíôïìá ïñßóìáôá.\n"
+" -D, --directory=ÊÁÔÁËÏÃÏÓ ðñüóèåóå ôïí ÊÁÔÁËÏÃÏ óôç ëßóôá ãéá áíáæÞôçóç\n"
+" áñ÷åßùí åéóüäïõ.\n"
+" -e, --no-escape áðïöõãÞ ÷ñÞóçò êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï\n"
+" (åî ïñéóìïý)\n"
+" -E, --escape ÷ñÞóç êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï,\n"
+" ü÷é üìùò êáé åêôåôáìÝíïõò ÷áñáêôÞñåò.\n"
+" --force-po äçìéïõñãßá áñ÷åßïõ PO áêüìá êáé áí åßíáé Üäåéï\n"
+" -h, --help åìöÜíéóç áõôÞò ôçò âïÞèåéáò êáé Ýîïäïò\n"
+" -i, --indent ìïñöïðïéçìÝíç Ýîïäïò\n"
+" -o, --output-file=ÁÑ×ÅÉÏ ôï áñ÷åßï åîüäïõ èá åßíáé ôï ÁÑ×ÅÉÏ\n"
+" --no-location áðïöõãÞ åìöÜíéóçò ãñáììþí '#: filename:line'\n"
+" --add-location äéáôÞñçóç ãñáììþí '#: filename:line' (åî ïñéóìïý)\n"
+" --strict áõóôçñÞ ìïñöÞ åîüäïõ Uniforum\n"
+" -v, --verbose ðåñéöñáóôéêÞ åìöÜíéóç ðñïåéäïðïéÞóåùí\n"
+" -V, --version åìöÜíéóç ðëçñïöïñéþí Ýêäïóçò êáé Ýîïäïò\n"
+" -w, --width=ÁÑÉÈÌÏÓ ïñéóìüò ìåãÝèïõò ðëÜôïõò óåëßäáò åîüäïõ\n"
+
+#
+# File: src/msgmerge.c, line: 324
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"ÓõíÝíùóç äýï áñ÷åßùí .po ìïñöÞò Uniforum. Ôï áñ÷åßï def.po åßíáé ôï\n"
+"ðñïûðÜñ÷ïí áñ÷åßï PO ìå ôéò ðáëéÝò ìåôáöñÜóåéò ðïõ èá ìåôáöåñèïýí óôï\n"
+"íÝï áñ÷åßï, üóá öõóéêÜ äåí Ý÷ïõí áëëÜîåé· ôá ó÷üëéá èá äéáôçñçèïýí\n"
+"áëëÜ ôá åîáãþìåíá ó÷üëéá êáé ïé èÝóåéò áñ÷åßùí èá áöáéñåèïýí.\n"
+"Ôï áñ÷åßï ref.po åßíáé ôï ôåëåõôáßá äçìéïõñãçìÝíï áñ÷åßï PO \n"
+"(ãåíéêÜ êáôáóêåõÜæåôáé áðü ôï xgettext) êáé ï,ôé ìåôáöñÜóåéò Þ ó÷üëéá \n"
+"õðÜñ÷ïõí óôï áñ÷åßï èá áãíïçèïýí, ùóôüóï ó÷üëéá ðïõ îåêéíïýí ìå ôåëåßá \n"
+"êáé èÝóåéò áñ÷åßùí èá äéáôçñçèïýí. Åêåß ðïõ äåí åìöáíßæåôáé áðüëõôï\n"
+"ôáßñéáóìá, ãßíåôáé ÷ñÞóç åëáóôéêïý ôáéñéÜóìáôïò ãéá êáëýôåñá áðïôåëÝóìáôá.\n"
+"Ôá áðïôåëÝóìáôá ãñÜöïíôáé óôçí êáíïíéêÞ Ýîïäï åêôüò êáé áí ïñßæåôáé\n"
+"êÜðïéï áñ÷åßï åîüäïõ.\n"
+
+#
+# File: src/msgmerge.c, line: 772
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%sÁíáãíþóôçêáí %d ðáëáéÜ + %d áíáöïñÝò, óõã÷ùíåõìÝíá %d, ðñïóåããéóôéêÜ "
+"%d,Ý÷ïõí ðáñáëçöèåß %d, á÷ñçóéìïðïßçôá %d.\n"
+
+#
+# File: src/msgmerge.c, line: 778
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " Ýãéíå.\n"
+
+#
+# File: src/msgunfmt.c, line: 215
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"×ñÞóç: %s [ÅÐÉËÏÃÇ] def.po ref.po\n"
+"Ïé õðï÷ñåùôéêïß ðáñÜìåôñïé óôá ðåñéöñáóôéêÜ ïñßóìáôá åßíáé õðï÷ñåùôéêïß\n"
+"êáé ãéá ôá óýíôïìá ïñßóìáôá.\n"
+" -e, --no-escape áðïöõãÞ ÷ñÞóçò êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï\n"
+" (åî ïñéóìïý)\n"
+" -E, --escape ÷ñÞóç êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï,\n"
+" ü÷é üìùò êáé åêôåôáìÝíïõò ÷áñáêôÞñåò.\n"
+" --force-po äçìéïõñãßá áñ÷åßïõ PO áêüìá êáé áí åßíáé Üäåéï\n"
+" -h, --help åìöÜíéóç áõôÞò ôçò âïÞèåéáò êáé Ýîïäïò\n"
+" -i, --indent ìïñöïðïéçìÝíç Ýîïäïò\n"
+" -o, --output-file=ÁÑ×ÅÉÏ ôï áñ÷åßï åîüäïõ èá åßíáé ôï ÁÑ×ÅÉÏ\n"
+" --strict ìïñöÞ åîüäïõ ôï áõóôçñü Uniforum\n"
+" -V, --version åìöÜíéóç ðëçñïöïñéþí Ýêäïóçò êáé Ýîïäïò\n"
+" -w, --width=ÁÑÉÈÌÏÓ ïñéóìüò ìåãÝèïõò ðëÜôïõò óåëßäáò åîüäïõ\n"
+
+#
+# File: src/msgunfmt.c, line: 229
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"ÌåôáôñïðÞ äõáäéêþí áñ÷åßùí .mo óå Uniforum .po áñ÷åßá.\n"
+"Êáé ôá little-endian êáé ôá big-endian áñ÷åßá .mo ìðïñïýí\n"
+"íá ÷ñçóéìïðïéçèïýí. Áí ôï áñ÷åßï åéóüäïõ äßíåôáé Þ åßíáé -,\n"
+"ôüôå áíáãéãíþóêåôáé ç êáíïíéêÞ åßóïäïò. Åî ïñéóìïý, ç Ýîïäïò\n"
+"ãñÜöåôáé óôçí êáíïíéêÞ Ýîïäï.\n"
+
+#
+# File: src/msgunfmt.c, line: 266
+# File: src/msgunfmt.c, line: 330
+# File: src/po-lex.c, line: 185
+# File: src/xget-lex.c, line: 254
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "óöÜëìá óôçí áíÜãíùóç ôïõ \"%s\""
+
+#
+# File: src/msgunfmt.c, line: 267
+# File: src/msgunfmt.c, line: 331
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "ôï áñ÷åßï \"%s\" ìçäåíßóôçêå êáé èá ãñáöïýí äåäïìÝíá óå áõôü"
+
+#
+# File: src/msgunfmt.c, line: 298
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "ç ðñüóâáóç óôï áñ÷åßï \"%s\", èÝóç %ld, áðÝôõ÷å"
+
+#
+# File: src/msgunfmt.c, line: 373
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "ôï áñ÷åßï \"%s\" äåí åßíáé óôç ìïñöÞ GNU .mo"
+
+#
+# File: ../../src/po-gram.y, line: 83
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "ëåßðåé åíüôçôá `msgstr'"
+
+#
+# File: src/po-lex.c, line: 84
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "âñÝèçêáí %d óïâáñÜ óöÜëìáôá"
+
+#
+# File: src/po-lex.c, line: 129
+# File: src/po-lex.c, line: 168
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "ðÜñá ðïëëÜ óöÜëìáôá, åãêáôáëåßðù"
+
+#
+# File: src/po-lex.c, line: 241
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "Üãíùóôç åíôïëÞ \"%s\""
+
+#
+# File: src/po-lex.c, line: 332
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "ìç áðïäåêôÞ óåéñÜ ÷áñáêôÞñùí äéáöõãÞò"
+
+#
+# File: src/po-lex.c, line: 415
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "ôÝñìá-ãñáììÞò (eol) óôï áëöáñéèìçôéêü"
+
+#
+# File: src/po-lex.c, line: 420
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "ôÝëïò áñ÷åßïõ (EOF) óôï áëöáñéèìçôéêü"
+
+#
+# File: src/xget-lex.c, line: 150
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "êáíïíéêÞ åßóïäïò"
+
+#
+# File: src/xget-lex.c, line: 892
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr "%s:%d: ðñïåéäïðïßçóç: ìç ôåñìáôéóìÝíç óôáèåñÜ ÷áñáêôÞñùí"
+
+#
+# File: src/xget-lex.c, line: 914
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr "%s:%d: ðñïåéäïðïßçóç: ìç ôåñìáôéóìÝíï áëöáñéèìçôéêü"
+
+#
+# File: src/xgettext.c, line: 386
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+"ôï --join-existing äå ìðïñåß íá ÷ñçóéìïðïéçèåß üôáí ç Ýîïäïò ãñÜöåôáé óôçí "
+"êáíïíéêÞ Ýîïäï"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#
+# File: src/xgettext.c, line: 501
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr ""
+"ðñïåéäïðïßçóç: ôï áñ÷åßï `%s' ìå êáôÜëçîç `%s' åßíáé Üãíùóôï· èá äïêéìáóôåß C"
+
+#
+# File: src/xgettext.c, line: 537
+#: src/xgettext.c:544
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"×ñÞóç: %s [ÅÐÉËÏÃÇ] ÁÑ×ÅÉÏÅÉÓÏÄÏÕ ...\n"
+"ÅîáãùãÞ áëöáñéèìçôéêþí ðïõ ìðïñïýí íá ìåôáöñáóôïýí áðü äïóìÝíá áñ÷åßá åéóüäïõ.\n"
+"\n"
+"Ïé õðï÷ñåùôéêïß ðáñÜìåôñïé óôá ðåñéöñáóôéêÜ ïñßóìáôá åßíáé õðï÷ñåùôéêïß\n"
+"êáé ãéá ôá óýíôïìá ïñßóìáôá.\n"
+" -a, --extract-all åîáãùãÞ üëùí ôùí áëöáñéèìçôéêþí\n"
+" -c, --add-comments[=TAG] ôïðïèÝôçóç ôìÞìá ó÷ïëßùí ìå TAG (Þ áõôÜ ðïõ\n"
+" áêïëïõèïýí ãñáììÝò ìå åíôïëÝò) óôï áñ÷åßï åîüäïõ\n"
+" -C, --c++ óõíôïìïãñáößá ãéá --language=C++\n"
+" --debug ðåñéóóüôåñï ëåðôïìåñÞò åìöÜíéóç ìçíõìÜôùí\n"
+" -d, --default-domain=ÏÍÏÌÁ ÷ñÞóç ôïõ ÏÍÏÌÁ.po ãéá Ýîïäï (áíôß ôïõ messages.po)\n"
+" -D, --directory=ÊÁÔÁËÏÃÏÓ áëëáãÞ óôï ÊÁÔÁËÏÃÏÓ ðñéí ôçí Ýíáñîç ôçò åðåîåñãáóßáò\n"
+" -e, --no-escape áðïöõãÞ ÷ñÞóçò êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï\n"
+" (åî ïñéóìïý)\n"
+" -E, --escape ÷ñÞóç êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï, ü÷é üìùò\n"
+" êáé åêôåôáìÝíïõò ÷áñáêôÞñåò.\n"
+" -f, --files-from=ÁÑ×ÅÉÏ ëÞøç ëßóôáò áñ÷åßùí åéóüäïõ áðü ÁÑ×ÅÉÏ\n"
+" --force-po äçìéïõñãßá áñ÷åßïõ PO áêüìá êáé áí åßíáé Üäåéï\n"
+" --foreign-user ðáñÜëåéøç åìöÜíéóçò ðíåõìáôéêþí äéêáéùìÜôùí ôçò FSF\n"
+" óôçí Ýîïäï ãéá îÝíï ÷ñÞóôç\n"
+" -F, --sort-by-file ôáîéíüìçóç åîüäïõ âÜóç ôçò èÝóçò áñ÷åßïõ\n"
+
+#
+# File: src/xgettext.c, line: 557
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help åìöÜíéóç áõôÞò ôçò âïÞèåéáò êáé Ýîïäïò\n"
+" -i, --indent äçìéïõñãßá .po áñ÷åßïõ ìå ìïñöïðïéçìÝíç Ýîïäï\n"
+" -j, --join-existing ðñüóèåóç ìçíõìÜôùí ìå ôï õðÜñ÷ïí áñ÷åßï\n"
+" -k, --keyword[=ËÅÎÇ] åðéðëÝïí ëåêôéêü ãéá áíáæÞôçóç (÷ùñßò ËÅÎÇ óçìáßíåé\n"
+" áíáæÞôçóç ãéá åî ïñéóìïý ëåêôéêÜ).\n"
+" -l, --string-limit=ÁÑÉÈÌÏÓ ïñéóìüò ìåãÝèïõò áëöáñéèìçôéêïý óå ÁÑÉÈÌÏÓ áíôß ôïõ %u\n"
+" -m, --msgstr-prefix[=ÁËÖÁÑÉÈÌÇÔÉÊÏ] ÷ñÞóç ôïõ ÁËÖÁÑÉÈÌÇÔÉÊÏ Þ \"\" ãéá ðñüèåìá\n"
+" óå åããñáöÝò msgstr\n"
+" -M, --msgstr-suffix[=ÁËÖÁÑÉÈÌÇÔÉÊÏ] ÷ñÞóç ôïõ ÁËÖÁÑÉÈÌÇÔÉÊÏ Þ \"\" ãéá êáôÜëçîç\n"
+" óå åããñáöÝò msgstr\n"
+" --no-location íá ìçí ãñáöïýí ãñáììÝò '#: filename:line'\n"
+
+#
+# File: src/xgettext.c, line: 571
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location äçìéïõñãßá ãñáììþí '#: filename:line' (åî ïñéóìïý)\n"
+" --omit-header íá ìç ãñáöåß êåöáëßäá ìå åããñáöÞ `msgid \"\"'\n"
+" -o, --output=ÁÑ×ÅÉÏ åããñáöÞ åîüäïõ óôï åðéëåãìÝíï áñ÷åßï\n"
+" -p, --output-dir=ÊÁÔÁËÏÃÏÓ ôá áñ÷åßá åîüäïõ èá ôïðïèåôçèïýí\n"
+" óôï êáôÜëïãï ÊÁÔÁËÏÃÏÓ\n"
+" -s, --sort-output äçìéïõñãßá ôáîéíïìçìÝíçò åîüäïõ êáé\n"
+" áðáëïéöÞ åðáíáëÞøåùí\n"
+" --strict äçìéïõñãßá áñ÷åßï .po ðïõ óõìöùíïýí áðüëõôá\n"
+" ìå ôï ðñüôõðï Uniforum\n"
+" -T, --trigraphs áðïäï÷Þ ANSI C ôñéãñáììÜôùí óôçí åßóïäï\n"
+" -V, --version åìöÜíéóç ðëçñïöïñéþí Ýêäïóçò êáé Ýîïäïò\n"
+" -x, --exclude-file=ÁÑ×ÅÉÏ åããñáöÝò áðü ôï ÁÑ×ÅÉÏ äåí áöáéñïýíôáé\n"
+"\n"
+"Áí ôï ÁÑ×ÅÉÏÅÉÓÏÄÏÕ åßíáé -, ãßíåôáé áíÜãíùóç ôçò êáíïíéêÞò åéóüäïõ.\n"
+
+#
+# File: src/xgettext.c, line: 1344
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr "ç ãëþóóá `%s' åßíáé Üãíùóôç"
+
+#
+# File: src/msgfmt.c, line: 451
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "%s: ðñïåéäïðïßçóç: äå âñÝèçêå áñ÷Þ êåöáëßäáò"
+
+#
+#~ msgid "Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.\n"
+#~ msgstr "Óôåßëôå áíáöïñÝò óöáëìÜôùí óôï <bug-gnu-utils@gnu.ai.mit.edu>.\n"
+
+#
+#~ msgid "this is the location of the first definition"
+#~ msgstr "áõôÞ åßíáé ç èÝóç ôïõ ðñþôïõ ïñéóìïý"
+
+#
+#~ msgid "found %d errors"
+#~ msgstr "âñÝèçêáí %d óöÜëìáôá"
+
+#
+#~ msgid ""
+#~ "Usage: %s [OPTION] filename.mo filename.po\n"
+#~ "Mandatory arguments to long options are mandatory for short options too.\n"
+#~ " -e, --no-escape do not use C escapes in output (default)\n"
+#~ " -E, --escape use C escapes in output, no extended chars\n"
+#~ " -h, --help display this help and exit\n"
+#~ " -i, --indent write indented output style\n"
+#~ " -S, --strict write strict uniforum style\n"
+#~ " -V, --version output version information and exit\n"
+#~ msgstr ""
+#~ "×ñÞóç: %s [ÅÐÉËÏÃÇ] filename.mo filename.po\n"
+#~ "Ïé õðï÷ñåùôéêïß ðáñÜìåôñïé óôá ðåñéöñáóôéêÜ ïñßóìáôá åßíáé õðï÷ñåùôéêïß êáé "
+#~ "ãéá ôá óýíôïìá ïñßóìáôá.\n"
+#~ " -e, --no-escape áðïöõãÞ ÷ñÞóçò êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï "
+#~ "(åî ïñéóìïý)\n"
+#~ " -E, --escape ÷ñÞóç êùäéêþí äéáöõãÞò áëÜ C óôçí Ýîïäï, ü÷é üìùò "
+#~ "êáé åêôåôáìÝíïõò ÷áñáêôÞñåò.\n"
+#~ " -h, --help åìöÜíéóç áõôÞò ôçò âïÞèåéáò êáé Ýîïäïò\n"
+#~ " -i, --indent ìïñöïðïéçìÝíç Ýîïäïò\n"
+#~ " -S, --strict ìïñöÞ åîüäïõ ôï áõóôçñü Uniforum\n"
+#~ " -V, --version åìöÜíéóç ðëçñïöïñéþí Ýêäïóçò êáé Ýîïäïò\n"
+
+#
+#~ msgid "cannot change to directory \"%s\""
+#~ msgstr "áäõíáìßá áëëáãÞò óôï êáôÜëïãï \"%s\""
+
+#
+#~ msgid "cannot change back to directory \"%s\""
+#~ msgstr "áäõíáìßá åðéóôñïöÞò óôï êáôÜëïãï \"%s\""
diff --git a/po/es.gmo b/po/es.gmo
new file mode 100644
index 0000000..f7d592f
--- /dev/null
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..aed0e81
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,1154 @@
+# Mensajes en español para GNU gettext.
+# Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+# Max de Mendizábal <max@tirania.nuclecu.unam.mx>, 1996, 1997, 1998.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.34\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1998-04-29 12:04-0500\n"
+"Last-Translator: Max de Mendizábal <max@tirania.nuclecu.unam.mx>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+# Nota: El error es del sistema, pero no se sabe cuál es el error,
+# por eso es (además) desconocido.
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "Error del sistema desconocido"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: la opción `%s' es ambigua\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: la opción `--%s' no admite ningún argumento\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: la opción `%c%s' no admite ningún argumento\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: la opción `%s' requiere un argumento\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opción no reconocida `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opción no reconocida `%c%s'\n"
+
+# acepto la sugerencia de em en cuanto a que inválida parece cárcel
+# o inútil pero mejor puse inválida
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: opción inválida -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opción inválida -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: la opción requiere un argumento -- %c\n"
+
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: la opción `-W %s' es ambigua\n"
+
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: la opción `-W %s' no admite ningún argumento\n"
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Memoria agotada"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"Esto es software libre; vea el código fuente para las condiciones de copia.\n"
+"No hay NINGUNA garantía; ni siquiera de COMERCIABILIDAD o IDONEIDAD PARA UN\n"
+"FIN DETERMINADO.\n"
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Escrito por %s.\n"
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "faltan argumentos"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "demasiados argumentos"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Pruebe `%s --help' para más información.\n"
+
+# ¿ Y qué te parece informa de la versión y finaliza ?
+# así es cómo lo estoy haciendo en todas las textutils. em
+# No he movido nada porque dudo un poco. Creo que en un
+# msdos de IBM en español decía muestra la versión y por
+# eso lo traduje así. Si encuentro la referencia te informo
+# pero por ahora no me convence eso de `informa de la versión'
+# suena demasiado pomposo. mm
+#
+# Ok, como te parezca, es más que nada por no repetir 'muestra' em+
+#
+# Prefiero que se quede como está, pues aunque se repite muestra,
+# es en otra opción en donde aparece. mm
+#
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Modo de empleo: %s [OPCIÓN] [[[DOMINIOTEXTO] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=DOMINIOTEXTO obtiene los mensajes traducidos de DOMINIOTEXTO\n"
+" -e habilita la expansión de algunas secuencias\n"
+" de escape\n"
+" -E (existe por compatibilidad, no tiene efecto)\n"
+" -h, --help muestra este texto de ayuda y finaliza\n"
+" -n suprime el carácter de nueva línea\n"
+" -V, --version informa de la versión y finaliza\n"
+" [DOMINIOTEXTO] MSGID obtiene el mensaje traducido correspondiente\n"
+" al MSGID del DOMINIOTEXTO\n"
+
+# Nota: TEXTDOMAIN y TEXTDOMAINDIR son variables de entorno, por lo tanto
+# no se pueden traducir (cuando se refieren a las variables, claro está).
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Si no se escribe el parámetro DOMINIOTEXTO, el dominio se determina por\n"
+"la variable de entorno TEXTDOMAIN. Si el catálogo de mensajes no está en\n"
+"el directorio por defecto, con la variable de entorno TEXTDOMAINDIR se\n"
+"puede especificar otro lugar.\n"
+"Cuando se utiliza con la opción -s, el programa se comporta como la\n"
+"instrucción `echo', pero no se reduce a hacer simplemente una copia en\n"
+"la salida estándar (stdout) sino que además traduce los mensajes que\n"
+"encuentre dentro del catálogo seleccionado.\n"
+"Directorio de búsqueda estándar: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr "Comunicar `bugs' a <bug-gnu-utils@gnu.org>.\n"
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"Los mensajes internacionalizados no deben contener la secuencia de escape "
+"`\\%c'"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "no se puede crear el fichero de salida \"%s\""
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "salida estándar"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "hubo un error al escribir el fichero \"%s\""
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "no se especificaron ficheros de entrada"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "se requieren exactamente 2 ficheros de entrada"
+
+# Sugerencia: verificar -> comprobar
+# Sugerencia: revisar -> comprobar
+#
+# Si no te gusta repetir "comprobar", pon al menos el segundo y deja el
+# primer "verificar". sv
+# ok. aceptada.
+#
+# Max, yo decía al revés, el primero, verificar, el segundo comprobar. sv
+# Pero bueno, no voy a discutir por algo tan pequeño. sv
+# ok. mm
+#
+# sugerencia: concordancia -> coincidencia. sv
+# mmh. Lo tomo pero... concuerdan no es precisamente lo mismo que
+# coinciden. Creo que el programa quiere decir concordancia no
+# coincidencia. mm
+# A ver si te convenzo: concordancia se aplica a cosas distintas que deben
+# relacionarse de acuerdo con ciertas reglas, por ejemplo, el artículo y
+# el nombre deben concordar en género y número.
+# Coincidencia se aplica a cosas de la misma especie que pueden ser iguales
+# o no ser iguales.
+# Todos los msgid son del mismo tipo. No los hay de tipo "nombre" o de tipo
+# "adjetivo", cuando msgmerge toma un fichero.pot y un fichero.viejo
+# compara los mensajes de uno y otro para ver si coinciden, es decir, si son
+# iguales. sv
+#
+# (uf, menuda parrafada). sv
+# ¡Eres duro de pelar! tienes razón. mm
+#
+# Otra vez lo mismo 'informa de la versión y ... " em
+# Y otra cosa ... si llamas una vez ficheros .po , sigue haciéndolo así
+# siempre. y no una vez .po y otra PO . Ficheros PO me parece tan óptimo
+# como ficheros .po . También he corregido un fallo de tecleo en la
+# última línea ( .. el la precisión de diagnóstico ... ) . em
+# tienes razón. Buscaré uniformizar los ficheros a .po (es más discreto)
+# No. Ya revisé cuál fue la razón de traducir así: el original
+# Esto es, respeté la norma seguida del original en inglés. De todas
+# formas no me parece insensato modificar este extraño comportamiento
+# en el momento de traducir. ¿Qué opinas? mm
+#
+# La terminología en cuanto a los ficheros .po ha cambiado mucho. Al principio
+# eran ficheros .pot , así que imagínate. Ahora definitivamente son
+# ficheros .po , y así se nombran en los documentos. Acabo de ver la faq de
+# fr@es.li y así es como lo llaman tambien;
+# L'ensemble des fichiers « .po » déjà ... em+
+# ok. Modifico todos los PO por .po que es mas ligero y mejor. mm+
+#
+# Dos comentarios: Enrique debe andar algo despistado:
+# Un fichero .pot es una "plantilla" (de "template") de un fichero .po
+# Así que no es que cambie la nomenclatura, es que son dos cosas
+# distintas. De hecho, los ficheros .po vacíos con los que comenzamos
+# una traducción son casi idénticos a los ficheros .pot originales. sv
+#
+# Y otra cosa: Lo del .po .PO. Habrá que respetar el original inglés, ¿no?
+#
+# Otra cosa: Se puede decir "también son" o "son también"
+# (lo tengo de una forma en recode y de otra en wdiff). Elige...
+# (a ver si me aclaro). O a lo mejor en unos casos es mejor de una forma
+# y en otros de otra (la frase no era exactamente igual).
+# 11061996mm: En particular en gettext el letrero es estándar, por lo que
+# prefiero "también son" que, creo suena mejor. Homogeinizo todo.
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Modo de empleo: %s [OPCIÓN] def.po ref.po\n"
+"Los argumentos obligatorios para las opciones largas también son\n"
+"obligatorios para las opciones cortas.\n"
+" -D, --directory=DIRECTORIO añade el DIRECTORIO a la lista de\n"
+" búsqueda de ficheros de entrada\n"
+" -h, --help muestra esta ayuda y finaliza\n"
+" -V, --version informa de la versión y finaliza\n"
+"\n"
+"Compara dos ficheros .po de estilo Uniforum para comprobar que ambos\n"
+"contienen el mismo conjunto de cadenas de mensajes (msgid). El fichero\n"
+"def.po es un fichero existente de tipo .po con las traducciones\n"
+"antiguas. El fichero ref.po es el último fichero .po creado\n"
+"(generalmente por xgettext). Esto es útil para verificar que se han\n"
+"traducido todos y cada uno de los mensajes del programa. Cuando no\n"
+"se encuentre un resultado exacto, se utilizará coincidencia difusa, de\n"
+"tal forma que la precisión del diagnóstico sea mejor.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "este mensaje se usa pero no está definido..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...pero esta definición es parecida"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "este mensaje se usa pero no está definido en %s"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "atención: este mensaje no se utiliza"
+
+# Nota: es la definición la que está duplicada.
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "definición del mensaje duplicada"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...aquí está la primera definición"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "este mensaje no tiene definición en el dominio \"%s\""
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "mientras se preparaba la salida"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s y %s son mutuamente excluyentes"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr "se deben especificar por lo menos dos ficheros"
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr "se especificó un criterio de selección imposible (%d < n < %d)"
+
+# Otra cosa: La línea del debug (la nueva) creo que es demasiado larga.
+# 11061996mm: Es cierto pero en este caso prefiero no ser breve pues la
+# opción de debug hace algo más que simplemente dar más información y es
+# necesario aclarar el punto.
+# 27061996sv: Me refería a lo de las 80 columnas...
+#: src/msgcomm.c:400
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Modo de empleo: %s [OPCIÓN] FICHERO ...\n"
+"Los argumentos obligatorios para las opciones largas también son\n"
+"obligatorios para las opciones cortas.\n"
+" -d, --default-domain=NOMBRE utiliza NOMBRE.po para la salida (en vez\n"
+" de messages.po)\n"
+" -D, --directory=DIRECTORIO añade el DIRECTORIO a la lista de\n"
+" búsqueda de ficheros de entrada\n"
+" -e, --no-escape no utiliza secuencias de escape tipo C en\n"
+" la salida (opción por defecto)\n"
+" -E, --escape utiliza secuencias de escape tipo C en la\n"
+" salida, sin caracteres extendidos\n"
+" -f, --files-from=FICHERO obtiene la lista de los ficheros de entrada\n"
+" de FICHERO\n"
+" --force-po escribe un fichero .po incluso si está vacío\n"
+" -F, --sort-by-file ordena la salida por ubicación del fichero\n"
+" -h, --help muestra esta ayuda y finaliza\n"
+
+#
+# 19071996cb: --omit-header no escribe la cabecera para la entrada
+# 20071996sv: Creo que lo que tiene Max ahora mismo es mejor. "with" es "con"
+# 29071996mm: Creo que si. Mejor ahí lo dejamos.
+# He formateado bastantes cosas aquí. Tendré que decirlo en la lista. A veces
+# es conveniente correr todo un poco a la izda para que ocupe menos líneas. No
+# hay cosa más incómoda que hacer un `algo --help' y que precisamente lo que
+# nos interese se haya salido de la/el terminal em+
+# Ok. mm+
+#: src/msgcomm.c:412
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -i, --indent escribe el fichero .po utilizando el\n"
+" estilo de sangrías\n"
+" --no-location no escribe líneas `#: fichero:línea'\n"
+" -n, --add-location genera líneas `#: fichero:línea' (por "
+"defecto)\n"
+" --omit-header no escribe la cabecera con la entrada `msgid "
+"\"\"'\n"
+" -o, --output=FICHERO escribe la salida al FICHERO especificado\n"
+" -p, --output-dir=DIR los ficheros de salida se pondrán en el\n"
+" directorio DIR\n"
+" -s, --sort-output genera la salida ordenada y elimina los\n"
+" duplicados\n"
+" --strict escribe un fichero .po tipo Uniforum "
+"estricto\n"
+" -T, --trigraphs entiende los trigrafos ANSI C en la entrada\n"
+" -u, --unique abreviatura de --less-than=2, solicita\n"
+" que sólo los mensajes únicos sean mostrados\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+" -V, --version informa de la versión y finaliza\n"
+" -w, --width=NÚMERO ajusta la anchura de la página de salida\n"
+" -<, --less-than=NÚMERO muestra los mensajes con menos definiciones\n"
+" que NÚMERO, por defecto es infinito\n"
+" ->, --more-than=NÚMERO muestra los mensajes con más definiciones\n"
+" que NÚMERO, por defecto es 1\n"
+"\n"
+"Busca los mensajes que son comunes a dos o más de los ficheros PO "
+"especificados.\n"
+"Si se utiliza la opción --more-than, se pueden solicitar mayor número de\n"
+"elementos en común antes de que los mensajes sean mostrados.\n"
+"De forma similar, la opción --less-than puede ser utilizada\n"
+"para especificar el mínimo de mensajes en común que serán mostrados (i.e.\n"
+"--less-than=2 sólo mostrá los mensajes únicos). Las traducciones, \n"
+"los comentarios y los comentarios extraídos serán conservados, pero sólo\n"
+"los que provengan del primer fichero PO que los defina. Las posiciones "
+"dentro\n"
+"del fichero de todos los ficheros PO se conservarán.\n"
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "error al abrir el fichero \"%s\" para lectura"
+
+# sospecho que lo que en realidad ocurre es que "no debe". sv
+# Miraremos el código fuente. sv
+#
+# ok. aquí está el fuente. Tengo la impresión de que estoy en
+# lo correcto: es decir que es necesario que tenga al menos
+# una instrucción de dominio.
+# por cierto traduje directive por instrucción aunque con las
+# series de TV gringas acostumbran mal traducir a "directivas". mm.
+#
+# exclude_directive_domain (pop, name)
+# po_ty *pop;
+# char *name;
+# {
+# po_gram_error (_("this file may not contain domain directives"));
+# }
+#
+# Me lo pones más claro: el mensaje está dentro de una función llamada
+# "exclude_directive_domain". Probablemente porque *no* debe haber
+# "domain directives", no porque posiblemente no las haya.
+#
+# Por eso creo que en este caso, como en algunos otros, "may not"
+# significa "should not".
+#
+# Sigo pensando igual que antes, aunque no estoy seguro del todo. sv
+# ¿Qué opinas Enrique? mm
+# Pues después de ver los fuentes no consigo estar seguro. Pero
+# definitivamente no optaría por 'no debería' , sino por 'no puede' , por
+# el nombre de la función está claro que es lo que se pretende. Afortunada-
+# mente el verbo poder en Castellano es mucho más flexible que en otros
+# idiomas. De todas maneras siempre se puede mirar otras traducciones. em
+# ok. Acepto en 'no puede' a reserva de encontrar nuevos argumentos. mm
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "este fichero no puede contener instrucciones de dominio"
+
+# acepto sugerencia de em pero agrego un "el". mm
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "no se especificó el fichero de entrada"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "error al abrir el fichero \"%s\" para escritura"
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d mensajes traducidos"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d traducciones difusas"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d mensajes sin traducir"
+
+# "enlista" queda "raro", ¿qué te parece "muestra" o algo así? sv
+# ok, puse muestra pero, ¿qué tal `enumera'? mm
+# 12061996sv: Si el programa no les va poniendo números a cada una
+# que muestra, no.
+#
+# Lo mismo con 'informa de la versión...' em
+#
+# 12061996sv: He puesto `hash' en lugar de hash, ya que no
+# es una palabra española.
+#
+# 20071996sv: "language dependent check" sería "comprobación dependiente
+# del idioma" ¿no?
+# Propongo algo como "realiza comprobaciones dependientes del idioma
+# a las cadenas". sv
+#
+# 29071996mm: A ver si les gusta esto "comprueba cadenas de texto con respecto al idioma"
+# 30071996sv: ¿Y añadiendo "las" cadenas? sv
+# 30071996mm: Ok. Me gusta más.
+# 19071996cb:
+# " (valor predeterminado: %d)\n", ¿o en todos los
+# otros lugares ya se ha traducido como por defecto? cb
+#
+# 20071996sv: Depende del caso. En este caso puede valer lo que dices.
+# 29071996mm: Ok. Lo cambio a reserva de que a alguien más le guste.
+#
+# 19071996cb:
+# " -o, --output-file=FICHERO el nombre del fichero de salida será FICHERO\n"
+# 29071996mm: "... indica que el nombre del fichero de salida será FICHERO\n"
+# espero que mejore así.
+# 30071996sv: Mejora.
+# Sugerencia adicional (un poco más corto):
+# "Establece que FICHERO sea el nombre del fichero de salida". sv
+# 30071996mm: No me gusta como suena: "fichero sea el nombre del fichero".
+#
+# Sugerencia: -f -> "utiliza" en lugar de "usa". sv
+# Ok. Preferible.
+#
+# OJO: Si se pone un argumento superior a uno en la opción -v
+# No es así, es "si se utiliza la opción -v más de una vez". sv+
+#: src/msgfmt.c:366
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Modo de empleo: %s [OPCIÓN] fichero.po ...\n"
+"Genera un catálogo de mensajes en formato binario a partir de la\n"
+"descripción de la traducción textual.\n"
+"\n"
+"Los argumentos obligatorios para las opciones largas también son\n"
+"obligatorios para las opciones cortas.\n"
+" -a, --alignment=NÚMERO alinea las cadenas a un NÚMERO de bytes\n"
+" (valor predeterminado: %d)\n"
+" -c, --check comprueba las cadenas de texto con respecto\n"
+" al idioma\n"
+" -D, --directory=DIRECTORIO añade el DIRECTORIO a la lista de\n"
+" búsqueda de ficheros de entrada\n"
+" -f, --use-fuzzy utiliza líneas difusas en la salida\n"
+" -h, --help muestra esta ayuda y finaliza\n"
+" --no-hash el fichero binario no incluirá la tabla de `hash'\n"
+" -o, --output-file=FICHERO indica que el nombre del fichero de salida\n"
+" será FICHERO\n"
+" --statistics muestra estadísticas sobre las traducciones\n"
+" --strict habilita el modo estricto de Uniforum\n"
+" -v, --verbose muestra las anomalías del fichero de entrada\n"
+" -V, --version informa de la versión del programa y finaliza\n"
+"\n"
+"Si se pone un argumento superior a uno en la opción -v, se incrementa el nivel de detalle\n"
+"\n"
+"Si el fichero de entrada es -, se lee de la entrada estándar. Si el fichero\n"
+"de salida es -, el resultado se escribe en la salida estándar.\n"
+"\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "mientras se creaba la tabla de `hash'"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "%s: atención: el fichero fuente contiene una traducción difusa"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "el nombre de dominio \"%s\" no es válido como nombre de fichero"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr ""
+"el nombre del dominio \"%s\" no es válido como nombre de fichero:\n"
+"se utilizará un prefijo"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "la instrucción `domain %s' no tiene efecto"
+
+# Nunca me gustó ignorar para "to ignore".
+# Ignorar es no saber (not to know). "to ignore" es "no hacer caso".
+# Sugerencia: Descartar. sv
+# Excelente palabreja. Me gusta mucho. mm
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "se descarta la línea vacía `msgstr'"
+
+# Lo mismo. sv
+# Ok. mm
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "se descarta la línea difusa `msgstr'"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "no existe el campo `%s' en la cabecera"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "el campo `%s' debe comenzar al principio de la línea"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr "algunos campos de cabecera aún tienen el valor inicial"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "el campo `%s' aún tiene el valor inicial"
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "%s: atención: el fichero fuente contiene una traducción difusa"
+
+# ¿qué les parece: "a `msgid' o `msgstr' les falta el `\\n' final"? cb
+# Bien. Mejora. mm
+#
+#
+# Bien, antes decía "las líneas `msgid' y `msgstr' no comienzan con `\\n'"
+# No sé qué es mejor pero no me acaba de gustar: La idea es que *no ambas*
+# comienzan por \\n, no que tengan que hacerlo las dos.
+# Si una lo hace y la otra no, puede ser que falte en una o que sobre en la
+# otra. Yo podnría aquí algo más parecido a lo de antes, pero añadiendo
+# "ambas", o algo así.
+# por ejemplo: "las líneas msgid y msgstr no comienzan ambas con \\n". sv
+# Que te parece a alguna de las líneas ... mm
+#
+# Sigue pareciendo que deben tenerlo las dos (y no es esa la idea).
+# Si no se te ocurre nada mejor, sugerencia:
+# "Una de las líneas msgid y msgstr comienza con `\\n' y la otra no" sv+
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "a alguna de las líneas `msgid' y `msgstr' les falta el `\\n' inicial"
+
+# Lo mismo, no es que a una de las dos le falte, sino que una lo tiene
+# y la otra no, así de sencillo. sv+
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "a alguna de las líneas `msgid' y `msgstr' les falta el `\\n' final"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr ""
+"el número de especificaciones de formato en `msgid' y 'msgstr' no coincide"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "las especificaciones de formato para el argumento %u no son las mismas"
+
+# Lo mismo en ' informa de la versión...' em
+# Obligatorios.. obligatorios , queda un poco feo. Si lo que se pretende
+# es ser fiel al original, pon 'son tambien obligatorios para...' em+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Modo de empleo: %s [OPCIÓN] def.po ref.po\n"
+"Los argumentos obligatorios para las opciones largas también son\n"
+"obligatorios para las opciones cortas.\n"
+"\n"
+" -D, --directory=DIRECTORIO añade el DIRECTORIO a la lista de\n"
+" búsqueda de ficheros de entrada\n"
+" -e, --no-escape no utiliza escapes C en la salida (por defecto)\n"
+" -E, --escape utiliza escape C en la salida, sin caracteres\n"
+" extendidos\n"
+" --force-po escribe un fichero .po incluso si está vacío\n"
+" -h, --help muestra esta ayuda y finaliza\n"
+" -i, --indent estilo de salida con sangrías\n"
+" -o, --output-file=FICHERO el resultado se escribe en FICHERO\n"
+" --no-location no escribe líneas '#: fichero:línea'\n"
+" --add-location escribe líneas '#: fichero:línea' (por defecto)\n"
+" --strict estilo de salida Uniforum estricto\n"
+" -v, --verbose incrementa el nivel de mensajes\n"
+" -V, --version informa de la versión y finaliza\n"
+" -w, --width=NÚMERO ajusta la anchura de la página de salida\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Mezcla dos ficheros .po de estilo Uniforum en uno solo. El fichero def.po\n"
+"es un fichero existente de tipo .po con las traducciones anteriores que se\n"
+"conservarán siempre y cuando coincidan; los comentarios se conservarán,\n"
+"pero los comentarios extraídos y las posiciones del fichero no lo serán.\n"
+"El fichero ref.po es el último fichero .po creado (generalmente con xgettext),\n"
+"cualquier traducción o comentario se eliminará, sin embargo los comentarios\n"
+"puntuales y las posiciones dentro del fichero se conservarán. En donde no\n"
+"haya una coincidencia exacta, se utilizará el método de comparación difusa\n"
+"para obtener mejores resultados. Los resultados se escribirán en la salida\n"
+"estándar a menos que se especifique un fichero de salida.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%sleídos %d mensajes antiguos + %d mensajes de referencia\n"
+"incorporados %d, convertidos en difusos %d, faltan %d, obsoletos %d.\n"
+
+# Porque no mejor poner simplemente 'fin'? mm++
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " terminado.\n"
+
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Modo de empleo: %s [OPCIÓN] [FICHERO]...\n"
+"Los argumentos obligatorios para las opciones largas también son\n"
+"obligatorios para las opciones cortas.\n"
+" -e, --no-escape no utiliza las secuencias de escape tipo C\n"
+" en la salida (por defecto)\n"
+" -E, --escape utiliza las secuencias de escape tipo C en\n"
+" la salida, sin caracteres extendidos\n"
+" --force-po escribe un fichero .po incluso si está vacío\n"
+" -h, --help muestra esta ayuda y finaliza\n"
+" -o, --output-file=FICHERO escribe la salida en FICHERO en vez de\n"
+" utilizar la salida estándar\n"
+" --strict escribe en estilo Uniforum estricto\n"
+" -V, --version informa de la versión y finaliza\n"
+" -w, --width=NÚMERO ajusta la anchura de la página de salida\n"
+
+# 12061996sv: Aquí he cambiado lo siguiente:
+# la salida se escribe en -> el *resultado* se escribe en ...
+# 12061996sv: Por otro lado "se manipulan" suena muy raro.
+# ¿qué te parecería "se manejan"? O si no, ¿se podría poner algo
+# completamente distinto?
+# 19071996mm: Creo que tienes razón. ¿Que te parece "se tratan"?
+#
+# 19071996cb: Pueden procesarse ficheros .mo tanto little-endian como big-endian.
+# la idea es que ambas clases son soportadas. cb
+# 29071996mm: Puse "Pueden procesarse ficheros .mo little-endian y big-endian.
+# les agrada mas así?
+# 30071996sv: Mejor que antes, sí. Pero la palabra "tantos" que César sugiere
+# creo que recoge el sentido de "both" del original. ¿qué te parece? sv
+#
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Convierte ficheros binarios .mo en ficheros .po estilo Uniforum.\n"
+"Pueden procesarse ficheros .mo little-endian y big-endian.\n"
+"Si no se da ningún fichero de entrada o es -, se lee de la entrada estándar.\n"
+"Por defecto el resultado se escribe en la salida estándar.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "error al leer \"%s\""
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "el fichero \"%s\" está truncado"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "fallo en la lectura \"%s\" en la posición (offset) %ld"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "el fichero \"%s\" no está en el formato .mo de GNU"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "no hay sección `msgstr'"
+
+# Jeje. Bueno , esto me recuerda a una canción de Burning, digo lo
+# de fatal. Fatal en Castellano es muy malo, o peligrosísimo ... creo que
+# habrá que dejarlo así, es más convincente. Perdona por estas 3 lineas em
+#
+# ¿Burning? Mi incultura es grave ¿quiénes son esos? mm
+#
+# Son los que cantan lo de 'qué hace una chica como tú en un sitio como este'
+# en una parte de la canción repiten: 'mujer fatal ... ' :) em+
+#
+# ¡Ah! Dirán que soy pocho pero oigo muy poca música en castellano, a lo
+# más que llego es a Sabina y a Mecano y la Orquesta Mondragón cuando
+# existía. Volviendo a la discusión, prefiero lo de fatal: tiene mucho
+# peso. Aunque ... ¿qué tal 'errores imperdonables'? mm+
+#
+# Tal y como yo lo veo, "Error fatal" es el que obliga al programa a detenerse.
+# En inglés se utiliza esta palabra con ese significado.
+# A menos que veamos un libro en español que utilice una palabra distinta
+# para referirse a lo mismo, sugiero dejarlo como está. sv
+#
+# 07061996mm: Mujer fatal es menos que mortal, menos que peligroso e incita a la
+# aventura. Quizá no sea tan malo como dice Enrique, a menos que...
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "se encontraron %d errores fatales"
+
+# Abortando queda un poco feo. ¿qué se podría poner en su lugar?
+# Aterrizaje forzoso! el programa no puede continuar. Que te parece? mm.
+#
+# un poco exagerado... sv. A ver si a Enrique se le ocurre algo, y si no
+# lo dejaremos en "abortado" sv
+#
+# ¿qué les parece `por exceso de errores, finaliza el programa'? mm
+#
+# a mí abortando no me parece mal. Quizá 'programa interrumpido' em
+#
+# ¿Qué tal `por exceso de errores el programa no puede continuar'? mm
+#
+# Perfecto em+
+#
+# ok. corregido. mm+
+#
+# ¡Vaya!, pues a mí no me gusta nada, pero nada. Me explico:
+# No es fiel: El programa sí puede continuar, pero *no quiere*, que es
+# distinto. Seguro que hay un parámetro de compilación que especifica
+# el número de errores que deben aparecer para que el programa dé el
+# mensaje en cuestión. Propongo: "demasiados errores: programa interrumpido"
+# o algo así. sv
+#
+# 07061996mm: Propongo "demasiados errores, no tiene caso continuar"
+#
+# 08061996sv: Uf, eso en España suena rarísimo. ¿Podrías proponer otra cosa?
+#
+# 11061996mm: Ok. Hasta no pensar un poco más, adopto como buena tu propuesta
+#
+# 19071996cb: "demasiados errores, abandono la ejecución" cb
+# 20071996sv: Eso no seguiría la regla implícita de que el programa no debe
+# hablar en primera persona sino en estilo impersonal.
+# (Esta regla estará en el manual de Enrique, con toda seguridad).
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "demasiados errores, programa interrumpido"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "palabra clave \"%s\" desconocida"
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "secuencia de control ilegal"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "fin de línea dentro de una cadena"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "fin de fichero dentro de una cadena"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "entrada estándar"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr "%s:%d: atención: constante de tipo carácter no finalizada"
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr "%s:%d: atención: literal de cadena no finalizada"
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+"no se puede utilizar --join-existing cuando el resultado se escribe en la\n"
+"salida estándar (stdout)"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr ""
+"atención: el fichero `%s' con extensión `%s'\n"
+"es desconocido; se intentará tipo C"
+
+# Otra cosa: La línea del debug (la nueva) creo que es demasiado larga.
+# 11061996mm: Es cierto pero en este caso prefiero no ser breve pues la
+# opción de debug hace algo más que simplemente dar más información y es
+# necesario aclarar el punto.
+# 27061996sv: Me refería a lo de las 80 columnas...
+#: src/xgettext.c:544
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Modo de empleo: %s [OPCIÓN] FICHERO ...\n"
+"Extrae las cadenas traducibles a partir de los ficheros dados.\n"
+"\n"
+"Los argumentos obligatorios para las opciones largas también son\n"
+"obligatorios para las opciones cortas.\n"
+" -a, --extract-all extrae todas las cadenas\n"
+" -c, --add-comments[=ETIQUETA] pone un bloque de comentarios con\n"
+" ETIQUETA (o aquellos que preceden\n"
+" líneas de palabras clave) en el fichero\n"
+" de salida\n"
+" -C, --c++ abreviatura de --language=C++\n"
+" --debug el resultado de la etapa de reconocimiento\n"
+" de las cadenas de formato se escribe en forma\n"
+" detallada\n"
+" -d, --default-domain=NOMBRE utiliza NOMBRE.po para la salida (en vez\n"
+" de messages.po)\n"
+" -D, --directory=DIRECTORIO añade el DIRECTORIO a la lista de\n"
+" búsqueda de ficheros de entrada\n"
+" -e, --no-escape no utiliza secuencias de escape tipo C en\n"
+" la salida (opción por defecto)\n"
+" -E, --escape utiliza secuencias de escape tipo C en la\n"
+" salida, sin caracteres extendidos\n"
+" -f, --files-from=FICHERO obtiene la lista de los ficheros de entrada\n"
+" de FICHERO\n"
+" --force-po escribe un fichero .po incluso si está vacío\n"
+" --foreign-user no muestra el copyright de FSF para usuarios\n"
+" no ingleses\n"
+" -F, --sort-by-file ordena la salida por ubicación del fichero\n"
+
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help muestra esta ayuda y finaliza\n"
+" -i, --indent escribe el fichero .po utilizando el\n"
+" estilo de sangrías\n"
+" -j, --join-existing une los mensajes con el fichero existente\n"
+" -k, --keyword[=PALABRA] busca palabras claves adicionales (sin\n"
+" PALABRA significa que no utilice las palabras\n"
+" clave por defecto)\n"
+" -l, --string-limit=NÚMERO pone como límite de la longitud de la cadena\n"
+" a NÚMERO en vez de %u\n"
+" -L, --language=NOMBRE reconoce el lenguaje especificado (C, C++, PO),\n"
+" de otra forma, se supone por medio de la\n"
+" extensión del fichero\n"
+" -m, --msgstr-prefix[=CADENA] usa CADENA o \"\" como prefijo para las\n"
+" entradas msgstr\n"
+" -M, --msgstr-suffix[=CADENA] usa CADENA o \"\" como sufijo para las\n"
+" entradas msgstr\n"
+" --no-location no escribe líneas `#: fichero:línea'\n"
+
+#
+# 19071996cb: --omit-header no escribe la cabecera para la entrada
+# 20071996sv: Creo que lo que tiene Max ahora mismo es mejor. "with" es "con"
+# 29071996mm: Creo que si. Mejor ahí lo dejamos.
+# He formateado bastantes cosas aquí. Tendré que decirlo en la lista. A veces
+# es conveniente correr todo un poco a la izda para que ocupe menos líneas. No
+# hay cosa más incómoda que hacer un `algo --help' y que precisamente lo que
+# nos interese se haya salido de la/el terminal em+
+# Ok. mm+
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location genera líneas `#: fichero:línea' (por defecto)\n"
+" --omit-header no escribe la cabecera con la entrada `msgid \"\"'\n"
+" --output=FICHERO escribe la salida al FICHERO especificado\n"
+" -p, --output-dir=DIR los ficheros de salida se pondrán en el\n"
+" directorio DIR\n"
+" -s, --sort-output genera la salida ordenada y elimina los\n"
+" duplicados\n"
+" --strict escribe un fichero .po tipo Uniforum estricto\n"
+" -T, --trigraphs entiende los trigrafos ANSI C en la entrada\n"
+" -V, --version informa de la versión y finaliza\n"
+" -w, --width=NÚMERO ajusta la anchura de la página de salida\n"
+" -x, --exclude-file=FICHERO las entradas de FICHERO no se extraen\n"
+"\n"
+"Si el FICHERO_DE_ENTRADA es -, se lee de la entrada estándar.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr "lenguaje `%s' desconocido"
+
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "%s: atención: no se encontró la línea de cabecera"
diff --git a/po/fr.gmo b/po/fr.gmo
new file mode 100644
index 0000000..a4b4b41
--- /dev/null
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..304ab37
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,838 @@
+# Messages français pour GNU gettext.
+# Copyright © 1996, 1997, 1998 Free Software Foundation, Inc.
+# François Pinard <pinard@iro.umontreal.ca>, 1996.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.35\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1998-05-04 10:03-04:00\n"
+"Last-Translator: François Pinard <pinard@iro.umontreal.ca>\n"
+"Language-Team: French <fr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "Erreur système non identifiée"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: l'option « %s » est ambiguë\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: l'option « --%s » ne tolère pas d'argument\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: l'option « %c%s » ne tolère pas d'argument\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: l'option « %s » exige un argument\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: l'option « --%s » n'est pas reconnue\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: l'option « %c%s » n'est pas reconnue\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: l'option « %c » n'est pas permise\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: l'option « %c » n'est pas valide\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: l'option « %c » exige un argument\n"
+
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: l'option « -W %s » est ambiguë\n"
+
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: l'option « -W %s » ne tolère pas d'argument\n"
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Mémoire entièrement consommée"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Copyright © %s Free Software Foundation, Inc.\n"
+"Ce progiciel est libre. Consulter les sources pour plus de détail sur\n"
+"les permissions de copie. Il est distribué SANS AUCUNE GARANTIE\n"
+"de QUALITÉ LOYALE ET MARCHANDE ou d'ADÉQUATION POUR UN BUT PARTICULIER.\n"
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Écrit par %s.\n"
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "arguments manquants"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "trop d'arguments"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Pour plus d'information, essayer « %s --help ».\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Usage: %s [OPTION] [[[DOMAINE] MSGID] | [ -s [MSGID]...]]\n"
+" -d, --domain=DOMAINE trouver la traduction de MSGID, dans le DOMAINE donné\n"
+" -e reconnaître et remplacer les séquences d'échappement\n"
+" -E (ignoré, gardé pour des questions de compatibilité)\n"
+" -h, --help fournir ce message d'aide, puis terminer\n"
+" -n inhiber la production d'une fin de ligne\n"
+" -V, --version identifier le programme, puis terminer\n"
+" [DOMAINE] MSGID trouver la traduction de MSGID, dans le DOMAINE donné\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Si DOMAINE n'est pas founi, le domaine est obtenu de la variable TEXTDOMAIN\n"
+"dans l'environnement. En l'absence du catalogue de messages à l'endroit\n"
+"habituel, la variable d'environnement TEXTDOMAINDIR peut indiquer un autre\n"
+"répertoire.\n"
+"Avec l'option « -s », ce programme se comporte comme la commande « echo »; mais\n"
+"plutôt que de copier simplement ses arguments sur « stdout », ceux qui sont\n"
+"disponibles dans le catalogue choisi sont traduits.\n"
+"\n"
+"Ensemble des répertoires fouillés: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr ""
+"Rapportez tout problème fonctionnel à <bug-gnu-utils@gnu.org>.\n"
+"Les erreurs de traduction doivent être dirigées vers <fr@li.org>.\n"
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"un message à traduire ne doit pas contenir la séquence d'échappement `\\%c'"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "incapable de fabriquer le fichier « %s »"
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "sortie standard"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "erreur pendant l'écriture du fichier « %s »"
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "aucun fichier en entrée"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "exactement deux fichiers sont requis en entrée"
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Usage: %s [OPTION] ANCIEN.po NOUVEAU.po\n"
+"Les arguments obligatoires pour la forme longue des options sont aussi\n"
+"obligatoires pour les formes courtes qui leur correspondent.\n"
+"\n"
+" -D, --directory=RÉPERT fouiller RÉPERT aussi pour trouver les fichiers\n"
+" -h, --help fournir ce message d'aide, puis terminer\n"
+" -V, --version identifier le programme, puis terminer\n"
+"\n"
+"Comparer deux fichiers .po style Uniforum, vérifier qu'ils contiennent\n"
+"le même ensemble de chaînes « msgid ». ANCIEN.po fournit les vieilles\n"
+"traductions. NOUVEAU.po a été PO récemment créé (souvent par xgettext).\n"
+"Cela vous permet de vérifier que vous avez traduit chacun des messages\n"
+"de votre programme. Lorsqu'un appariement exact n'est pas possible,\n"
+"un appariement flou est utilisé pour un meilleur diagnostic.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "ce message, utilisé, n'est pas défini..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...mais cette définition lui est semblable"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "ce message, utilisé, n'est pas défini dans « %s »"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "attention: ce message n'est pas utilisé"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "message doublement défini"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...voici l'endroit de la première définition"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "ce message n'a pas de définition dans le domaine « %s »"
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "lors de la préparation de la sortie"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s et %s s'excluent mutuellement"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr "Il faut indiquer au moins deux fichiers"
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr "Critère de sélection irréalisable (%d < N < %d)"
+
+#: src/msgcomm.c:400
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Usage: %s [OPTION] FICHIER ...\n"
+"Les arguments obligatoires pour la forme longue des options sont aussi\n"
+"obligatoires pour les formes courtes qui leur correspondent.\n"
+"\n"
+" -d, --default-domain=DOMAINE sortir sur DOMAINE.po (non pas messages.po)\n"
+" -D, --directory=RÉPERT fouiller RÉPERT aussi pour trouver les fichiers\n"
+" -e, --no-escape éviter les échappement C en sortie (implicite)\n"
+" -E, --escape échappements C en sortie, éviter les 8-bits\n"
+" -f, --files-from=FICHIER lire la liste des fichiers d'entrée de FICHIER\n"
+" --force-po produire un fichier PO, même vide\n"
+" -F, --sort-by-file trier selon la position dans chaque fichier\n"
+" -h, --help fournir ce message d'aide, puis terminer\n"
+
+#: src/msgcomm.c:412
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -i, --indent utiliser un style indenté pour le fichier "
+"PO\n"
+" --no-location inhiber la production des « #: "
+"FICHIER:LIGNE »\n"
+" -n, --add-location produire les « #: FICHIER:LIGNE » "
+"(implicite)\n"
+" --omit-header omettre les en-têtes pour « msgid \"\" »\n"
+" -o, --output=FICHIER produire la sortie sur le FICHIER indiqué\n"
+" -p, --output-dir=RÉPERTOIRE sortir le fichier produit dans tel "
+"RÉPERTOIRE\n"
+" -s, --sort-output trier la sortie et éliminer les duplicats\n"
+" --strict produire un fichier PO strictement "
+"Uniforum\n"
+" -T, --trigraphs reconnaître les trigraphes ANSI C en "
+"entrée\n"
+" -u, --unique même chose que « -< 2 »\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+" -V, --version identifier le programme, puis terminer\n"
+" -w, --width=COLONNES limiter le nombre de COLONNES en sortie\n"
+" -<, --less-than=N montrer les messages définis moins de N "
+"fois\n"
+" ->, --more-than=N montrer les messages définis plus de N "
+"fois\n"
+"\n"
+"Trouver les messages communs dans un ensemble de plus d'un fichier PO.\n"
+"L'option « -> » (implicitement 1) exige un plus grand nombre d'occurrences.\n"
+"L'option « -< » (implicitement infini) exige moins d'occurrences, par "
+"exemple,\n"
+"« -< 2 » ne garde que les message uniques. Les traductions et commentaires\n"
+"proviennent du premier fichier PO à les définir, les références sont\n"
+"accumulées de tous les fichiers PO qui en fournissent.\n"
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "erreur lors de l'ouverture de « %s » en lecture"
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "ce fichier ne peut contenir des directives de domaine"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "aucun fichier d'entrée fourni"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "erreur lors de l'ouverture de « %s » en écriture"
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d messages traduits"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d traductions approximées"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d messages non-traduits"
+
+#: src/msgfmt.c:366
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Usage: %s [OPTION] FICHIER.po ...\n"
+"Compiler un fichier source décrivant une série de traductions de messages.\n"
+"\n"
+"Les arguments obligatoires pour la forme longue des options sont aussi\n"
+"obligatoires pour les formes courtes qui leur correspondent.\n"
+"\n"
+" -a, --alignment=OCTETS aligner chaînes sur tant d'OCTETS (%d présumé)\n"
+" -c, --check vérifier ce qui dépend du langage de programmation\n"
+" -D, --directory=RÉPERT fouiller RÉPERT aussi pour trouver les fichiers\n"
+" -f, --use-fuzzy aussi transmettre les traductions approximées\n"
+" -h, --help fournir ce message d'aide, puis terminer\n"
+" --no-hash exclure la table de dispersion du binaire produit\n"
+" -o, --output-file=SORTIE choisir le fichier de sortie\n"
+" --statistics donner quelques statistiques sur les traductions\n"
+" --strict se conformer à Uniforum strictement\n"
+" -v, --verbose diagnostiquer toute anomalie dans chaque FICHIER\n"
+" -V, --version identifier le programme, puis terminer\n"
+"\n"
+"La répétition de l'option « -v » augment le niveau de verbosité.\n"
+"Si FICHIER vaut « - », lit l'entrée standard. Si SORTIE vaut « - »,\n"
+"écrit sur la sortie standard.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "pendant la création de la table de dispersion"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "%s: attention: certaines traductions sont approximatives"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "« %s » n'est pas approprié comme nom de domaine"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr "domaine « %s » inadéquat comme nom de fichier: utilisera un préfixe"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "la directive « domain %s » sera ignorée"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "chaîne « msgstr » vide, entrée ignorée"
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "chaîne « msgstr » approximée, entrée ignorée"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "Le champ « %s » est absent de l'en-tête"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "Le champ « %s » devrait s'appuyer au début de la ligne"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr "Quelques champs de l'en-tête ont toujours leur valeur initiale"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "Le champ « %s » a toujours sa valeur initiale"
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "%s: attention: certaines traductions sont approximatives"
+
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr ""
+"l'une des chaînes « msgid » ou « msgstr » débute par « \\n », l'autre pas"
+
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr ""
+"l'une des chaînes « msgid » ou « msgstr » se termine par « \\n », l'autre pas"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr ""
+"nombre différent de spécifications de format entre « msgid » et « msgstr »"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "les spécifications de format pour l'argument %u ne sont pas identiques"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Usage: %s [OPTION] DEF.po REF.po\n"
+"Les arguments obligatoires pour la forme longue des options sont aussi\n"
+"obligatoires pour les formes courtes qui leur correspondent.\n"
+"\n"
+" -D, --directory=RÉPERT fouiller RÉPERT aussi pour trouver les fichiers\n"
+" -e, --no-escape éviter les échappement C en sortie (implicite)\n"
+" -E, --escape échappements C en sortie, éviter les 8-bits\n"
+" --force-po produire un fichier PO, même vide\n"
+" -h, --help fournir ce message d'aide, puis terminer\n"
+" -i, --indent sortie en style indenté\n"
+" -o, --output-file=FICHIER produire les résultats sur FICHIER\n"
+" --no-location ne pas produire les « #: FICHIER:LIGNE »\n"
+" --add-location produire les « #: FICHIER:LIGNE » (implicite)\n"
+" --strict produire un fichier PO strictement Uniforum\n"
+" -v, --verbose augmenter le niveau de bavardise\n"
+" -V, --version identifier le programme, puis terminer\n"
+" -w, --width=COLONNES limiter le nombre de COLONNES en sortie\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Fusionne deux fichiers PO ensemble. Le fichier DEF.po contient les\n"
+"anciennes traductions, qui sont transportées au fichier nouvellement\n"
+"créé dans la mesure où les chaînes à traduire se correspondent; les\n"
+"commentaires sont préservés, mais les commentaires automatiquement\n"
+"extraits et les positions dans le fichiers sont éliminés. Le fichier\n"
+"REF.po a été récemment crée (souvent par xgettext), toute traduction\n"
+"ou commentaire en sera éliminé, toutefois les commentaires « . » et\n"
+"les positions de fichier sont conservés. Lorsqu'un appariement\n"
+"exact n'est pas possible, un appariement flou permet de produire de\n"
+"meilleurs résultats. Ceux-ci sont produits sur la sortie standard,\n"
+"À moins qu'un fichier de sortie soit explicitement spécifié.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%s%d et %d lus, %d fusionnés, %d approximés, %d manquants, %d périmés.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " terminé.\n"
+
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Usage: %s [OPTION] [FICHIER]...\n"
+"Les arguments obligatoires pour la forme longue des options sont aussi\n"
+"obligatoires pour les formes courtes qui leur correspondent.\n"
+"\n"
+" -e, --no-escape éviter les échappement C en sortie (implicite)\n"
+" -E, --escape échappements C en sorite, éviter les 8-bits\n"
+" --force-po produire un fichier PO, même vide\n"
+" -h, --help fournir ce message d'aide, puis terminer\n"
+" -i, --indent sortie en style indenté\n"
+" -o, --output-file=FICHIER écrire sur FICHIER plutôt que sur sortie standard\n"
+" --strict produire un fichier .po strictement Uniforum\n"
+" -V, --version identifier le programme, puis terminer\n"
+" -w, --width=COLONNES limiter le nombre de COLONNES en sortie\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Convertir un fichier .mo, binaire, en fichier .po à la manière\n"
+"d'Uniforum. Les fichiers grand-boutiens et petit-boutiens sont tous\n"
+"deux traités. Si le fichier d'entrée vaut « - », lit l'entrée standard.\n"
+"Sans fichier d'entrée ou lorsque « - », lit l'entrée standard. Sauf\n"
+"indication contraire, les résultats sont produits sur la sortie standard.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "erreur lors de la lecture de « %s »"
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "le fichier « %s » est tronqué"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "le repositionnement de « %s » à l'endroit %ld a échoué"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "le fichier « %s » n'est pas en format .mo pour GNU"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "section « msgstr » absente"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "%d erreurs terminales"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "trop d'erreurs, j'abandonne"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "mot-clé « %s » inconnu"
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "séquence d'échappement illégale"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "fin de ligne intempestive"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "fin de fichier intempestive"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "entrée standard"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr "%s:%d: attention: constante caractère sans terminateur"
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr "%s:%d: attention: constante chaîne sans terminateur"
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr "--join-existing interdit si production sur sortie standard"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr ""
+"attention: « %s » sans classification pour « %s », le langage C sera présumé"
+
+#: src/xgettext.c:544
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Usage: %s [OPTION] FICHIER ...\n"
+"Extraire les messages à traduire à partir de plusieurs fichiers.\n"
+"\n"
+"Les arguments obligatoires pour la forme longue des options sont aussi\n"
+"obligatoires pour les formes courtes qui leur correspondent.\n"
+"\n"
+" -a, --extract-all extraire toutes les chaînes\n"
+" -c, --add-comments[=CLÉ] sauver le commentaire précédent possédant CLÉ,\n"
+" ou celui qui précède immédiatement le mot-clef\n"
+" -C, --c++ voir « --language=C++ »\n"
+" --debug détailler l'analyse des chaînes de format\n"
+" -d, --default-domain=DOMAINE sortir sur DOMAINE.po (non pas messages.po)\n"
+" -D, --directory=RÉPERT fouiller RÉPERT aussi pour trouver les fichiers\n"
+" -e, --no-escape pas d'échappements C en sortie (implicite)\n"
+" -E, --escape échappements C en sortie, éviter les 8-bits\n"
+" -f, --files-from=FICHIER lire la liste des fichiers d'entrée de FICHIER\n"
+" --force-po produire un fichier PO, même vide\n"
+" --foreign-user inhiber la production d'un copyright FSF\n"
+" -F, --sort-by-file trier selon la position dans chaque fichier\n"
+
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help fournir ce message d'aide, puis terminer\n"
+" -i, --indent produire le fichier .po dans un style indenté\n"
+" -j, --join-existing ajouter les messages au fichier existant\n"
+" -k, --keyword[=MOT] mot-clef supplémentaire, défauts si MOT absent\n"
+" -l, --string-limit=LONGUEUR indiquer si LONGUEUR (%u) octets dépassés\n"
+" -L, --language=NOM analyser le langage indiqué (C, C++, PO),\n"
+" sinon, le deviner de l'extension du fichier\n"
+" -m, --msgstr-prefix[=CHAÎNE] préfixer les msgstr's par CHAÎNE, sinon \\\"\\\"\n"
+" -M, --msgstr-suffix[=CHAÎNE] suffixer les msgstr's par CHAÎNE, sinon \\\"\\\"\n"
+" --no-location ne pas produire les « #: FICHIER:LIGNE »\n"
+
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location produire les « #: FICHIER:LIGNE » (implicite)\n"
+" --omit-header omettre les en-têtes pour « msgid \"\" »\n"
+" -o, --output=FICHIER produire la sortie sur le FICHIER indiqué\n"
+" -p, --output-dir=RÉPERTOIRE sortir le fichier produit dans tel RÉPERTOIRE\n"
+" -s, --sort-output trier la sortie et éliminer les duplicats\n"
+" --strict produire un fichier PO strictement Uniforum\n"
+" -T, --trigraphs reconnaître les trigraphes ANSI C en entrée\n"
+" -V, --version identifier le programme, puis terminer\n"
+" -w, --width=COLONNES limiter le nombre de COLONNES en sortie\n"
+" -x, --exclude-file=FICHIER ne pas extraire d'entrées de FICHIER\n"
+"\n"
+"Si le FICHIER est « - », lit l'entrée standard.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr "langage « %s » inconnu"
+
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "%s: attention: l'en-tête n'a pas été trouvé"
diff --git a/po/gettext.pot b/po/gettext.pot
new file mode 100644
index 0000000..e5cfeaf
--- /dev/null
+++ b/po/gettext.pot
@@ -0,0 +1,639 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2000-05-06 11:10-0700\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr ""
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr ""
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr ""
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr ""
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr ""
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr ""
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr ""
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr ""
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr ""
+
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr ""
+
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr ""
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr ""
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr ""
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr ""
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr ""
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr ""
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr ""
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr ""
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr ""
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr ""
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr ""
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr ""
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr ""
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr ""
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr ""
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr ""
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr ""
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr ""
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr ""
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr ""
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr ""
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr ""
+
+#: src/msgcomm.c:400
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+
+#: src/msgcomm.c:412
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr ""
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr ""
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr ""
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr ""
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr ""
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ""
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ""
+
+#: src/msgfmt.c:366
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr ""
+
+#: src/msgfmt.c:451
+#, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr ""
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr ""
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr ""
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr ""
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr ""
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr ""
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr ""
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr ""
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr ""
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr ""
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr ""
+
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr ""
+
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr ""
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr ""
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr ""
+
+#: src/msgmerge.c:328
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr ""
+
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr ""
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr ""
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr ""
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr ""
+
+#: /home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y:129
+msgid "missing `msgstr' section"
+msgstr ""
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr ""
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr ""
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr ""
+
+#: src/po-lex.c:335
+msgid "invalid control sequence"
+msgstr ""
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr ""
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr ""
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr ""
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr ""
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr ""
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr ""
+
+#: src/xgettext.c:544
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr ""
diff --git a/po/ko.gmo b/po/ko.gmo
new file mode 100644
index 0000000..58cbb06
--- /dev/null
+++ b/po/ko.gmo
Binary files differ
diff --git a/po/ko.po b/po/ko.po
new file mode 100644
index 0000000..0741e72
--- /dev/null
+++ b/po/ko.po
@@ -0,0 +1,819 @@
+# GNU gettextÀÇ Çѱ¹¾î ¸Þ½ÃÁö
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Bang Jun-Young <bangjy@geocities.com>, 1995-1997.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.30\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1997-09-03 12:52+0900\n"
+"Last-Translator: Bang Jun-Young <bangjy@geocities.com>\n"
+"Language-Team: Korean <ko@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=EUC-KR\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "¾Ë ¼ö ¾ø´Â ½Ã½ºÅÛ ¿À·ù"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: `%s'´Â ¸ðÈ£ÇÑ ¿É¼ÇÀÔ´Ï´Ù\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: `--%s' ¿É¼ÇÀº Àμö¸¦ Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: `%c%s' ¿É¼ÇÀº Àμö¸¦ Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: `%s' ¿É¼ÇÀº Àμö°¡ ÇÊ¿äÇÕ´Ï´Ù\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: ÀνÄÇÒ ¼ö ¾ø´Â ¿É¼Ç `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: ÀνÄÇÒ ¼ö ¾ø´Â ¿É¼Ç `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: À߸øµÈ ¿É¼Ç -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ºÎÀûÀýÇÑ ¿É¼Ç -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: ÀÌ ¿É¼ÇÀº Àμö°¡ ÇÊ¿äÇÕ´Ï´Ù -- %c\n"
+
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: `-W %s'´Â ¸ðÈ£ÇÑ ¿É¼ÇÀÔ´Ï´Ù\n"
+
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: `-W %s' ¿É¼ÇÀº Àμö¸¦ Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù\n"
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "¸Þ¸ð¸®°¡ ¹Ù´Ú³²"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"ÀúÀÛ±Ç (C) %s Free Software Foundation, Inc.\n"
+"ÀÌ ÇÁ·Î±×·¥Àº °ø°³ ¼ÒÇÁÆ®¿þ¾îÀÔ´Ï´Ù. º¹»ç Á¶°ÇÀº ¼Ò½º¸¦ ÂüÁ¶ÇϽʽÿÀ. »óÇ°¼º\n"
+"À̳ª ƯÁ¤ ¸ñÀû¿¡ ´ëÇÑ ÀûÇÕ¼ºÀ» ºñ·ÔÇÏ¿©, ¾î¶°ÇÑ º¸Áõµµ ÇÏÁö ¾Ê½À´Ï´Ù.\n"
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr "%s°¡ ¸¸µé¾ú½À´Ï´Ù.\n"
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "Àμö°¡ ºüÁ³À½"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "Àμö°¡ ³Ê¹« ¸¹À½"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "´õ ¸¹Àº Á¤º¸¸¦ º¸·Á¸é `%s --help' ÇϽʽÿÀ\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"»ç¿ë¹ý: %s [¿É¼Ç] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN ¹ø¿ªµÈ ¸Þ½ÃÁö¸¦ TEXTDOMAIN¿¡¼­ ºÒ·¯¿É´Ï´Ù\n"
+" -e ¸î¸î À̽ºÄÉÀÌÇÁ ¹®ÀÚ¿­ÀÇ È®ÀåÀ» °¡´ÉÄÉ ÇÕ´Ï´Ù\n"
+" -E (ȣȯ¼ºÀ» À§ÇØ ¹«½ÃµÊ)\n"
+" -h, --help ÀÌ µµ¿ò¸»À» º¸¿©ÁÖ°í Á¾·áÇÕ´Ï´Ù\n"
+" -n µû¶óºÙ´Â ÁÙ¹Ù²Þ ¹®ÀÚ¸¦ Á¦°ÅÇÕ´Ï´Ù\n"
+" -V, --version ¹öÀü Á¤º¸¸¦ Ç¥½ÃÇÏ°í Á¾·áÇÕ´Ï´Ù\n"
+" [TEXTDOMAIN] MSGID MSGID¿¡ ´ëÀÀÇÏ´Â ¹ø¿ªµÈ ¸Þ½ÃÁö¸¦ TEXTDOMAIN¿¡¼­\n"
+" ºÒ·¯¿É´Ï´Ù\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"TEXTDOMAIN ¸Å°³º¯¼ö°¡ ÁÖ¾îÁöÁö ¾ÊÀ¸¸é ¿µ¿ªÀº ȯ°æ º¯¼ö TEXTDOMAINÀ¸·ÎºÎÅÍ\n"
+"°áÁ¤µË´Ï´Ù. ¸Þ½ÃÁö ¸ñ·ÏÀÌ ÀϹÝÀûÀÎ µð·ºÅ丮¿¡ ÀÖÁö ¾ÊÀ¸¸é ȯ°æ º¯¼ö\n"
+"TEXTDOMAINDIR·Î ´Ù¸¥ À§Ä¡¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.\n"
+"-s ¿É¼ÇÀÌ ¾²À̸é ÇÁ·Î±×·¥Àº `echo' ¸í·Éó·³ µ¿ÀÛÇÕ´Ï´Ù. ±×·¯³ª ´Ü¼øÈ÷ Àμö¸¦\n"
+"Ç¥ÁØÃâ·Â¿¡ º¹»çÇÏÁö´Â ¾Ê½À´Ï´Ù. ´ë½Å ¼±ÅÃµÈ ¸ñ·Ï¿¡ ÀÖ´Â ¹ø¿ªµÈ ¸Þ½ÃÁö°¡\n"
+"Ãâ·ÂµË´Ï´Ù.\n"
+"±âº» Ž»ö µð·ºÅ丮: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+#, fuzzy
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr "<bug-gnu-utils@gnu.ai.mit.edu>·Î ¹®Á¦Á¡À» º¸°íÇϽʽÿÀ.\n"
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr "±¹Á¦È­µÈ ¸Þ½ÃÁö´Â `\\%c' À̽ºÄÉÀÌÇÁ ¼ø¼­¿­À» Æ÷ÇÔÇÒ ¼ö ¾ø½À´Ï´Ù"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "Ãâ·Â ÆÄÀÏ \"%s\"À» ¸¸µé ¼ö ¾ø½À´Ï´Ù"
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "Ç¥ÁØ Ãâ·Â"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "\"%s\" ÆÄÀÏÀ» ¾²´Â µ¿¾È ¿À·ù ¹ß»ý"
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "ÀÔ·Â ÆÄÀÏÀÌ ÁÖ¾îÁöÁö ¾Ê¾Ò½À´Ï´Ù"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "Á¤È®È÷ 2°³ÀÇ ÀÔ·Â ÆÄÀÏÀÌ ÇÊ¿äÇÕ´Ï´Ù"
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"»ç¿ë¹ý: %s [¿É¼Ç] def.po ref.po\n"
+"±ä ¿É¼Ç¿¡ ºÎ°¡µÇ´Â Àμö´Â ªÀº ¿É¼Ç¿¡µµ Àû¿ëµË´Ï´Ù.\n"
+" -D, --directory=DIRECTORY ÀÔ·Â ÆÄÀÏ Å½»ö ¸í´Ü¿¡ DIRECTORY¸¦ Ãß°¡ÇÕ´Ï´Ù\n"
+" -h, --help ÀÌ µµ¿ò¸»À» º¸¿©ÁÖ°í Á¾·áÇÕ´Ï´Ù\n"
+" -V, --version ¹öÀü Á¤º¸¸¦ Ãâ·ÂÇÏ°í Á¾·áÇÕ´Ï´Ù\n"
+"\n"
+"°°Àº ³»¿ëÀÇ msgid ¹®ÀÚ¿­À» Æ÷ÇÔÇÏ°í ÀÖ´ÂÁö È®ÀÎÇϱâ À§ÇØ Uniforum\n"
+"ÇüÅÂÀÇ µÎ .po ÆÄÀÏÀ» ºñ±³ÇÕ´Ï´Ù. def.po ÆÄÀÏÀº ÀÌ¹Ì Á¸ÀçÇÏ´Â ÆÄÀÏÀ̸ç\n"
+"¿¹Àü¿¡ ¹ø¿ªµÈ ¸Þ½ÃÁö¸¦ ´ã°í ÀÖ½À´Ï´Ù. ref.po ÆÄÀÏÀº ÃÖ±Ù¿¡ ¸¸µé¾îÁø\n"
+"PO ÆÄÀÏÀÔ´Ï´Ù(ÀϹÝÀûÀ¸·Î xgettext¿¡ ÀÇÇØ). ÀÌ°ÍÀº ÇÁ·Î±×·¥ ³»¿¡ ÀÖ´Â\n"
+"°¢°¢ÀÇ ¸Þ½ÃÁö¸¦ ¹ø¿ªÇß´ÂÁö È®ÀÎÇÒ ¶§ À¯¿ëÇÕ´Ï´Ù. Á¤È®ÇÑ Â¦À» ãÁö ¸øÇÒ\n"
+"°æ¿ì, º¸´Ù ³ªÀº °á°ú¸¦ ¾ò±â À§ÇØ ÆÛÁö ¸ÅĪÀÌ »ç¿ëµË´Ï´Ù.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "ÀÌ ¸Þ½ÃÁö´Â »ç¿ëµÇÁö¸¸ Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...ÇÏÁö¸¸ ÀÌ Á¤ÀÇ´Â À¯»çÇÕ´Ï´Ù"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "ÀÌ ¸Þ½ÃÁö´Â »ç¿ëµÇÁö¸¸ %s¿¡¼­ Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "°æ°í: ÀÌ ¸Þ½ÃÁö´Â »ç¿ëµÇÁö ¾Ê½À´Ï´Ù"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "Áߺ¹µÈ ¸Þ½ÃÁö Á¤ÀÇ"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...¿©±â´Â ù¹ø° Á¤ÀÇÀÇ À§Ä¡ÀÔ´Ï´Ù"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "ÀÌ ¸Þ½ÃÁö´Â \"%s\" ¿µ¿ª¿¡ Á¤ÀÇ°¡ ¾ø½À´Ï´Ù"
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "Ãâ·ÂÀ» ÁغñÇÏ´Â µ¿¾È"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s¿Í %s´Â ¼­·Î ¹èŸÀûÀÔ´Ï´Ù"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr ""
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr ""
+
+#: src/msgcomm.c:400
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"»ç¿ë¹ý: %s [¿É¼Ç] ÀÔ·ÂÆÄÀÏ ...\n"
+"±ä ¿É¼Ç¿¡ ºÎ°¡µÇ´Â Àμö´Â ªÀº ¿É¼Ç¿¡µµ Àû¿ëµË´Ï´Ù.\n"
+" -a, --extract-all ¸ðµç ¹®ÀÚ¿­À» ÃßÃâÇÕ´Ï´Ù\n"
+" -c, --add-comments[=TAG] Ãâ·Â ÆÄÀÏ¿¡ TAG(¶Ç´Â Å°¿öµå Çà)°¡ Æ÷ÇÔµÈ ÁÖ¼®\n"
+" ºí·°À» µÓ´Ï´Ù\n"
+" -C, --c++ --language=C++ÀÇ ¾à½Ä Ç¥Çö\n"
+" --debug ´õ ÀÚ¼¼ÇÑ ¼­½Ä¹®ÀÚ¿­ ÀÎ½Ä °á°ú\n"
+" -d, --default-domain=NAME NAME.po·Î Ãâ·ÂÇÕ´Ï´Ù (messages.po ´ë½Å)\n"
+" -D, --directory=DIRECTORY ÀÔ·Â ÆÄÀÏ Å½»ö ¸í´Ü¿¡ DIRECTORY¸¦ Ãß°¡ÇÕ´Ï´Ù\n"
+" -e, --no-escape Ãâ·Â¿¡ C À̽ºÄÉÀÌÇÁ ¹®ÀÚ¸¦ ¾²Áö ¾Ê½À´Ï´Ù\n"
+" (³»Á¤°ª)\n"
+" -E, --escape Ãâ·Â¿¡ C À̽ºÄÉÀÌÇÁ ¹®ÀÚ¸¦ ¾²°í, È®Àå ¹®ÀÚ´Â\n"
+" ¾²Áö ¾Ê½À´Ï´Ù\n"
+" -f, --files-from=FILE FILE¿¡¼­ ÀÔ·Â ÆÄÀÏÀÇ ¸í´ÜÀ» ÀнÀ´Ï´Ù\n"
+" --force-po ºñ¾úÀ»Áö¶óµµ PO ÆÄÀÏ¿¡ ±â·ÏÇÕ´Ï´Ù\n"
+" --foreign-user ¿ÜºÎ »ç¿ëÀÚ¸¦ À§ÇØ FSF ÀúÀÛ±Ç Á¶Ç×À» Ãâ·Â¿¡¼­\n"
+" »ý·«ÇÕ´Ï´Ù\n"
+" -F, --sort-by-file ÆÄÀÏÀÇ À§Ä¡¿¡ µû¶ó Ãâ·ÂÀ» Á¤·ÄÇÕ´Ï´Ù\n"
+
+#: src/msgcomm.c:412
+#, fuzzy
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -n, --add-location '#: filename:line' ÇàÀ» »ý¼ºÇÕ´Ï´Ù "
+"(³»Á¤°ª)\n"
+" --omit-header Ç¥Á¦¿¡ `msgid \"\"' Ç׸ñÀ» ¾²Áö ¾Ê½À´Ï´Ù\n"
+" -o, --output=FILE ÁöÁ¤µÈ ÆÄÀÏ¿¡ Ãâ·ÂÀ» ±â·ÏÇÕ´Ï´Ù\n"
+" -p, --output-dir=DIR Ãâ·Â ÆÄÀÏÀ» DIR µð·ºÅ丮¿¡ °¡Á®´Ù ³õ½À´Ï´Ù\n"
+" -s, --sort-output Á¤·ÄµÈ Ãâ·ÂÀ» »ý¼ºÇÏ°í »çº»À» Áö¿ó´Ï´Ù\n"
+" --strict UniforumÀ» ¾ö°ÝÈ÷ µû¸£´Â .po ÆÄÀÏÀ» "
+"¸¸µì´Ï´Ù\n"
+" -T, --trigraphs ÀԷ¿¡ ´ëÇØ ANSI C Æ®¸®±×¶óÇÁ¸¦ ÀνÄÇÕ´Ï´Ù\n"
+" -V, --version ¹öÀü Á¤º¸¸¦ Ãâ·ÂÇÏ°í Á¾·áÇÕ´Ï´Ù\n"
+" -w, --width=NUMBER Ãâ·Â ÆäÀÌÁö ÆøÀ» ¼³Á¤ÇÕ´Ï´Ù\n"
+" -x, --exclude-file=FILE FILE ¾ÈÀÇ Ç׸ñÀ» ÃßÃâÇÏÁö ¾Ê½À´Ï´Ù\n"
+"\n"
+"ÀÔ·ÂÆÄÀÏÀÌ - À̸é Ç¥ÁØ ÀÔ·ÂÀ» ÀÐ°Ô µË´Ï´Ù.\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "Àбâ À§ÇØ \"%s\"À» ¿©´Â µ¿¾È ¿À·ù ¹ß»ý"
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "ÀÌ ÆÄÀÏÀº ¿µ¿ª Áö½ÃÀÚ¸¦ Æ÷ÇÔÇÏ°í ÀÖÁö ¾ÊÀ» ¼öµµ ÀÖ½À´Ï´Ù"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "ÀÔ·Â ÆÄÀÏÀÌ ÁÖ¾îÁöÁö ¾Ê¾Ò½À´Ï´Ù"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "¾²±â À§ÇØ \"%s\"À» ¿©´Â µ¿¾È ¿À·ù ¹ß»ý"
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "¹ø¿ªµÈ ¸Þ½ÃÁö %d°³"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", ÆÛÁö ¹ø¿ª¹® %d°³"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", ¹ø¿ªµÇÁö ¾ÊÀº ¸Þ½ÃÁö %d°³"
+
+#: src/msgfmt.c:366
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"»ç¿ë¹ý: %s [¿É¼Ç] filename.po ...\n"
+"±ä ¿É¼Ç¿¡ ºÎ°¡µÇ´Â Àμö´Â ªÀº ¿É¼Ç¿¡µµ Àû¿ëµË´Ï´Ù.\n"
+" -a. --alignment=NUMBER ¹®ÀÚ¿­À» NUMBER ¹ÙÀÌÆ®·Î Á¤·ÄÇÕ´Ï´Ù(³»Á¤°ª: %d)\n"
+" -c, --check ¹®ÀÚ¿­¿¡ ´ëÇØ ¾ð¾î ÀÇÁ¸ °Ë»ç¸¦ ¼öÇàÇÕ´Ï´Ù\n"
+" -D, --directory=DIRECTORY ÀÔ·Â ÆÄÀÏ Å½»ö ¸í´Ü¿¡ DIRECTORY¸¦ Ãß°¡ÇÕ´Ï´Ù\n"
+" -f, --fuzzy Ãâ·Â¿¡ ÆÛÁö Ç׸ñÀ» »ç¿ëÇÕ´Ï´Ù\n"
+" -h, --help ÀÌ µµ¿ò¸»À» º¸¿©ÁÖ°í Á¾·áÇÕ´Ï´Ù\n"
+" --no-hash ÀÌÁø ÆÄÀÏÀÌ Çؽ¬ Å×À̺íÀ» Æ÷ÇÔÇÏÁö ¾Êµµ·Ï ÇÕ´Ï´Ù\n"
+" -o, --output-file=FILE Ãâ·Â ÆÄÀÏ À̸§À» FILE·Î ÁöÁ¤ÇÕ´Ï´Ù\n"
+" --statistics ¹ø¿ª¹®¿¡ ´ëÇÑ Åë°è¸¦ Ãâ·ÂÇÕ´Ï´Ù\n"
+" --strict ¾ö°ÝÇÑ Uniforum ¸ðµå¸¦ °¡´ÉÄÉ ÇÕ´Ï´Ù\n"
+" -v, --verbose ÀÔ·Â ÆÄÀÏÀ» ¼ø¼­´ë·Î Ãâ·ÂÇÕ´Ï´Ù\n"
+" -V, --version ¹öÀü Á¤º¸¸¦ Ãâ·ÂÇÏ°í Á¾·áÇÕ´Ï´Ù\n"
+"\n"
+"-v ¿É¼ÇÀ» Çѹø ÀÌ»ó ÁÖ¸é Ãâ·Â µî±ÞÀÌ ¿Ã¶ó°©´Ï´Ù.\n"
+"\n"
+"ÀÔ·Â ÆÄÀÏÀÌ - À̸é Ç¥ÁØ ÀÔ·ÂÀ» ÀÐ°Ô µË´Ï´Ù. Ãâ·Â ÆÄÀÏÀÌ - À̸é\n"
+"Ç¥ÁØ Ãâ·Â¿¡ Ãâ·ÂÇÕ´Ï´Ù.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "Çؽ¬ Å×À̺íÀ» ¸¸µå´Â µ¿¾È"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "%s: °æ°í: ¼Ò½º ÆÄÀÏÀÌ ÆÛÁö ¹ø¿ª¹®À» Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "¿µ¿ª¸í \"%s\"´Â ÆÄÀÏ À̸§À¸·Î ¾Ë¸ÂÁö ¾Ê½À´Ï´Ù"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr ""
+"¿µ¿ª¸í \"%s\"´Â ÆÄÀÏ À̸§À¸·Î ¾Ë¸ÂÁö ¾Ê½À´Ï´Ù. ±×·¯¹Ç·Î Á¢µÎ»ç¸¦\n"
+"»ç¿ëÇÒ °ÍÀÔ´Ï´Ù"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "`domain %s' Áö½ÃÀÚ´Â ¹«½ÃµÊ"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "ºó `msgstr' Ç׸ñÀº ¹«½ÃµÊ"
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "ÆÛÁö `msgstr' Ç׸ñÀº ¹«½ÃµÊ"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "Çì´õ¿¡ Çì´õÇʵå `%s'°¡ ºüÁ³À½"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "Çì´õ Çʵå `%s'´Â ÇàÀÇ Ã³À½ºÎÅÍ ½ÃÀÛÇØ¾ß ÇÕ´Ï´Ù"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr "¸î¸î Çì´õ Çʵ尡 ¾ÆÁ÷µµ ÃʱâÀÇ ³»Á¤°ªÀ» °¡Áö°í ÀÖ½À´Ï´Ù"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "`%s' Çʵ尡 ¾ÆÁ÷µµ ÃʱâÀÇ ³»Á¤°ªÀ» °¡Áö°í ÀÖ½À´Ï´Ù"
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "%s: °æ°í: ¼Ò½º ÆÄÀÏÀÌ ÆÛÁö ¹ø¿ª¹®À» Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù"
+
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "`msgid'¿Í `msgstr' Ç׸ñÀÌ ¸ðµÎ '\\n'À¸·Î ½ÃÀÛÇÏÁö ¾Ê½À´Ï´Ù"
+
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "`msgid'¿Í `msgstr' Ç׸ñÀÌ ¸ðµÎ '\\n'À¸·Î ³¡³ªÁö ¾Ê½À´Ï´Ù"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr "`msgid'¿Í `msgstr'¿¡ ¾²ÀÎ ¼­½Ä ÁöÁ¤ÀÚÀÇ °³¼ö°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "Àμö %u¿¡ ´ëÇÑ ¼­½Ä ÁöÁ¤ÀÚ°¡ °°Áö ¾Ê½À´Ï´Ù"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"»ç¿ë¹ý: %s [¿É¼Ç] def.po ref.po\n"
+"±ä ¿É¼Ç¿¡ ºÎ°¡µÇ´Â Àμö´Â ªÀº ¿É¼Ç¿¡µµ Àû¿ëµË´Ï´Ù.\n"
+" -D, --directory=DIRECTORY ÀÔ·Â ÆÄÀÏ Å½»ö ¸í´Ü¿¡ DIRECTORY¸¦ Ãß°¡ÇÕ´Ï´Ù\n"
+" -e, --no-escape Ãâ·Â¿¡ C À̽ºÄÉÀÌÇÁ ¹®ÀÚ¸¦ ¾²Áö ¾Ê½À´Ï´Ù (³»Á¤°ª)\n"
+" -E, --escape Ãâ·Â¿¡ C À̽ºÄÉÀÌÇÁ ¹®ÀÚ¸¦ ¾²°í, È®Àå ¹®ÀÚ´Â ¾²Áö\n"
+" ¾Ê½À´Ï´Ù\n"
+" --force-po ºñ¾úÀ»Áö¶óµµ PO ÆÄÀÏ¿¡ ±â·ÏÇÕ´Ï´Ù\n"
+" -h, --help ÀÌ µµ¿ò¸»À» º¸¿©ÁÖ°í Á¾·áÇÕ´Ï´Ù\n"
+" -i, --indent µé¿©¾²±âµÈ Ãâ·Â ÇüÅÂ\n"
+" -o, --output-file=FILE °á°ú°¡ FILE¿¡ ¾²¿©Áöµµ·Ï ÇÕ´Ï´Ù\n"
+" --no-location `#: filename:line' ÇàÀ» ¾²Áö ¾Ê½À´Ï´Ù\n"
+" --add-location `#: filename:line' ÇàÀ» º¸Á¸ÇÕ´Ï´Ù (³»Á¤°ª)\n"
+" --strict ¾ö°ÝÇÑ Uniforum Ãâ·Â ÇüÅÂ\n"
+" -v, --verbose Ç¥½Ã µî±ÞÀ» ³ôÀÔ´Ï´Ù\n"
+" -V, --version ¹öÀü Á¤º¸¸¦ Ãâ·ÂÇÏ°í Á¾·áÇÕ´Ï´Ù\n"
+" -w, --width=NUMBER Ãâ·Â ÆäÀÌÁö ÆøÀ» ¼³Á¤ÇÕ´Ï´Ù\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Uniforum ÇüÅÂÀÇ µÎ ÆÄÀÏÀ» Çϳª·Î °áÇÕÇÕ´Ï´Ù. def.po ÆÄÀÏÀº ÀÌ¹Ì Á¸ÀçÇÏ´Â\n"
+"ÆÄÀÏÀÌ¸ç ¿¹Àü¿¡ ¹ø¿ªµÈ ¸Þ½ÃÁö¸¦ ´ã°í ÀÖ½À´Ï´Ù. ÀÌ ¹ø¿ª¹®µéÀº ¦ÀÌ ÀÖ´Â °Í¿¡\n"
+"ÇÑÇØ »õ·Ó°Ô ¸¸µé¾îÁø ÆÄÀÏÀÇ °ÍÀ¸·Î ´ëüµË´Ï´Ù; ÁÖ¼®Àº º¸Á¸µÇÁö¸¸ ÃßÃâ ÁÖ¼®°ú\n"
+"ÆÄÀÏ À§Ä¡´Â Á¦°ÅµË´Ï´Ù. ref.po ÆÄÀÏÀº ÃÖ±Ù¿¡ ¸¸µé¾îÁø PO ÆÄÀÏÀ̸ç\n"
+"(ÀϹÝÀûÀ¸·Î xgettext¿¡ ÀÇÇØ), ÆÄÀÏ ³»ÀÇ ¸ðµç ¹ø¿ª¹®À̳ª ÁÖ¼®Àº Á¦°ÅµÇÁö¸¸\n"
+"Á¡ ÁÖ¼®°ú ÆÄÀÏ À§Ä¡´Â º¸Á¸µË´Ï´Ù. Á¤È®ÇÑ Â¦À» ãÁö ¸øÇÒ °æ¿ì, º¸´Ù ³ªÀº\n"
+"°á°ú¸¦ ¾ò±â À§ÇØ ÆÛÁö ¸ÅĪÀÌ »ç¿ëµË´Ï´Ù. ¸¸¾à Ãâ·Â ÆÄÀÏÀÌ ÁöÁ¤µÇÁö ¾ÊÀ¸¸é\n"
+"°á°ú´Â Ç¥ÁØÃâ·Â¿¡ ¾²¿©Áý´Ï´Ù.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%s%d°³ÀÇ ¿¹Àü °Í + %d°³ÀÇ ÂüÁ¶¹®, °áÇÕµÈ °Í %d, ÆÛÁö %d, ºüÁø °Í %d, "
+"¾µ¸ð¾ø´Â °Í %d°³¸¦ Àоú½À´Ï´Ù.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " ¿Ï·á.\n"
+
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"»ç¿ë¹ý: %s [¿É¼Ç] [ÆÄÀÏ]...\n"
+"±ä ¿É¼Ç¿¡ ºÎ°¡µÇ´Â Àμö´Â ªÀº ¿É¼Ç¿¡µµ Àû¿ëµË´Ï´Ù.\n"
+" -e, --no-escape Ãâ·Â¿¡ C À̽ºÄÉÀÌÇÁ ¹®ÀÚ¸¦ ¾²Áö ¾Ê½À´Ï´Ù (³»Á¤°ª)\n"
+" -E, --escape Ãâ·Â¿¡ C À̽ºÄÉÀÌÇÁ ¹®ÀÚ¸¦ ¾²°í, È®Àå ¹®ÀÚ´Â ¾²Áö\n"
+" ¾Ê½À´Ï´Ù\n"
+" --force-po ºñ¾úÀ»Áö¶óµµ PO ÆÄÀÏ¿¡ ±â·ÏÇÕ´Ï´Ù\n"
+" -h, --help ÀÌ µµ¿ò¸»À» º¸¿©ÁÖ°í Á¾·áÇÕ´Ï´Ù\n"
+" -i, --indent µé¿©¾²±âµÈ Ãâ·Â ÇüÅÂ\n"
+" -o, --output-file=FILE °á°ú°¡ FILE¿¡ ¾²¿©Áöµµ·Ï ÇÕ´Ï´Ù\n"
+" --strict ¾ö°ÝÇÑ Uniforum Ãâ·Â ÇüÅÂ\n"
+" -V, --version ¹öÀü Á¤º¸¸¦ Ãâ·ÂÇÏ°í Á¾·áÇÕ´Ï´Ù\n"
+" -w, --width=NUMBER Ãâ·Â ÆäÀÌÁö ÆøÀ» ¼³Á¤ÇÕ´Ï´Ù\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"ÀÌÁø .mo ÆÄÀÏÀ» Uniforum ÇüÅÂÀÇ .po ÆÄÀÏ·Î º¯È¯ÇÕ´Ï´Ù.\n"
+"¸®Æ²-¿£µð¾ð°ú ºò-¿£µð¾ðÀ¸·Î µÈ .mo ÆÄÀÏÀ» ¸ðµÎ ´Ù·ê ¼ö ÀÖ½À´Ï´Ù.\n"
+"ÀÔ·Â ÆÄÀÏÀÌ ÁÖ¾îÁöÁö ¾Ê°Å³ª - À̸é Ç¥ÁØ ÀÔ·ÂÀ» ÀÐ°Ô µË´Ï´Ù.\n"
+"³»Á¤°ªÀ¸·Î Ãâ·ÂÀº Ç¥ÁØ Ãâ·Â¿¡ ±â·ÏµË´Ï´Ù.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "\"%s\"À» Àд µ¿¾È ¿À·ù ¹ß»ý"
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "\"%s\" ÆÄÀÏÀÌ Àß·ÈÀ½"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "\"%s\" ¿É¼Â %ld Ž»ö ½ÇÆÐ"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "\"%s\" ÆÄÀÏÀº GNU .mo Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "`msgstr' ºÎºÐÀÌ ºüÁ³½À´Ï´Ù"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "%d°³ÀÇ Ä¡¸íÀûÀÎ ¿À·ù¸¦ ã¾Ò½À´Ï´Ù"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "¿À·ù°¡ ³Ê¹« ¸¹¾Æ¼­ Áß´ÜÇÕ´Ï´Ù"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "¾Ë ¼ö ¾ø´Â Å°¿öµå \"%s\""
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "À߸øµÈ Á¦¾î ¼ø¼­¿­"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "¹®ÀÚ¿­ ³»ºÎ¿¡¼­ ÇàÀÌ ³¡³²"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "¹®ÀÚ¿­ ³»ºÎ¿¡¼­ ÆÄÀÏÀÌ ³¡³²"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "Ç¥ÁØ ÀÔ·Â"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr "%s:%d: °æ°í: ¿Ï°áµÇÁö ¾ÊÀº ¹®ÀÚ »ó¼ö"
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr "%s:%d: °æ°í: ¿Ï°áµÇÁö ¾ÊÀº ¹®ÀÚ¿­ »ó¼ö"
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr "--join-exeistingÀº Ãâ·ÂÀÌ Ç¥ÁØÃâ·Â¿¡ ¾²¿©Áú ¶§ »ç¿ëµÉ ¼ö ¾ø½À´Ï´Ù"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr "°æ°í: `%s' ÆÄÀÏÀÇ È®ÀåÀÚ `%s'¸¦ ¾Ë ¼ö ¾ø½À´Ï´Ù; C Çü½ÄÀ¸·Î °£ÁÖÇÔ"
+
+#: src/xgettext.c:544
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"»ç¿ë¹ý: %s [¿É¼Ç] ÀÔ·ÂÆÄÀÏ ...\n"
+"±ä ¿É¼Ç¿¡ ºÎ°¡µÇ´Â Àμö´Â ªÀº ¿É¼Ç¿¡µµ Àû¿ëµË´Ï´Ù.\n"
+" -a, --extract-all ¸ðµç ¹®ÀÚ¿­À» ÃßÃâÇÕ´Ï´Ù\n"
+" -c, --add-comments[=TAG] Ãâ·Â ÆÄÀÏ¿¡ TAG(¶Ç´Â Å°¿öµå Çà)°¡ Æ÷ÇÔµÈ ÁÖ¼®\n"
+" ºí·°À» µÓ´Ï´Ù\n"
+" -C, --c++ --language=C++ÀÇ ¾à½Ä Ç¥Çö\n"
+" --debug ´õ ÀÚ¼¼ÇÑ ¼­½Ä¹®ÀÚ¿­ ÀÎ½Ä °á°ú\n"
+" -d, --default-domain=NAME NAME.po·Î Ãâ·ÂÇÕ´Ï´Ù (messages.po ´ë½Å)\n"
+" -D, --directory=DIRECTORY ÀÔ·Â ÆÄÀÏ Å½»ö ¸í´Ü¿¡ DIRECTORY¸¦ Ãß°¡ÇÕ´Ï´Ù\n"
+" -e, --no-escape Ãâ·Â¿¡ C À̽ºÄÉÀÌÇÁ ¹®ÀÚ¸¦ ¾²Áö ¾Ê½À´Ï´Ù\n"
+" (³»Á¤°ª)\n"
+" -E, --escape Ãâ·Â¿¡ C À̽ºÄÉÀÌÇÁ ¹®ÀÚ¸¦ ¾²°í, È®Àå ¹®ÀÚ´Â\n"
+" ¾²Áö ¾Ê½À´Ï´Ù\n"
+" -f, --files-from=FILE FILE¿¡¼­ ÀÔ·Â ÆÄÀÏÀÇ ¸í´ÜÀ» ÀнÀ´Ï´Ù\n"
+" --force-po ºñ¾úÀ»Áö¶óµµ PO ÆÄÀÏ¿¡ ±â·ÏÇÕ´Ï´Ù\n"
+" --foreign-user ¿ÜºÎ »ç¿ëÀÚ¸¦ À§ÇØ FSF ÀúÀÛ±Ç Á¶Ç×À» Ãâ·Â¿¡¼­\n"
+" »ý·«ÇÕ´Ï´Ù\n"
+" -F, --sort-by-file ÆÄÀÏÀÇ À§Ä¡¿¡ µû¶ó Ãâ·ÂÀ» Á¤·ÄÇÕ´Ï´Ù\n"
+
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help ÀÌ µµ¿ò¸»À» º¸¿©ÁÖ°í Á¾·áÇÕ´Ï´Ù\n"
+" -i, --indent µé¿©¾²±âµÈ ÇüÅ·Π.po ÆÄÀÏ¿¡ ±â·ÏÇÕ´Ï´Ù\n"
+" -j, --join-existing Á¸ÀçÇÏ´Â ÆÄÀÏ¿¡ ¸Þ½ÃÁö¸¦ °áÇÕÇÕ´Ï´Ù\n"
+" -k, --keyword[=WORD] ºÎ°¡ÀûÀ¸·Î Ž»öÇÒ Å°¿öµå (WORD¸¦ ÁöÁ¤ÇÏÁö\n"
+" ¾Ê´Â °ÍÀÌ ³»Á¤µÈ Å°¿öµå¸¦ ¾²´Â °ÍÀ» ¶æÇÏÁø\n"
+" ¾Ê½À´Ï´Ù)\n"
+" -l, --string-limit=NUMBER ¹®ÀÚ¿­ÀÇ ±æÀ̸¦ %u ´ë½Å NUMBER·Î Á¦ÇÑÇÕ´Ï´Ù\n"
+" -L, --language=NAME ÁöÁ¤µÈ ¾ð¾î(C, C++, PO)¸¦ ÀνÄÇϸç, ±×·¸Áö ¸øÇÒ\n"
+" ¶§¿¡´Â ÆÄÀÏ È®ÀåÀÚ¸¦ º¸°í ÃßÃøÇÕ´Ï´Ù.\n"
+" -m, --msgstr-prefix[=STRING] msgstr Ç׸ñÀÇ Á¢µÎ»ç·Î STRINGÀ̳ª \"\"¸¦\n"
+" »ç¿ëÇÕ´Ï´Ù\n"
+" -M, --msgstr-suffix[=STRING] msgstr Ç׸ñÀÇ Á¢¹Ì»ç·Î STRINGÀ̳ª \"\"¸¦\n"
+" »ç¿ëÇÕ´Ï´Ù\n"
+" --no-location '#: filename:line' ÇàÀ» ¾²Áö ¾Ê½À´Ï´Ù\n"
+
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location '#: filename:line' ÇàÀ» »ý¼ºÇÕ´Ï´Ù (³»Á¤°ª)\n"
+" --omit-header Ç¥Á¦¿¡ `msgid \"\"' Ç׸ñÀ» ¾²Áö ¾Ê½À´Ï´Ù\n"
+" -o, --output=FILE ÁöÁ¤µÈ ÆÄÀÏ¿¡ Ãâ·ÂÀ» ±â·ÏÇÕ´Ï´Ù\n"
+" -p, --output-dir=DIR Ãâ·Â ÆÄÀÏÀ» DIR µð·ºÅ丮¿¡ °¡Á®´Ù ³õ½À´Ï´Ù\n"
+" -s, --sort-output Á¤·ÄµÈ Ãâ·ÂÀ» »ý¼ºÇÏ°í »çº»À» Áö¿ó´Ï´Ù\n"
+" --strict UniforumÀ» ¾ö°ÝÈ÷ µû¸£´Â .po ÆÄÀÏÀ» ¸¸µì´Ï´Ù\n"
+" -T, --trigraphs ÀԷ¿¡ ´ëÇØ ANSI C Æ®¸®±×¶óÇÁ¸¦ ÀνÄÇÕ´Ï´Ù\n"
+" -V, --version ¹öÀü Á¤º¸¸¦ Ãâ·ÂÇÏ°í Á¾·áÇÕ´Ï´Ù\n"
+" -w, --width=NUMBER Ãâ·Â ÆäÀÌÁö ÆøÀ» ¼³Á¤ÇÕ´Ï´Ù\n"
+" -x, --exclude-file=FILE FILE ¾ÈÀÇ Ç׸ñÀ» ÃßÃâÇÏÁö ¾Ê½À´Ï´Ù\n"
+"\n"
+"ÀÔ·ÂÆÄÀÏÀÌ - À̸é Ç¥ÁØ ÀÔ·ÂÀ» ÀÐ°Ô µË´Ï´Ù.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr "`%s' ¾ð¾î¸¦ ¾Ë ¼ö ¾øÀ½"
+
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "%s: °æ°í: Çì´õ Ç׸ñÀ» ãÁö ¸øÇßÀ½"
+
+#~ msgid "Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.\n"
+#~ msgstr "<bug-gnu-utils@gnu.ai.mit.edu>·Î ¹®Á¦Á¡À» º¸°íÇϽʽÿÀ.\n"
diff --git a/po/nl.gmo b/po/nl.gmo
new file mode 100644
index 0000000..ee8bf53
--- /dev/null
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
new file mode 100644
index 0000000..3077e17
--- /dev/null
+++ b/po/nl.po
@@ -0,0 +1,828 @@
+# Dutch translation for GNU gettext messages.
+# Copyright (C) 1996 Free Software Foundation, Inc.
+# Erick Branderhorst <Erick.Branderhorst@asml.nl>, 1996.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gettext 0.10.31\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1997-03-11 22:38 \n"
+"Last-Translator: Erick Branderhorst <Erick.Branderhorst@asml.nl>\n"
+"Language-Team: Dutch <nl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "Onbekende systeemfout"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: optie `%s' is ambiguous\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: optie `--%s' verwacht geen argument\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: optie `%c%s' verwacht geen argument\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: optie `%s' verwacht een argument\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: onbekende optie `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: onbekende optie `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ongeldige optie -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ongeldige optie -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: optie verwacht een argument -- %c\n"
+
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: optie `-W %s' is dubbelzinnig\n"
+
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: optie `-W %s' staat geen argument toe\n"
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Geen geheugen meer beschikbaar"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Kopierecht (C) %s Free Software Foundation, Inc. Dit is vrije\n"
+"programmatuur; zie de broncode voor kopieervoowaarden. Er is GEEN\n"
+"garantie; zelfs niet voor VERKOOPBAARHEID of GESCHIKTHEID VOOR EEN\n"
+"SPECIFIEK DOEL.\n"
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Geschreven door %s.\n"
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "ontbrekende argumenten"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "te veel argumenten"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Probeer `%s --help' voor meer informatie.\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Gebruik: %s [OPTIE] [[[TEXTDOMEIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEKSTDOMEIN haal vertaalde meldingen uit TEKSTDOMEIN\n"
+" -e maak expansie van enkele escape sequences mogelijk\n"
+" -E (genegeerd voor compatibiliteit)\n"
+" -h, --help toon hulp-tekst en bekindig programma\n"
+" -n onderdruk achtergevoegd nieuwe regel teken\n"
+" -V, --version toon versie-informatie en bekindig programma\n"
+" [TEXTDOMEIN] MSGID ontvang vertaalde meldingen corresponderend aan\n"
+" MSGID vanuit TEKSTDOMEIN\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Als de TEKSTDOMEIN parameter niet gegeven is, zal het domein worden bepaald\n"
+"door de omgevings variabele TEXTDOMAIN. Als de meldingen katalogus niet\n"
+"gevonden is in de gebruikelijke directory, kan een andere lokatie worden\n"
+"gespecificeerd met de omgevings variabele TEXTDOMAINDIR.\n"
+"Als optie `-s' gegeven is, gedraagt het programma zich als het `echo' commando.\n"
+"Maar het kopieert niet de argumenten naar standaard uitvoer. In plaats daarvan\n"
+"worden de in de katalogus gevonden meldingen vertaald.\n"
+"Standaard zoek directory: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+#, fuzzy
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr "Meld fouten via <bug-gnu-utils@prep.ai.mit.edu>.\n"
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"geonternationaliseerde meldingen mogen geen `\\%c' escape sequences bevatten"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "kan uitvoerbestand \"%s\" niet aanmaken"
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "standaard uitvoer"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "fout bij schrijven bestand \"%s\""
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "geen invoerbestanden gegeven"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "precies 2 invoerbestanden zijn benodigd"
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Gebruik: %s [OPTION] def.po ref.po\n"
+"Verplicht argumenten bij lange opties zijn ook verplicht bij korte opties.\n"
+" -D, --directory=DIRECTORY voeg DIRECTORY toe aan lijst waar invoerbestanden\n"
+" gezocht worden\n"
+" -h, --help toon hulp-tekst en bekindig programma\n"
+" -V, --version toon versie-informatie en bekindig programma\n"
+"\n"
+"Vergelijk twee Uniforum-stijl .po bestanden en kontroleer of beide dezelfde\n"
+"set van msgid strings bevatten. Het def.po bestand is een bestaand PO bestand\n"
+"met de oude vertalingen. Het ref.po bestand is het meest recente PO bestand\n"
+"(over het algemeen aangemaakt door xgettext). Het is belangrijk om te\n"
+"kontroleren of elke melding is vertaald in het programma. Wanneer een precieze\n"
+"overeenkomst niet gevonden kan wrden, zal fuzzy(vage) matching worden gebruikt,\n"
+"ter verkrijging van een betere diagnose.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "deze melding is gebruikt maar is niet gedefinieerd..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...maar de definitie is gelijksoortig"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "deze melding is gebruikt maar niet gedefinieerd in %s"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "waarschuwing: deze melding is niet gebruikt"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "dubbele melding definitie"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...dit is de lokatie van de eerste definitie"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "deze melding heeft geen definitie in het \"%s\" domein"
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "bij voorbereiden uitvoer"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s en %s zijn mutually exclusive"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr ""
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr ""
+
+#: src/msgcomm.c:400
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Gebruik: %s [OPTIE] INVOERBESTAND ...\n"
+"Verplichte argument bij lange opties zijn ook verplicht bij korte opties.\n"
+" -a, --extract-all extraheer alle strings\n"
+" -c, --add-comments[=TAG] plaats een kommentaar blok met TAG (of deze\n"
+" voorafgaande sleutelwoord regels) in uitvoer\n"
+" -C, --c++ herken C++ stijl kommentaar\n"
+" --debug meer gedetaileerde formatstring resultaat\n"
+" -d, --default-domain=NAAM gebruik NAAM.po voor uitvoer\n"
+" (in plaats van messages.po)\n"
+" -D, --directory=DIRECTORY zoek invoerbestanden ook in DIRECTORY\n"
+" -e, --no-escape gebruik geen C escapes in uitvoer (standaard)\n"
+" -E, --escape gebruik C escapes in uitvoer, geen extended\n"
+" karakters\n"
+" -f, --files-from=BESTAND haal lijst van invoerbestand uit BESTAND\n"
+" --force-po maak altijd een (eventueel leeg) PO bestand\n"
+" --foreign-user laat FSF kopierecht weg voor vreemde gebruiker\n"
+" -F, --sort-by-file sorteer uitvoer bij bestandslokatie\n"
+
+#: src/msgcomm.c:412
+#, fuzzy
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -n, --add-location voeg '#: filename:line' regels toe "
+"(standaard)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=BESTAND schrijf uitvoer naar gespecificeerd "
+"bestand\n"
+" -p, --output-dir=DIR plaats uitvoerbestanden in directory DIR\n"
+" -s, --sort-output sorteer uitvoer en verwijder dubbelen\n"
+" --strict uitvoer volgens strikte Uniforum stijl\n"
+" -T, --trigraphs accepteer ANSI C trigraphs als invoer\n"
+" -V, --version toon hulp-tekst en bekindig programma\n"
+" -w, --width=NUMMER stel pagina uitvoer breedte in\n"
+" -x, --exclude-file=BESTAND ingangen van BESTAND worden niet "
+"gekxtraheerd\n"
+"\n"
+"Als INVOERBESTAND - is, lees standaardinvoer.\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "fout tijdens openen om te lezen van \"%s\""
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "dit bestand mag geen domein directives bevatten"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "geen invoerbestand gegeven"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "fout bij openen om te schrijven van \"%s\""
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d vertaalde meldingen"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d vage vertalingen"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d onvertaalde meldingen"
+
+#: src/msgfmt.c:366
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Gebruik: %s [OPTIE] bestandsnaam.po ...\n"
+"Verplichte argument voor lange opties zijn ook verplicht voor korte opties.\n"
+" -a, --alignment=NUMMER lijn strings uit tot NUMMER bytes (standaard: %d)\n"
+" -c, --check voer taalafhankelijke kontrole uit op strings\n"
+" -D, --directory=DIRECTORY voeg DIRECTORY toe aan lijst van directories\n"
+" waarin invoerbestanden gezocht worden\n"
+" -f, --use-fuzzy gebruik vage ingangen in uitvoer\n"
+" -h, --help toon hulp-tekst en bekindig programma\n"
+" --no-hash binair bestand zal niet de hash tabel bevatten\n"
+" -o, --output-file=BESTAND uitvoerbestandsnaam is BESTAND\n"
+" --statistics toon statistieken van vertalingen\n"
+" --strict gebruik strikte Uniforum mode\n"
+" -v, --verbose laat invoerbestand anomalies zien\n"
+" -V, --version toon versie-informatie en bekindig programma\n"
+"\n"
+"Het meer dan eens geven van de -v optie verhoogt het verbosity nivo.\n"
+"\n"
+"Als invoerbestand - is, lees standaardinvoer. Als uitvoerbestand -\n"
+"is, schrijf uitvoer naar standaarduitvoer.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "tijdens aanmaken hash tabel"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "%s: let op: broncode bevat vage vertaling"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "domeinnaam \"%s\" niet bruikbaar als bestandsnaam"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr ""
+"domeinnaam \"%s\" niet bruikbaar als bestandsnaam: zal voorvoegsel gebruiken"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "`domein %s' directive genegeerd"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "lege `msgstr' entry genegeerd"
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "lege `msgstr' ingang genegeerd"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "header(??)veld `%s' ontbreekt in header(??)"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "header(??)veld `%s' moet starten aan het begin van de regel"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr ""
+"sommige header(??)velden hebben nog de oorspronkelijke standaard waarde"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "veld `%s' heeft nog de oorspronkelijke standaard waarde"
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "%s: let op: broncode bevat vage vertaling"
+
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "`msgid' en `msgstr' ingangen beginnen niet allebei met '\\n'"
+
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "`msgid' en `msgstr' ingangen eindigen niet allebei met '\\n'"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr "aantal formaat specificaties in `msgid' en `msgstr' zijn niet gelijk"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "formaat specificaties voor argument %u zijn niet dezelfde"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Gebruik: %s [OPTION] def.po ref.po\n"
+"Verplichte argumenten bij lange opties zijn ook verplicht bij korte opties.\n"
+" -D, --directory=DIRECTORY voeg DIRECTORY toe aan lijst waar van directories\n"
+" invoerbestanden gezocht worden\n"
+" -e, --no-escape gebruikt geen C escapes in uitvoer (standaard)\n"
+" -E, --escape gebruik C escapes in uitvoer, geen extended chars\n"
+" --force-po schrijf PO bestand zelfs als het leeg is\n"
+" -h, --help toon hulp-tekst en bekindig programma\n"
+" -i, --indent geondenteerde uitvoerstijl\n"
+" -o, --output-file=BESTAND resultaat wordt naar BESTAND geschreven\n"
+" --no-location onderdruk '#: bestandsnaam:regel' regels\n"
+" --add-location behoud '#: bestandsnaam:regel' regels (standaard)\n"
+" --strict stricte Uniforum uitvoerstijl\n"
+" -v, --verbose verhoog verbosity nivo\n"
+" -V, --version toon versie-informatie en bekindig programma\n"
+" -W, --width=NUMBER stel uitvoer pagina breedte in\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Voeg twee Uniforum stijl .po bestanden samen. Het def.po bestand is een\n"
+"bestaand PO bestand met de oude vertaling welke overgenomen zal worden in het\n"
+"nieuwe bestand als ze overeenkomen; kommentaren worden bewaard, maar\n"
+"extractie kommentaar en bestandspositie's worden buiten beschouwing gelaten.\n"
+"Het ref.po bestand is het laatst gekreeerd PO bestand (in het algemeen door\n"
+"xgettext), vertaling of kommentaren in dit bestand worden buiten beshouwing\n"
+"gelaten, maar punt kommentaar en bestandspositie's blijven bewaard.\n"
+"Als geen precieze overeenkomst gevonden kan worden, zal fuzzy matching gebruikt\n"
+"worden om betere resultaten te verkrijgen. De resultaten worden naar \n"
+"standaarduitvoer geschreven tenzij een uitvoerbestand is gespecificeerd.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%sLees %d oud + %d referentie, samengevoegd %d, fuzzied(gevaagd) %d, "
+"ontbrekend %d, overbodig %d.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " done.\n"
+
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Gebruik: %s [OPTIE] [BESTAND]...\n"
+"Verplichte argumenten voor lange opties zijn ook verplicht voor korte opties.\n"
+" -e, --no-escape gebruik geen C escapes in uitvoer (standaard)\n"
+" -E, --escape gebruik C escapes in uitvoer, geen extended\n"
+" karakters\n"
+" --force-po schrijf PO bestand zelfs als het leeg is\n"
+" -h, --help laat hulp-tekst zien en bekindig programma\n"
+" -i, --indent gebruik geindenteerde uitvoer-stijl\n"
+" -o, --output-file=FILE uitvoer gaat naar BESTAND\n"
+"\n"
+" --strict gebruik strikte Uniforum-stijl\n"
+" -V, --version toon versie-informatie en bekindig programma\n"
+" -w, --width=NUMMER stel uitvoer paginabreedte in\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Konverteer binaire .mo bestanden naar Uniforum-stijl .po bestanden.\n"
+"Zowel klein-endian en groot-endian .mo bestanden zijn toegestaan.\n"
+"Als invoerbestand - is of leeg, lees standaardinvoer.\n"
+"Standaard wordt de uitvoer gescreven naar standaarduitvoer.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "fout tijdens lezen \"%s\""
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "bestand \"%s\" ingekort"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "zoek \"%s\" offset %ld gefaald"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "bestand \"%s\" is geen GNU .mo bestand"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "ontbrekend `msgstr' gedeelte"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "%d fatale fouten gevonden"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "te veel fouten, afgebroken"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "sleutelwoord \"%s\" onbekend"
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "illegale kontrol sequence"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "einde-regel-teken in string"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "einde-bestand-teken in string"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "standaard invoer"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr "%s:%d: let op: niet getermineerde karakter konstante"
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr "%s:%d: let op: niet getermineerde string literal"
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+"--join-existing kan niet gebruikt worden indien uitvoer naar "
+"standaarduitvoer\n"
+"wordt geschreven"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr "let op: bestand `%s' extensie `%s' is onbekend; ga C proberen"
+
+#: src/xgettext.c:544
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Gebruik: %s [OPTIE] INVOERBESTAND ...\n"
+"Verplichte argument bij lange opties zijn ook verplicht bij korte opties.\n"
+" -a, --extract-all extraheer alle strings\n"
+" -c, --add-comments[=TAG] plaats een kommentaar blok met TAG (of deze\n"
+" voorafgaande sleutelwoord regels) in uitvoer\n"
+" -C, --c++ herken C++ stijl kommentaar\n"
+" --debug meer gedetaileerde formatstring resultaat\n"
+" -d, --default-domain=NAAM gebruik NAAM.po voor uitvoer\n"
+" (in plaats van messages.po)\n"
+" -D, --directory=DIRECTORY zoek invoerbestanden ook in DIRECTORY\n"
+" -e, --no-escape gebruik geen C escapes in uitvoer (standaard)\n"
+" -E, --escape gebruik C escapes in uitvoer, geen extended\n"
+" karakters\n"
+" -f, --files-from=BESTAND haal lijst van invoerbestand uit BESTAND\n"
+" --force-po maak altijd een (eventueel leeg) PO bestand\n"
+" --foreign-user laat FSF kopierecht weg voor vreemde gebruiker\n"
+" -F, --sort-by-file sorteer uitvoer bij bestandslokatie\n"
+
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help toon hulp-tekst en bekindig programma\n"
+" -i, --indent indenteer uitvoer\n"
+" -j, --join-existing voeg melding same met bestaand bestand\n"
+" -k, --keyword[=WOORD] additioneel sleutelwoord om naar te zoeken\n"
+" (WOORD = \"\": negeer standaard sleutelwoorden)\n"
+" -l, --string-limit=NUMMER string lengte limiet is NUMMER i.p.v. %u\n"
+" -L, --language=NAAM herken de gespecificeerde TAAL (C, C++, PO)\n"
+" -m, --msgstr-prefix[=STRING] gebruik STRING of \"\" als voorvoegsel voor\n"
+" msgstr ingangen\n"
+" -M, --msgstr-suffix[=STRING] gebruik STRING of \"\" als achtervoegsel voor\n"
+" msgstr ingangen\n"
+" --no-location geen '#: filename:line' regels\n"
+
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location voeg '#: filename:line' regels toe (standaard)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=BESTAND schrijf uitvoer naar gespecificeerd bestand\n"
+" -p, --output-dir=DIR plaats uitvoerbestanden in directory DIR\n"
+" -s, --sort-output sorteer uitvoer en verwijder dubbelen\n"
+" --strict uitvoer volgens strikte Uniforum stijl\n"
+" -T, --trigraphs accepteer ANSI C trigraphs als invoer\n"
+" -V, --version toon hulp-tekst en bekindig programma\n"
+" -w, --width=NUMMER stel pagina uitvoer breedte in\n"
+" -x, --exclude-file=BESTAND ingangen van BESTAND worden niet gekxtraheerd\n"
+"\n"
+"Als INVOERBESTAND - is, lees standaardinvoer.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr "taal `%s' onbekend"
+
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "%s: let op: geen header ingang gevonden"
+
+#~ msgid "Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.\n"
+#~ msgstr "Meld fouten via <bug-gnu-utils@prep.ai.mit.edu>.\n"
diff --git a/po/no.gmo b/po/no.gmo
new file mode 100644
index 0000000..38571d8
--- /dev/null
+++ b/po/no.gmo
Binary files differ
diff --git a/po/no.po b/po/no.po
new file mode 100644
index 0000000..6ded165
--- /dev/null
+++ b/po/no.po
@@ -0,0 +1,812 @@
+# Norwegian messages for GNU gettext. (bokmål dialect)
+# Copyright (C) 1996 Free Software Foundation, Inc.
+# Karl Anders Øygard <karlo@ifi.uio.no>, 1996.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.12\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1996-05-11 10:24 -0400\n"
+"Last-Translator: Karl Anders Øygard <karlo@ifi.uio.no>\n"
+"Language-Team: Norwegian-bokmål <no@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "Ukjent systemfeil"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: flagg «%s» er flertydig\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: flagg «--%s» tar ikke argumenter\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: flagg «%c%s» tar ikke argumenter\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: flagg «%s» behøver et argument\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: ukjent flagg «--%s»\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: ukjent flagg «%c%s»\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ulovlig flagg -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ugyldig flagg -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: flagg behøver et argument -- %c\n"
+
+#: lib/getopt.c:865
+#, fuzzy, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: flagg «%s» er flertydig\n"
+
+#: lib/getopt.c:883
+#, fuzzy, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: flagg «--%s» tar ikke argumenter\n"
+
+#: lib/xmalloc.c:82
+#, fuzzy
+msgid "Memory exhausted"
+msgstr "minnet oppbrukt"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "mangler argument"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "for mange argumenter"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, fuzzy, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Prøv «%s --help» for mer informasjon\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Bruk: %s [FLAGG] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN hent oversatte meldinger fra TEXTDOMAIN\n"
+" -e slå på ekspandering av noen escape-sekvenser\n"
+" -E (tillatt av kompatibilitetshensyn)\n"
+" -h, --help vis denne hjelpeteksten og avslutt\n"
+" -n undertrykk etterfølgende linjeskift\n"
+" -v, --version vis programversjon og avslutt\n"
+" [TEXTDOMAIN] MSGID hent oversatt melding som stemmer overens med MSGID\n"
+" fra TEXTDOMAIN\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Hvis TEXTDOMAIN-parameteren ikke er gitt, blir domenet valgt fra\n"
+"miljøvariabelen TEXTDOMAIN. Hvis meldingskatalogen ikke finnes i den\n"
+"vanlige filkatalogen, kan en annen filkatalog spesifiseres ved hjelp av\n"
+"miljøvariabelen TEXTDOMAIN.\n"
+"Når flagget -s blir brukt, oppfører programmet seg som kommandoen «echo».\n"
+"Programmet kopierer imidlertid ikke sine argumenter til standard ut. I\n"
+"stedet blir meldinger i den valgte katalogen oversatt.\n"
+"Standard søkekatalog er: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr ""
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"internasjonaliserte meldinger skal ikke inneholde escape-sekvensen «\\%c»"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "kan ikke opprette utfilen \"%s\""
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "standard ut"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "feil under skriving av filen \"%s\""
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "ingen innfiler spesifisert"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "behøver nøyaktig to innfiler"
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Bruk: %s [FLAGG] def.po ref.po\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -h, --help vis denne hjelpeteksten og avslutt\n"
+" -V, --version vis programversjon og avslutt\n"
+"\n"
+"Sammenligner to Uniforum .po-filer for å sjekke at begge inneholder det\n"
+"samme settet msgid-strenger. def.po-filen er en eksisterende PO-fil med de\n"
+"gamle oversettelsene. ref.po-filen er den sist genererte PO-filen\n"
+"(vanligvis generert med xgettext). Dette er nyttig for å sjekke at du har\n"
+"oversatt alle meldinger i programmet. Der en eksakt overensstemmelse ikke\n"
+"finnes, blir «fuzzy» sammenligning brukt for å få bedre diagnostikk.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "denne meldingen er brukt, men ikke definert..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "... men denne definisjonen ligner"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "denne meldingen er brukt, men ikke definert i %s"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "advarsel: denne meldingen er ikke brukt"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "duplisert definisjon av melding"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "... dette er lokasjonen til den første definisjonen"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "denne meldingen har ingen definisjon i \"%s\"-domenet"
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "under klargjøring av utdata"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s og %s utelukker hverandre"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr ""
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr ""
+
+#: src/msgcomm.c:400
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Bruk: %s [FLAGG] INNFIL ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -a, --extract-all ekstrahér alle strenger\n"
+" -c, --add-comments[=TAG] lagre kommentarblokker med TAG (eller\n"
+" kommentarer i linjer som kommer foran\n"
+" nøkkelord) i utfilen\n"
+" -C, --c++ kjenn igjen C++-kommentarer\n"
+" --debug mer detaljert resultat fra igjenkjenning av\n"
+" formatstreng\n"
+" -d, --default-domain=NAVN lagre utdata i NAVN.po (i stedet for\n"
+" messages.po)\n"
+" -D, --directory=FILKATALOG skift til FILKATALOG før prosessering\n"
+" -e, --no-escape ikke bruk C-escapekoder i utdata (forvalgt)\n"
+" -E, --escape bruk C-escapekoder i utdata, ingen utvidede tegn\n"
+" -f, --files-from=FIL hent liste av innfiler fra FIL\n"
+" --force-po skriv PO-fil selv om den vil bli tom\n"
+" -F, --sort-by-file sorter utdata etter fil-lokasjon\n"
+
+#: src/msgcomm.c:412
+#, fuzzy
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -n, --add-location lag '#: filenavn:linje'-linjer (forvalgt)\n"
+" --omit-header ikke lag startseksjon med «msgid \"\"»\n"
+" -p, --output-dir=KAT plassér utfiler i filkatalogen KAT\n"
+" -s, --sort-output sortér utdata og ta bort duplikater\n"
+" --strict lag strengt Uniforum-konform .po-fil\n"
+" -T, --trigraphs forstå ANSI C trigraphs i inndata\n"
+" -V, --version vis programversjon og avslutt\n"
+" -w, --width=NUMMER sett sidestørrelse for utdata\n"
+" -x, --exclude-file=FIL innslag fra FIL blir ikke ekstrahert\n"
+"\n"
+"Dersom INNFIL er -, vil det bli lest fra standard inn.\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "feil under åpning av «%s» for lesing"
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "denne filen kan ikke inneholde domene-nøkkelord"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "ingen innfil spesifisert"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "feil under åpning av \"%s\" for skriving"
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d oversatte meldinger"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d antatte oversettelser"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d uoversatte meldinger"
+
+#: src/msgfmt.c:366
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Bruk: %s [FLAGG] filnavn.po ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -a, --alignment=ANTALL justér strenger til ANTALL bytes (forvalgt: %d)\n"
+" -c, --check gjør språkavhengige tester på strengene\n"
+" -D, --directory=FILKATALOG legg FILKATALOG til kataloger å søke i\n"
+" -f, --use-fuzzy bruk antatte linjer i utdata\n"
+" -h, --help vis denne hjelpeteksten og avslutt\n"
+" --no-hash binærfil skal ikke inneholde hash-tabell\n"
+" -o, --output-file=FILNAVN sett utfil til FILNAVN\n"
+" --statistics\n"
+" --strict lag strengt Uniforum-konform .po-fil\n"
+" -v, --verbose list alle avvik i innfil\n"
+" -V, --version vis programversjon og avslutt\n"
+"\n"
+"Dersom flagget -v blir gitt flere ganger, gis mer fyldige meldinger.\n"
+"\n"
+"Hvis innfil er -, vil inndata bli lest fra standard inn. Dersom utfil er -,\n"
+"vil utdata bli skrevet til standard ut.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "mens hash-tabellen ble laget"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "ADVARSEL: kildefil har antatte oversettelser"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "domenenavnet \"%s\" passer ikke som filnavn"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr "domenenavnet \"%s\" passer ikke som filnavn: bruker prefiks"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "nøkkelord «domain %s» ignorert"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "tom «msgstr»-linje ignorert"
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "antatt «msgstr»-linje ignorert"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "filhodefelt «%s» mangler i filhode"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "filhodefelt «%s» skulle ha startet ved begynnelsen av linjen"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr "noen filhodefelt har fremdeles sin initielle verdi"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "feltet «%s» har fremdeles sin forvalgte verdi"
+
+#: src/msgfmt.c:673
+#, fuzzy, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "ADVARSEL: kildefil har antatte oversettelser"
+
+#: src/msgfmt.c:875
+#, fuzzy
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "«msgid»- og «msgstr»-verdiene begynner ikke begge med '\\n'"
+
+#: src/msgfmt.c:883
+#, fuzzy
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "«msgid»- og «msgstr»-verdiene slutter ikke begge med '\\n'"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr ""
+"antall format-spesifiseringer i «msgid» og «msgstr» stemmer ikke overens"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "format-spesifiseringene for argument %u er ulike"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Bruk: %s [FLAGG] INNFIL ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -D, --directory=FILKATALOG legg FILKATALOG til kataloger å søke i\n"
+" -e, --no-escape ikke bruk C-escapekoder i utdata (forvalgt)\n"
+" -E, --escape bruk C-escapekoder i utdata, ingen utvidede tegn\n"
+" -h, --help vis denne hjelpeteksten og avslutt\n"
+" -i, --indent indentert utdata\n"
+" -o, --output-file=FIL resultat blir skrevet til FIL\n"
+" --strict lag strengt Uniforum-konformt utdata\n"
+" -v, --verbose gi mer fyldige meldinger\n"
+" -V, --version vis programversjon og avslutt\n"
+" -w, --width=NUMMER sett sidestørrelse for utdata\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Fletter sammen to Uniforum .po-filer. def.po-filen er en eksisterende\n"
+"PO-fil med gamle oversettelser, som vil bli overført til den nye filen\n"
+"dersom de fremdeles stemmer. Kommentarer blir tatt med, men kommentarer om\n"
+"selve ekstraheringen og fil-posisjoner blir slettet. ref.po-filen er den\n"
+"sist genererte PO-filen (vanligvis generert med xgettext). Oversettelser\n"
+"eller kommentarer i denne filen blir slettet, men punktum-kommentarer og\n"
+"fil-posisjoner blir ivaretatt. Der det ikke lar seg gjøre å finne en\n"
+"eksakt overensstemmelse, blir «fuzzy» sammenligning brukt for å få bedre\n"
+"resultater. Resultatet blir skrevet til standard ut, med mindre en utfil\n"
+"er spesifisert.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%sLeste %d gamle + %d referanser, flettet %d, antok %d, mangler %d,\n"
+"foreldete %d.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " ferdig.\n"
+
+#: src/msgunfmt.c:215
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Bruk: %s [FLAGG] INNFIL ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -e, --no-escape ikke bruk C-escapekoder i utdata (forvalgt)\n"
+" -E, --escape bruk C-escapekoder i utdata, ingen utvidede tegn\n"
+" -h, --help vis denne hjelpeteksten og avslutt\n"
+" -i, --indent indentert utdata\n"
+" -o, --output-file=FIL resultat blir skrevet til FIL i stedet for\n"
+" standard ut\n"
+" --strict lag strengt Uniforum-konformt utdata\n"
+" -V, --version vis programversjon og avslutt\n"
+" -w, --width=NUMMER sett sidestørrelse for utdata\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Konverter binære .mo-filer til Uniforum .po-filer.\n"
+"Både «little-endian» og «big-endian» .mo filer blir håndtert.\n"
+"Dersom innfil er -, blir standard inn lest.\n"
+"Dersom intet annet er spesifisert, blir det skrevet til standard ut.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "feil under lesing av \"%s\""
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "filen \"%s\" er avkuttet"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "«seek» \"%s\" posisjon %ld feilet"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "filen \"%s\" er ikke i GNU .mo-format"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "mangler «msgstr»-seksjon"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "fant %d fatale feil"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "for mange feil, avslutter"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "nøkkelord \"%s\" ukjent"
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "ulovlig kontrollsekvens"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "slutt-på-linje inne i streng"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "slutt-på-fil inne i streng"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "standard inn"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr ""
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr ""
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+"--join-existing kan ikke brukes når utdata blir skrevet til standard ut"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, fuzzy, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr "advarsel: typen til fil «%s» med ekstensjon «%s» er ukjent, forsøker C"
+
+#: src/xgettext.c:544
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Bruk: %s [FLAGG] INNFIL ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -a, --extract-all ekstrahér alle strenger\n"
+" -c, --add-comments[=TAG] lagre kommentarblokker med TAG (eller\n"
+" kommentarer i linjer som kommer foran\n"
+" nøkkelord) i utfilen\n"
+" -C, --c++ kjenn igjen C++-kommentarer\n"
+" --debug mer detaljert resultat fra igjenkjenning av\n"
+" formatstreng\n"
+" -d, --default-domain=NAVN lagre utdata i NAVN.po (i stedet for\n"
+" messages.po)\n"
+" -D, --directory=FILKATALOG skift til FILKATALOG før prosessering\n"
+" -e, --no-escape ikke bruk C-escapekoder i utdata (forvalgt)\n"
+" -E, --escape bruk C-escapekoder i utdata, ingen utvidede tegn\n"
+" -f, --files-from=FIL hent liste av innfiler fra FIL\n"
+" --force-po skriv PO-fil selv om den vil bli tom\n"
+" -F, --sort-by-file sorter utdata etter fil-lokasjon\n"
+
+#: src/xgettext.c:564
+#, fuzzy, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help vis denne hjelpeteksten og avslutt\n"
+" -i, --indent skriv .po-filen med indentering\n"
+" -j, --join-existing flett sammen meldinger med eksisterende fil\n"
+" -k, --keyword[=ORD] se også etter nøkkelordet ORD (mangler ORD,\n"
+" skal heller ikke vanlige nøkkelord brukes)\n"
+" -l, --string-limit=NUMMER sett største streng-lengde til NUMMER\n"
+" i stedet for %u\n"
+" -m, --msgstr-prefix[=STRENG] bruk STRENG eller \"\" som prefiks for\n"
+" msgstr-verdier\n"
+" -M, --msgstr-suffix[=STRENG] bruk STRENG eller \"\" som suffiks for\n"
+" msgstr-verdier\n"
+" --no-location ikke lag '#: filnavn:linje'-linjer\n"
+
+#: src/xgettext.c:578
+#, fuzzy, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location lag '#: filenavn:linje'-linjer (forvalgt)\n"
+" --omit-header ikke lag startseksjon med «msgid \"\"»\n"
+" -p, --output-dir=KAT plassér utfiler i filkatalogen KAT\n"
+" -s, --sort-output sortér utdata og ta bort duplikater\n"
+" --strict lag strengt Uniforum-konform .po-fil\n"
+" -T, --trigraphs forstå ANSI C trigraphs i inndata\n"
+" -V, --version vis programversjon og avslutt\n"
+" -w, --width=NUMMER sett sidestørrelse for utdata\n"
+" -x, --exclude-file=FIL innslag fra FIL blir ikke ekstrahert\n"
+"\n"
+"Dersom INNFIL er -, vil det bli lest fra standard inn.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr ""
+
+#, fuzzy
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "advarsel: intet filhode funnet"
+
+#~ msgid "this is the location of the first definition"
+#~ msgstr "den første definisjonen finnes her"
+
+#~ msgid "duplicate message ID"
+#~ msgstr "duplisert meldings-id"
diff --git a/po/no@nynorsk.gmo b/po/no@nynorsk.gmo
new file mode 100644
index 0000000..a952a99
--- /dev/null
+++ b/po/no@nynorsk.gmo
Binary files differ
diff --git a/po/no@nynorsk.po b/po/no@nynorsk.po
new file mode 100644
index 0000000..533b380
--- /dev/null
+++ b/po/no@nynorsk.po
@@ -0,0 +1,818 @@
+# Norwegian messages for GNU gettext. (nynorsk dialect)
+# Copyright (C) 1996 Free Software Foundation, Inc.
+# Karl Anders Øygard <karlo@ifi.uio.no>, 1996.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1996-03-21 08:46 EST\n"
+"Last-Translator: Karl Anders Øygard <karlo@ifi.uio.no>\n"
+"Language-Team: Norwegian-nynorsk <no@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr ""
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: flagg «%s» er fleirtydig\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: flagg «--%s» tek ikkje argument\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: flagg «%c%s» tek ikkje argument\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: flagg «%s» treng eit argument\n"
+
+#. --option
+#: lib/getopt.c:755
+#, fuzzy, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: ulovleg flagg -- %c\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, fuzzy, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: ulovleg flagg -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ulovleg flagg -- %c\n"
+
+#: lib/getopt.c:788
+#, fuzzy, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ulovleg flagg -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: flagg treng eit argument -- %c\n"
+
+#: lib/getopt.c:865
+#, fuzzy, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: flagg «%s» er fleirtydig\n"
+
+#: lib/getopt.c:883
+#, fuzzy, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: flagg «--%s» tek ikkje argument\n"
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr ""
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "manglar argument"
+
+#: src/gettextp.c:164
+#, fuzzy
+msgid "too many arguments"
+msgstr "manglar argument"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, fuzzy, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Prøv «%s --help» for meir informasjon\n"
+
+#: src/gettextp.c:233
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Bruk: %s [FLAGG] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN hent oversette meldingar frå TEXTDOMAIN\n"
+" -e slå på ekspansjon av nokre escape-sekvensar\n"
+" -E (tillete av kompatibilitetsomsyn)\n"
+" -h, --help vis denne hjelpeteksta og avslutt\n"
+" -n undertrykk etterfølgjande linjeskift\n"
+" -v, --version vis programversjon og avslutt\n"
+" [TEXTDOMAIN] MSGID hent oversett melding som stemmer overeins med\n"
+" MSGID frå TEXTDOMAIN\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Dersom TEXTDOMAIN-parameteren ikkje er gjeven, vert domenet valgt frå\n"
+"miljø-variabelen TEXTDOMAIN. Dersom meldingskatalogen ikkje finst i den\n"
+"vanlege filkatalogen, kan ein annan filkatalog spesifiserast ved hjelp av\n"
+"miljø-variabelen TEXTDOMAIN.\n"
+"Når flagget -s vert brukt, oppfører programmet seg som kommandoen «echo»,\n"
+"men gjer ikkje ein enkel kopiering av argumenta sine til standard ut. I\n"
+"staden vert meldingar som er funne i den valgte katalogen oversatt.\n"
+"Standard søkekatalog er: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr ""
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"internasjonaliserte meldingar skal ikkje innehalde escape-sekvensen «\\%c»"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "kan ikkje skape utfila \"%s\""
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr ""
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "feil under skriving av fila \"%s\""
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+#, fuzzy
+msgid "no input files given"
+msgstr "inga innfil spesifisert"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "treng nøyaktig to innfiler"
+
+#: src/msgcmp.c:186
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Bruk: %s [FLAGG] def.po ref.po\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -h, --help vis denne hjelpeteksta og avslutt\n"
+" -V, --version vis programversjon og avslutt\n"
+"\n"
+"Samanliknar to Uniforum .po-filer for å sjekke at begge inneheld det samme\n"
+"settet msgid-strengar. def.po-filen er ein eksisterende PO-fil med dei\n"
+"gamle oversetjingane. ref.po-filen er den sist genererte PO-fila\n"
+"(vanligvis generert med xgettext). Dette er nyttig for å sjekke at du har\n"
+"oversett alle meldingar i programmet. Der samsvar ikkje kan finnast, vert\n"
+"«fuzzy» samanlikning brukt for å få betre diagnostikk.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "denne meldinga er brukt, men ikkje definert..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "... men denne definisjonen liknar"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "denne meldinga er brukt, men ikkje definert i %s"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "advarsel: denne meldinga er ikkje brukt"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr ""
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+#, fuzzy
+msgid "...this is the location of the first definition"
+msgstr "den første definisjonen finst her"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "denne meldinga har ingen definisjon i \"%s\"-domenet"
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "under klargjering av utdata"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s og %s utelukker kvarandre"
+
+#: src/msgcomm.c:341
+#, fuzzy
+msgid "at least two files must be specified"
+msgstr "nøyaktig to filer må spesifiserast"
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr ""
+
+#: src/msgcomm.c:400
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Bruk: %s [FLAGG] INNFIL ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -a, --extract-all ekstrahér alle strengar\n"
+" -c, --add-comments[=TAG] lagre kommentarblokker med TAG (eller\n"
+" kommentarar i linjer som kjem foran\n"
+" nøkkelord) i utfila\n"
+" -C, --c++ kjenn igjen C++-kommentarar\n"
+" -d, --default-domain=NAVN lagre utdata i NAVN.po (i staden for\n"
+" messages.po)\n"
+" -D, --directory=FILKATALOG skift til FILKATALOG før prosessering\n"
+" -e, --no-escape ikkje bruk C-escapekoder i utdata (forvalgt)\n"
+" -E, --escape bruk C-escapekoder i utdata, ingen utvida teikn\n"
+" -f, --files-from=FIL hent liste av innfiler frå FIL\n"
+" -F, --sort-by-file sorter utdata etter fil-lokasjon\n"
+" -h, --help vis denne hjelpeteksta og avslutt\n"
+" -i, --indent lag indentert utdata\n"
+" -j, --join-existing flett saman meldingar med eksisterande fil\n"
+
+#: src/msgcomm.c:412
+#, fuzzy
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -p, --output-dir=KAT plassér utfiler i filkatalogen KAT\n"
+" -s, --sort-output sortér utdata og ta bort duplikat\n"
+" --strict lag strengt Uniforum-konform .po-fil\n"
+" -T, --trigraphs forstå ANSI C trigraphs i inndata\n"
+" -v, --verbose gje fyldige advarslar\n"
+" -v, --version vis programversjon og avslutt\n"
+" -x, --exclude-file=FIL innslag frå FIL vert ikkje ekstrahert\n"
+"\n"
+"Dersom INNFIL er -, vil det verte lese frå standard inn.\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, fuzzy, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "feil under skriving av fila \"%s\""
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "denne fila kan innehalde domene-nøkkelord"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "inga innfil spesifisert"
+
+#: src/msgfmt.c:321
+#, fuzzy, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "feil under skriving av fila \"%s\""
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr ""
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ""
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ""
+
+#: src/msgfmt.c:366
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Bruk: %s [FLAGG] filnavn.po ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -a, --alignment=ANTALL justér strengar til ANTALL bytes (forvalgt: %d)\n"
+" -h, --help vis denne hjelpeteksta og avslutt\n"
+" --no-hash binærfil skal ikkje innehalde hash-tabell\n"
+" -o, --output-file=FILNAVN sett utfil til FILNAVN\n"
+" --strict lag strengt Uniforum-konform .po-fil\n"
+" -v, --verbose list alle avvik i innfil\n"
+" -V, --version vis programversjon og avslutt\n"
+"\n"
+"Dersom innfil er -, vil inndata verte lest frå standard inn. Dersom utfil\n"
+"er -, vil utdata verte skrive til standard ut.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "mens hash-tabellen vart laga"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "advarsel: denne meldinga er ikkje brukt"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "domenenamn \"%s\" passar ikkje som filnavn"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr "domenenamnet \"%s\" passar ikkje som filnavn: brukar prefiks"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr ""
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr ""
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr ""
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr ""
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr ""
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr ""
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr ""
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr ""
+
+#: src/msgfmt.c:875
+#, fuzzy
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "«msgid»- og «msgstr»-verdiane byrjarr ikkje båe med '\\n'"
+
+#: src/msgfmt.c:883
+#, fuzzy
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "«msgid»- og «msgstr»-verdiane sluttar ikkje båe med '\\n'"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr ""
+"antall format-spesifiseringar i «msgid» og «msgstr» stemmer ikkje overeins"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "format-spesifiseringane for argument %u er ulike"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Bruk: %s [FLAGG] INNFIL ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -e, --no-escape ikkje bruk C-escapekoder i utdata (forvalgt)\n"
+" -E, --escape bruk C-escapekoder i utdata, ingen utvida teikn\n"
+" -h, --help vis denne hjelpeteksta og avslutt\n"
+" -i, --indent indentert utdata\n"
+" -o, --output-file=FIL resultat vert skrive til FIL\n"
+" -S, --strict lag strengt Uniforum-konformt utdata\n"
+" -V, --version vis programversjon og avslutt\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Fletter saman to Uniforum .po-filer. def.po-filen er ei eksisterande\n"
+"PO-fil med gamle oversetjingar, som vil verte overført til den nye fila\n"
+"dersom dei framleis stemmer. Kommentarar vert teke med, men kommentarer om\n"
+"sjølve ekstraheringa og fil-posisjoner vert sletta. ref.po-filen er den\n"
+"sist genererte PO-fila (vanlegvis generert med xgettext). Oversetjingar\n"
+"eller kommentarer i denne fila vert sletta, men punktum-kommentarer og\n"
+"fil-posisjonar vert teke vare på. Der det ikkje er mogleg å finne ei\n"
+"eksakt overeinsstemming, vert «fuzzy» samanlikning brukt for å få betre\n"
+"resultat. Resultatet vert skrive til standard ut, med mindre ei utfil er\n"
+"spesifisert.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr ""
+
+#: src/msgunfmt.c:215
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Bruk: %s [FLAGG] INNFIL ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -e, --no-escape ikkje bruk C-escapekoder i utdata (forvalgt)\n"
+" -E, --escape bruk C-escapekoder i utdata, ingen utvida teikn\n"
+" -h, --help vis denne hjelpeteksta og avslutt\n"
+" -i, --indent indentert utdata\n"
+" -o, --output-file=FIL resultat vert skrive til FIL\n"
+" -S, --strict lag strengt Uniforum-konformt utdata\n"
+" -V, --version vis programversjon og avslutt\n"
+
+#: src/msgunfmt.c:229
+#, fuzzy, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Konverter binære .mo-filer til Uniforum .po-filer. Både «little-endian» og\n"
+"«big-endian» .mo filer vert håndtert. Dersom innfil er -, blir standard\n"
+"inn lest. Dersom utfil er -, vert det skrive til standard ut.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, fuzzy, c-format
+msgid "error while reading \"%s\""
+msgstr "feil under skriving av fila \"%s\""
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "filen \"%s\" er avkutta"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "«seek» \"%s\" posisjon %ld feila"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "fila \"%s\" er ikkje i GNU .mo-format"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "manglar «msgstr»-seksjon"
+
+#: src/po-lex.c:84
+#, fuzzy, c-format
+msgid "found %d fatal errors"
+msgstr "%s: fann %d fatale feil"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+#, fuzzy
+msgid "too many errors, aborting"
+msgstr "%s: for mange feil, avsluttar"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr ""
+
+#: src/po-lex.c:335
+msgid "invalid control sequence"
+msgstr ""
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr ""
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr ""
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr ""
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr ""
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr ""
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr ""
+
+#: src/xgettext.c:544
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Bruk: %s [FLAGG] INNFIL ...\n"
+"Obligatoriske argumenter til lange flagg er obligatoriske også til korte flagg.\n"
+" -a, --extract-all ekstrahér alle strengar\n"
+" -c, --add-comments[=TAG] lagre kommentarblokker med TAG (eller\n"
+" kommentarar i linjer som kjem foran\n"
+" nøkkelord) i utfila\n"
+" -C, --c++ kjenn igjen C++-kommentarar\n"
+" -d, --default-domain=NAVN lagre utdata i NAVN.po (i staden for\n"
+" messages.po)\n"
+" -D, --directory=FILKATALOG skift til FILKATALOG før prosessering\n"
+" -e, --no-escape ikkje bruk C-escapekoder i utdata (forvalgt)\n"
+" -E, --escape bruk C-escapekoder i utdata, ingen utvida teikn\n"
+" -f, --files-from=FIL hent liste av innfiler frå FIL\n"
+" -F, --sort-by-file sorter utdata etter fil-lokasjon\n"
+" -h, --help vis denne hjelpeteksta og avslutt\n"
+" -i, --indent lag indentert utdata\n"
+" -j, --join-existing flett saman meldingar med eksisterande fil\n"
+
+#: src/xgettext.c:564
+#, fuzzy, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -k, --keyword[=ORD] sjå også etter nøkkelordet ORD (manglar ORD,\n"
+" skal ikkje dei vanlege nøkkelorda nyttast)\n"
+" -l, --string-limit=NUMMER sett største streng-lengde til NUMMER\n"
+" i staden for %u\n"
+" -m, --msgstr-prefix[=STRENG] bruk STRENG eller \"\" som prefiks for\n"
+" msgstr-verdiar\n"
+" -M, --msgstr-suffix[=STRENG] bruk STRENG eller \"\" som suffiks for\n"
+" msgstr-verdiar\n"
+" --no-location ikkje lag «#: filnavn:linje»-linjer\n"
+" -n, --add-location lag «#: filenavn:linje»-linjer (forvalgt)\n"
+" --omit-header ikkje lag startseksjon med «msgid \"\"»\n"
+
+#: src/xgettext.c:578
+#, fuzzy, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -p, --output-dir=KAT plassér utfiler i filkatalogen KAT\n"
+" -s, --sort-output sortér utdata og ta bort duplikat\n"
+" --strict lag strengt Uniforum-konform .po-fil\n"
+" -T, --trigraphs forstå ANSI C trigraphs i inndata\n"
+" -v, --verbose gje fyldige advarslar\n"
+" -v, --version vis programversjon og avslutt\n"
+" -x, --exclude-file=FIL innslag frå FIL vert ikkje ekstrahert\n"
+"\n"
+"Dersom INNFIL er -, vil det verte lese frå standard inn.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr ""
+
+#~ msgid "this is the location of the first definition"
+#~ msgstr "den første definisjonen finst her"
+
+#~ msgid "cannot change to directory \"%s\""
+#~ msgstr "kan ikkje skifte til filkatalog \"%s\""
+
+#~ msgid "cannot change back to directory \"%s\""
+#~ msgstr "kan ikkje skifte tilbake til filkatalog \"%s\""
+
+#~ msgid "found %d errors"
+#~ msgstr "fann %d feil"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION] filename.mo filename.po\n"
+#~ "Mandatory arguments to long options are mandatory for short options too.\n"
+#~ " -e, --no-escape do not use C escapes in output (default)\n"
+#~ " -E, --escape use C escapes in output, no extended chars\n"
+#~ " -h, --help display this help and exit\n"
+#~ " -i, --indent write indented output style\n"
+#~ " -S, --strict\t write strict uniforum style\n"
+#~ " -V, --version output version information and exit\n"
+#~ msgstr ""
+#~ "Bruk: %s [FLAGG] INNFIL ...\n"
+#~ "Obligatoriske argumenter til lange flagg er obligatoriske også til korte "
+#~ "flagg.\n"
+#~ " -e, --no-escape ikkje bruk C-escapekoder i utdata (forvalgt)\n"
+#~ " -E, --escape bruk C-escapekoder i utdata, ingen utvideda "
+#~ "teikn\n"
+#~ " -h, --help vis denne hjelpeteksta og avslutt\n"
+#~ " -i, --indent lag indentert utdata\n"
+#~ " -S, --strict\t lag utdata som er strengt Uniforum-konformt\n"
+#~ " -V, --version vis programversjon og avslutt\n"
diff --git a/po/pl.gmo b/po/pl.gmo
new file mode 100644
index 0000000..a1e402b
--- /dev/null
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..89b5941
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,819 @@
+# Polish translations for the GNU gettext messages
+# Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Rafa³ Maszkowski <rzm@pdi.net>, 1995-1998
+# Piotr Pogorzelski <ppogorze@ippt.gov.pl>, 1995
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.35\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1998-08-05 15:00+0200\n"
+"Last-Translator: Rafa³ Maszkowski <rzm@pdi.net>\n"
+"Language-Team: Polish <pl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "Nieznany b³±d systemu"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: opcja: `%s' jest niejednoznaczna\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: opcja `--%s' nie mo¿e mieæ argumentu\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: opcja `%c%s' nie mo¿e mieæ argumentu\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: opcja `%s' wymaga argumentu\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: nieznana opcja `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: nieznana opcja `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: niedozwolona opcja -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: b³êdna opcja -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: opcja wymaga argumentu -- %c\n"
+
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: opcja `-W %s' jest niejednoznaczna\n"
+
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: opcja `-W %s' nie mo¿e mieæ argumentu\n"
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "pamiêæ wyczerpana"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"Ten program jest darmowy; warunki kopiowania s± opisane w ¼ród³ach.\n"
+"Autorzy nie daj± ¯ADNYCH gwarancji, w tym nawet gwarancji SPRZEDAWALNO¦CI\n"
+"lub PRZYDATNO¦CI DO KONKRETNYCH CELÓW.\n"
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Zapisane przez %s.\n"
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "brakuj±ce argumenty"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "za du¿o argumentów"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Spróbuj `%s --help' ¿eby otrzymaæ wiêcej informacji.\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"U¿ycie: %s [OPCJA] [[TEXTDOMAIN] MSGID | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN wydob±d¼ przet³umaczone komunikaty z TEXTDOMAIN\n"
+" -e w³±cz rozwijanie niektórych sekwencji escape\n"
+" -E (ignorowane, dla kompatybilno¶ci)\n"
+" -h, --help wy¶wietl ten opis i zakoñcz\n"
+" -n wy³±cz koñcowy znak nowej linii\n"
+" -V, --version wy¶wietl informacjê o wersji i zakoñcz\n"
+" [TEXTDOMAIN] MSGID wydob±d¼ przet³umaczony komunikat odpowiadaj±cy\n"
+" MSGID z TEXTDOMAIN\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Je¿eli parametr TEXTDOMAIN nie jest podany, domena jest wyznaczana ze zmiennej\n"
+"¶rodowiska TEXTDOMAIN. Je¿eli katalog komunikatów nie zostanie znaleziony w\n"
+"zwyk³ym katalogu, inna lokalizacja mo¿e byæ podana przez zmienn± ¶rodowiska\n"
+"TEXTDOMAINDIR.\n"
+"Je¿eli u¿yty z opcj± -s, program zachowuje siê jak komenda `echo', ale zamiast\n"
+"kopiowaæ argumenty na standardowe wyj¶cie t³umaczy komunikaty znalezione w\n"
+"wybranym katalogu.\n"
+"Domy¶lnie przeszukiwany katalog: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr "Raporty o b³êdach wysy³aj do bug-gnu-utils@gnu.org\n"
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr "umiêdzynaradawiane komunikaty nie powinny zawieraæ sekwenji `\\%c'"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "nie mogê utworzyæ pliku wyj¶ciowego \"%s\""
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "standardowe wyj¶cie"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "b³±d podczas pisania do pliku \"%s\""
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "nie podano nazw plików wej¶ciowych"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "wymagane s± dok³adnie dwa pliki wej¶ciowe"
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"U¿ycie: %s [OPCJA] def.po ref.po\n"
+"Argumenty obowi±zkowe dla opcji d³ugich obowi±zuj± równie¿ dla krótkich.\n"
+" -D, --directory=KATALOG szukaj plików wej¶ciowych równie¿ w KATALOGu\n"
+" -h, --help wy¶wietl ten opis i zakoñcz\n"
+" -V, --version wy¶wietl informacjê o wersji i zakoñcz\n"
+"\n"
+"Porównaj dwa pliki .po w stylu Uniforum, ¿eby sprawdziæ czy zawieraj± te\n"
+"same zbiory ³añcuchów msgid. Plik def.po to istniej±cy plik PO ze starymi\n"
+"t³umaczeniami. Plik ref.po jest ostatnio utworzonym plikiem PO \n"
+"(zwykle przez xgettext). Jest to przydatne do stwierdzenia czy wszystkie\n"
+"komunikaty w programie zosta³y przet³umaczone. Tam gdzie nie mo¿na\n"
+"porównaæ dok³adnie u¿ywane jest porównanie rozmyte, dla lepszej diagnostyki.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "ten komunikat jest u¿yty, ale nie zdefiniowany..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...ale ta definicja jest podobna"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "ten komunikat jest u¿yty, ale nie zdefiniowany w %s"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "uwaga: ten komunikat nie jest u¿yty"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "podwójna definicja komunikatu"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...to jest po³o¿enie pierwszej definicji"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "ten komunikat nie ma definicji w domenie \"%s\""
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "podczas przygotowywania wyniku"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s i %s wzajemnie siê wykluczaj±"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr "musz± byæ podane przynajmniej dwa pliki"
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr "podane niemo¿liwe kryteria selekcji (%d < n < %d)"
+
+#: src/msgcomm.c:400
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"U¿ycie: %s [OPCJA] PLIK_WEJ¦CIOWY ...\n"
+"Argumenty obowi±zkowe dla opcji d³ugich obowi±zuj± równie¿ dla krótkich.\n"
+" -d, --domain=TEXTDOMAIN wydob±d¼ przet³umaczone komunikaty z TEXTDOMAIN\n"
+" -D, --directory=KATALOG szukaj plików wej¶ciowych równie¿ w KATALOGu\n"
+" -e, --no-escape nie u¿ywaj sekwencji escape w wynikach (domy¶lne)\n"
+" -E, --escape u¿yj sekwencji escape C, bez znaków rozszerzonych\n"
+" -f, --files-from=PLIK pobierz listê plików wej¶ciowych z PLIKu\n"
+" --force-po zapisz nawet pusty plik PO\n"
+" -F, --sort-by-file sortuj wyniki wg po³o¿enia plików\n"
+" -h, --help wy¶wietl ten opis i zakoñcz pracê\n"
+
+#: src/msgcomm.c:412
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -i, --indent zapisz plik .po u¿ywaj±c wciêæ\n"
+" --no-location nie zapisuj linii '#: nazwa:linia'\n"
+" -n, --add-location pisz linie '#: nazwa_pliku:linia' "
+"(domy¶lnie)\n"
+" --omit-header nie zapisuj nag³ówka z `msgid \"\"'\n"
+" -o, --output=FILE zapisz do podanego pliku\n"
+" -p, --output-dir=KATALOG pliki wynikowe bêd± w katalogu KATALOG\n"
+" -s, --sort-output wynik posortuj i usuñ duplikaty\n"
+" --strict zapisz plik .po ¶ci¶le w stylu Uniforum\n"
+" -T, --trigraphs rozumiej trójznaki ANSI C w danych "
+"wej¶ciowych\n"
+" -u, --unique skrót dla --less-than=2, bêd± wypisane\n"
+" tylko unikalne komunikaty\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+" -V, --version wy¶wietl informacjê o wersji i zakoñcz\n"
+" -w, --width=LICZBA ustal szeroko¶æ strony\n"
+" -<, --less-than=LICZBA wypisuj komunikaty z ilo¶ci± definicji\n"
+" mniejsz± od LICZBY, domy¶lnie "
+"nieskoñczono¶æ\n"
+" ->, --more-than=LICZBA wypisuj komunikaty z ilo¶ci± defnicji\n"
+" wiêksz± od LICZBY, domy¶lnie 1\n"
+"\n"
+"Znajd¼ komunikaty wspólne dla dwóch lub wiêcej podanych plików PO.\n"
+"Mo¿na za¿±daæ wiêkszego uwspólnienia przed wypisaniem komunikatów u¿ywaj±c\n"
+"opcji --more-than. Odpowiednio opcja --less-than mo¿e byæ u¿yta dla "
+"ustalenia\n"
+"mniejszego uwspólnienia pomiêdzy komunikatami (np. --less-than=2 wypisze "
+"tylko\n"
+"unikalne komunikaty). Komentarze t³umaczeñ i ze ¼róde³ zostan± zachowane,\n"
+"ale tylko w pierwszym definiuj±cym je pliku PO. Pozycje w plikach dla\n"
+"wszystkich plików PO te¿ zostan± zachowane.\n"
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "b³±d w czasie otwierania \"%s\" do czytania"
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "ten plik nie mo¿e zawieraæ dyrektyw domen"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "nie podano nazwy pliku wej¶ciowego"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "b³±d otwarcia \"%s\" do pisania"
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d przet³umaczonych komunikatów"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d t³umaczeñ budzi w±tpliwo¶ci"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d nie przet³umaczonych komunikatów"
+
+#: src/msgfmt.c:366
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"U¿ycie: %s [OPCJA] plik.po ...\n"
+"Wygeneruj binarny katalog komunikatów z tekstowego opisu t³umaczenia.\n"
+"\n"
+"Argumenty obowi±zkowe dla opcji d³ugich obowi±zuj± równie¿ dla krótkich.\n"
+" -a, --alignment=ILO¦Æ dosuñ do równej ILO¦Ci bajtów (domy¶lnie: %d)\n"
+" -c, --check dokonaj zale¿nych od jêzyka sprawdzeñ znaków\n"
+" -D, --directory=KATALOG szukaj plików wej¶ciowych równie¿ w KATALOGu\n"
+" -f, --use-fuzzy u¿yj t³umaczeñ niepewnych w danych wyj¶ciowych\n"
+" -h, --help wy¶wietl ten opis i zakoñcz pracê\n"
+" --no-hash w pliku binarnym nie bêdzie tablicy mieszaj±cej\n"
+" -o, --output-file=PLIK podaj nazwê pliku wyj¶ciowego PLIK\n"
+" --statistics wypisz statystykê t³umaczeñ\n"
+" --strict przejd¼ na ¶cis³y tyryb Uniforum\n"
+" -v, --verbose wypisz anomalie w pliku wej¶ciowym\n"
+" -V, --version wypisz informacjê o wersji i zakoñcz\n"
+"\n"
+"Podanie opcji -v wiecêj ni¿ raz zwiêksza ilo¶æ podawanych informacji.\n"
+"\n"
+"Je¿eli plik wej¶ciowy to -, czytane jest wej¶cie standardowe. Je¿eli plik\n"
+"wyj¶ciowy to -, wyniki s± wysy³ane do standardowego wyj¶cia.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "podczas tworzenia tablicy mieszaj±cej"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "%s: uwaga: plik ¼ród³owy zawiera t³umaczenie budz±ce w±tpliwo¶ci"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "nazwa domeny \"%s\" nie jest odpowiedni± nazwa pliku"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr "nazwa domeny \"%s\" nie jest dobra jako nazwa pliku: u¿yjê przedrostka"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "dyrektywa `domena %s' zignorowana"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "zignorowana pusta warto¶æ `msgstr'"
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "zignorowana niepewna (fuzzy) warto¶æ `msgstr'"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "w nag³ówku brakuje pola `%s'"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "pole nag³ówka `%s' powinno siê zaczynaæ na pocz±tku linii"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr "niektóre pola nag³ówka nadal zawieraj± pocz±tkowe warto¶ci domy¶lne"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "pole `%s' ma nadal pocz±tkow± warto¶æ domy¶ln±"
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "%s: uwaga: plik ¼ród³owy zawiera t³umaczenie budz±ce w±tpliwo¶ci"
+
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "`msgid' i `msgstr' nie zaczynaj± siê oba od '\\n'`"
+
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "`msgid' i `msgstr' nie koñcz± siê oba na '\\n'"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr "nie zgadza siê ilo¶æ specyfikacji formatu w `msgid' i w `msgstr'"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "specyfikacje formatu dla argumentu %u nie s± takie same"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"U¿ycie: %s [OPCJA] def.po ref.po\n"
+"Argumenty obowi±zkowe dla opcji d³ugich obowi±zuj± równie¿ dla krótkich.\n"
+" -D, --directory=KATALOG szukaj plików wej¶ciowych równie¿ w KATALOGu\n"
+" -e --no-escape nie u¿ywaj rozwijania sekwencji escape (domy¶lne)\n"
+" -E --escape u¿yj sekwencje escape, bez znaków rozszerzonych\n"
+" --force-po zapisz nawet pusty plik PO\n"
+" -h, --help wy¶wietl ten opis i zakoñcz\n"
+" -i, --indent wyniki z wciêciami\n"
+" -o, --output-file=PLIK wyniki bêd± zapisane do PLIKu\n"
+" --no-location nie generuj linii '#: filename:line'\n"
+" --add-location generuj linie '#: filename:line' (domy¶lne)\n"
+" --strict ¶cis³y styl Uniforum\n"
+" -v, --verbose podawaj wiêcej informacji\n"
+" -V, --version wy¶wietl informacjê o wersji i zakoñcz\n"
+" -w, --width=LICZBA ustal szeroko¶æ strony\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"£±czy razem dwa pliki .po w stylu Uniforum. Plik def.po jest istniej±cym\n"
+"plikiem PO ze starymi t³umaczeniami, które bêd± przeniesione do nowo\n"
+"utworzonego pliku je¿eli nadal pasuj±; komentarze bêd± zachowane, ale\n"
+"komentarze wydobyte i pozycje w pliku bêd± zignorowane.\n"
+"Plik ref.po jest ostanio utworzonym plikiem PO (zwykle przez xgettext),\n"
+"t³umaczenia i komentarze w nim zawarte bêd± zignorowane, ale komentarze z\n"
+"kropk± i pozycje w plikach bêd± zachowane. Tam gdzie nie mo¿na porównaæ\n"
+"dok³adnie u¿ywane jest porównanie rozmyte, dla lepszych wyników. Wyniki s±\n"
+"pisane na standardowe wyj¶cie je¿eli plik wyj¶iowy nie jest podany.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%sPrzeczytane %d starych + %d odno¶ników, %d do³±czonych, %d niedok³adnych, "
+"%d brakuj±cych, %d przestarza³ych.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " zrobione.\n"
+
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"U¿ycie: %s [OPCJA] def.po ref.po\n"
+"Argumenty obowi±zkowe dla opcji d³ugich obowi±zuj± równie¿ dla krótkich.\n"
+" -e --no-escape nie u¿ywaj rozwijania sekwencji escape (domy¶lne)\n"
+" -E --escape u¿yj sekwencje escape, bez znaków rozszerzonych\n"
+" --force-po zapisz nawet pusty plik PO\n"
+" -h, --help wy¶wietl ten opis i zakoñcz\n"
+" -i, --indent wyniki z wciêciami\n"
+" -o, --output-file=PLIK wyniki bêd± zapisane do PLIKu\n"
+" --strict ¶cis³y styl Uniforum\n"
+" -V, --version wy¶wietl informacjê o wersji i zakoñcz\n"
+" -w, --width=LICZBA ustal szeroko¶æ strony\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Konwersja binarnych plików .mo do plików .po w stylu Uniforum.\n"
+"U¿yte mog± byæ zarówno pliki .mo little-endian i big-endian.\n"
+"Je¿eli plik wej¶ciowy to -, czytane jest wej¶cie standardowe. Jezeli plik\n"
+"wyj¶ciowy to -, wyniki s± wysy³ane do standardowego wyj¶cia.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "b³±d w czasie czytania \"%s\""
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "obciêty plik \"%s\""
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "nieudane przej¶cie do pozycji w \"%s\", ofset %ld"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "plik \"%s\" nie jest w formacie .mo GNU"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "brak czêsci `msgstr'"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "znaleziono %d b³êdów krytycznych"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "%s: za du¿o b³êdów, przerywam"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "nieznane s³owo kluczowe \"%s\""
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "niedozwolona sekwencja steruj±ca"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "znak koñca wiersza wewn±trz ³añcucha"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "znak koñca pliku wewn±trz ³añcucha"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "wej¶cie standardowe"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr "%s:%d: uwaga: niezakoñczona sta³a znakowa"
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr "%s:%d: uwaga: niezakoñczona sta³a ³añcuchowa"
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr "--join-existing nie mo¿e byæ u¿yte kiedy wyniki"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr "uwaga: typ pliku `%s' z rozszerzeniem `%s' jest nieznany; spróbujê C"
+
+#: src/xgettext.c:544
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"U¿ycie: %s [OPCJA] PLIK_WEJ¦CIOWY ...\n"
+"Wydob±d¼ przet³umaczalne ³añcuchy z podanych plików wej¶ciowych.\n"
+"\n"
+"Argumenty obowi±zkowe dla opcji d³ugich obowi±zuj± równie¿ dla krótkich.\n"
+" -a, --extract-all wydob±d¼ wszystkie komunikaty\n"
+" -c, --add-comments[=ZNACZNIK] umie¶æ blok komentarza ze ZNACZNIKiem (lub\n"
+" z poprzedzaj±cymi liniami s³ów kluczowych) w\n"
+" pliku wyj¶ciowym\n"
+" -C, --c++ rozpoznawaj komentarze w stylu C++\n"
+" --debug bardziej wnikliwe rozpoznwanie formatu\n"
+" -d, --domain=TEXTDOMAIN wydob±d¼ przet³umaczone komunikaty z TEXTDOMAIN\n"
+" -D, --directory=KATALOG szukaj plików wej¶ciowych równie¿ w KATALOGu\n"
+" -e, --no-escape nie u¿ywaj sekwencji escape w wynikach (domy¶lne)\n"
+" -E, --escape u¿yj sekwencji escape C, bez znaków rozszerzonych\n"
+" -f, --files-from=PLIK pobierz listê plików wej¶ciowych z PLIKu\n"
+" --force-po zapisz nawet pusty plik PO\n"
+" --foreign-user omiñ informacjê o prawach autorskich FSF\n"
+" -F, --sort-by-file sortuj wyniki wg po³o¿enia plików\n"
+
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help wy¶wietl ten opis i zakoñcz\n"
+" -i, --indent zapisz plik .po z wciêciami\n"
+" -j, --join-existing po³±cz komunikaty z istniej±cymi\n"
+" -k, --keyword[=S£OWO] dodatkowe s³owo kluczowe do wyszukania (bez\n"
+" S£OWO oznacza nieu¿ywanie s³ów domy¶lnych)\n"
+" -l, --string-limit=ILO¦Æ ustaw limit d³ugo¶ci ³añcucha ILO¦Æ zamiast %u\n"
+" -L, --language=NAZWA interpretuj podany jêzyk (C, C++, PO), w przeciwnym\n"
+" wypadku zgadywany z rozszerzenia nazwy pliku\n"
+" -m, --msgstr-prefix[=£AÑCUCH] u¿yj £AÑCUCH lub \"\" jako przedrostka msgstr\n"
+" -M, --msgstr-suffix[=£AÑCUCH] u¿yj £AÑCUCH lub \"\" jako przyrostka msgstr\n"
+" --no-location nie zapisuj linii '#: nazwa_pliku:linia'\n"
+
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location pisz linie '#: nazwa_pliku:linia' (domy¶lnie)\n"
+" --omit-header nie zapisuj nag³ówka z `msgid \"\"'\n"
+" -o, --output=FILE zapisz do podanego pliku\n"
+" -p, --output-dir=KATALOG pliki wynikowe bêd± w katalogu KATALOG\n"
+" -s, --sort-output wynik posortuj i usuñ duplikaty\n"
+" --strict zapisz plik .po ¶ci¶le w stylu Uniforum\n"
+" -T, --trigraphs rozumiej trójznaki ANSI C w danych wej¶ciowych\n"
+" -V, --version wy¶wietl informacjê o wersji i zakoñcz\n"
+" -w, --width=LICZBA ustal szeroko¶æ strony\n"
+" -x, --exclude-file=PLIK nie wydobywaj rekordów zapisanych w PLIKu\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr "nieznany jêzyk `%s'"
+
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "%s: uwaga: nie znaleziono nag³ówka"
diff --git a/po/pt.gmo b/po/pt.gmo
new file mode 100644
index 0000000..edee49b
--- /dev/null
+++ b/po/pt.gmo
Binary files differ
diff --git a/po/pt.po b/po/pt.po
new file mode 100644
index 0000000..3ed2221
--- /dev/null
+++ b/po/pt.po
@@ -0,0 +1,863 @@
+# Portuguese translation of the "gettext" messages
+# Copyright (C) 1996 Free Software Foundation, Inc.
+# Nuno Oliveira <nuno@eq.uc.pt>, 1996.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gettext 0.10.23\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1996-09-18 20:51 WET DST\n"
+"Last-Translator: Nuno Oliveira <nuno@eq.uc.pt>\n"
+"Language-Team: Portuguese <pt@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "Erro desconhecido do sistema"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: a opção `%s' é ambígua\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: a opção `--%s' não permite um argumento\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: a opção `%c%s' não permite um argumento\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: a opção `%s' requere um argumento\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opção não reconhecida `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opção não reconhecida `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: opção ilegal -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opção ilegal -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: opção requere um argumento -- %c\n"
+
+#: lib/getopt.c:865
+#, fuzzy, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: a opção `%s' é ambígua\n"
+
+#: lib/getopt.c:883
+#, fuzzy, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: a opção `--%s' não permite um argumento\n"
+
+#: lib/xmalloc.c:82
+#, fuzzy
+msgid "Memory exhausted"
+msgstr "memória exausta"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "argumentos insuficientes"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "demasiados argumentos"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, fuzzy, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Tente `%s --help' para mais informação\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Utilização: %s [OPÇÃO] [[[DIALECTO] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=DIALECTO obtém as mensagems traduzidas do DIALECTO\n"
+" -e permite a expansão de algumas sequências de escape\n"
+" -E (ignorado para compatibilidade)\n"
+" -h, --help mostra esta ajuda e sai\n"
+" -n suprime o newline final\n"
+" -V, --version mostra a informação de versão e sai\n"
+" [DIALECTO] MSGID obtém a mensagem traduzida correspondente a\n"
+" MSGID do DIALECTO\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Se o parâmetro DIALECTO não for fornecido, o domínio é determinado a\n"
+"partir da variável TEXTDOMAIN do ambiente. Se o catálogo de mensagens\n"
+"não for encontrado no directório regular, pode ser especificada outra\n"
+"localização através da variável TEXTDOMAINDIR do ambiente.\n"
+"Quando usado com a opção -s, o programa comporta-se como o comando\n"
+"`echo'. Contudo ele não copia simplesmente os seus argumentos para o\n"
+"stdout. Em vez disso as mensagens encontradas no catálogo seleccionado\n"
+"são traduzidas.\n"
+"Directório standard de pesquisa: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr ""
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"as mensagens de internacionalização não devem conter\n"
+"a sequência de escape `\\%c'"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "impossível criar o ficheiro de saída \"%s\""
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "canal de saída por defeito (stdout)"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "erro durante a escrita do ficheiro \"%s\""
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "ficheiros de entrada não fornecidos"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "são necessários exactamente 2 ficheiros"
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Utilização: %s [OPÇÃO] def.po ref.po\n"
+"Os argumentos obrigatórios para as opções longas são igualmente\n"
+"obrigatórios para as opções curtas.\n"
+" -D, --directory=DIRECTÓRIO adiciona DIRECTÓRIO à lista de procura para\n"
+" os ficheiros de entrada\n"
+" -h, --help mostra esta ajuda e sai\n"
+" -V, --version mostra a informação de versão e sai\n"
+"\n"
+"Compara dois ficheiros .po do tipo Uniforum verificando se ambos\n"
+"contêm o mesmo conjunto de cadeias msgid. O ficheiro def.po deverá ser\n"
+"um ficheiro PO existente, com as traduções antigas. O ficheiro ref.po\n"
+"será o último ficheiro PO criado (geralmente pelo xgettext). Isto é\n"
+"útil para verificar que todas as mensagens no seu programa foram\n"
+"traduzidas. Quando um emparelhamento exacto não puder ser efectuado,\n"
+"é usado um emparelhamento aproximado para produzir melhores\n"
+"diagnósticos.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "esta mensagem é usada mas não definida..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...mas esta definição é semelhante"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "esta mensagem é usada mas não definida em %s"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "atenção: esta mensagem não é usada"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "definição de mensagem duplicada"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...este é o local da primeira definição"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "esta mensagem não tem definição no domínio \"%s\""
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "durante a preparação da saída"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s e %s são mutuamente exclusivas"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr ""
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr ""
+
+#: src/msgcomm.c:400
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Utilização: %s [OPÇÃO] FICHEIRODEENTRADA...\n"
+"Os argumentos obrigatórios para as opções longas são igualmente\n"
+"obrigatórios para as opções curtas.\n"
+" -a, --extract-all extrai todas as cadeias\n"
+" -c, --add-comments[=TAG] coloca o bloco comentado com TAG (ou as\n"
+" linhas de cabeçalho precedentes) no ficheiro\n"
+" de saída.\n"
+" -C, --c++ reconhece comentários do tipo C++\n"
+" --debug produz resultados mais detalhados do\n"
+" reconhecimento das cadeias de formatação\n"
+" -d, --default-domain=NOME usa NOME.po para a saída (em vez de\n"
+" messages.po)\n"
+" -D, --directory=DIRECTÓRIO adiciona DIRECTÓRIO à lista de procura para\n"
+" \" os ficheiros de entrada\n"
+" -e, --no-escape não usa sequências de escape do C na saída\n"
+" (opção por defeito)\n"
+" -E, --escape usa sequências de escape do C na saída, não\n"
+" usando caracteres especiais\n"
+" -f, --files-from=FICHEIRO obtém lista de ficheiros de entrada de\n"
+" FICHEIRO\n"
+" --force-po escreve o ficheiro PO mesmo se este estiver\n"
+" vazio\n"
+" -F, --sort-by-file ordena a saída pela localização dos ficheiros\n"
+
+#: src/msgcomm.c:412
+#, fuzzy
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -n, --add-location gera linhas do tipo '#: filename:line'\n"
+" (opção utilizada por defeito)\n"
+" --omit-header não escreve cabeçalhos com campos "
+"`msgid\"\"'\n"
+" -p, --output-dir=DIR os ficheiros de saída serão colocados no\n"
+" directório DIR\n"
+" -s, --sort-output gera resultados ordenados, removendo os\n"
+" duplicados\n"
+" --strict escreve um ficheiro .po de acordo com o\n"
+" modo Uniforum estrito\n"
+" -T, --trigraphs entende trigrafos ANSI C na entrada\n"
+" -V, --version mostra a informação de versão e sai\n"
+" -w, --width=NÚMERO especifica a largura de página na saída\n"
+" -x, --exclude-file=FICHEIRO os campos do FICHEIRO não são extraídos\n"
+"\n"
+"Se o ficheiro de entrada for -, o canal de entrada por defeito (stdin) é\n"
+"usado.\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "erro durante a abertura de \"%s\" para leitura"
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "este ficheiro não pode conter directivas de domínio"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "nenhum ficheiro de entrada fornecido"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "erro durante a abertura de \"%s\" para escrita"
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d mensagens traduzidas"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d traduções aproximadas"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d mensagens não traduzidas"
+
+#: src/msgfmt.c:366
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Utilização: %s [OPÇÃO] ficheiro.po ...\n"
+"Os argumentos obrigatórios para as opções longas são igualmente\n"
+"obrigatórios para as opções curtas.\n"
+" -a, --alignment=NÚMERO alinha as cadeias a NÚMERO bytes (defeito: %d)\n"
+" -c, --check executa testes dependentes da linguagem na\n"
+" cadeia\n"
+" -D, --directory=DIRECTÓRIO adiciona DIRECTÓRIO à lista de procura para\n"
+" os ficheiros de entrada\n"
+" -h, --help mostra esta ajuda e sai\n"
+" --no-hash o ficheiro binário não irá incluir a tabela\n"
+" de dispersão\n"
+" -o, --output-file=FICHEIRO especifica o nome do ficheiro de saída como\n"
+" FICHEIRO\n"
+" --statistics escreve informação estatística sobre as\n"
+" traduções\n"
+" --strict usa o modo Uniforum estrito\n"
+" -v, --verbose lista as anormalias no ficheiro de entrada\n"
+" -V, --version mostra a informação de versão e sai\n"
+"\n"
+"Se o ficheiro de entrada é -, é usado o canal de entrada stdin. Se o\n"
+"ficheiro de saída é -, a saída é escrita no canal de saída stdout.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "durante a criação da tabela de dispersão"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "CUIDADO: o ficheiro fonte contém traduções aproximadas"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "nome de domínio \"%s\" não apropriado como nome de ficheiro"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr ""
+"nome de domínio \"%s\" não apropriado como nome de ficheiro:\n"
+"prefixo usado"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "directiva `domínio %s' ignorada"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "elemento `msgstr' vazio ignorada"
+
+#: src/msgfmt.c:521
+#, fuzzy
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "elemento `msgstr' vazio ignorada"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "o campo `%s' falta no cabeçalho"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "o campo `%s' do cabeçalho deve começar no início da linha"
+
+#: src/msgfmt.c:577
+#, fuzzy
+msgid "some header fields still have the initial default value"
+msgstr "alguns campos do cabeçalho ainda têm o valor inicial por defeito"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "o campo `%s' ainda tem o valor por defeito inicial"
+
+#: src/msgfmt.c:673
+#, fuzzy, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "CUIDADO: o ficheiro fonte contém traduções aproximadas"
+
+#: src/msgfmt.c:875
+#, fuzzy
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "os campos `msgid' e `msgstr' não começam ambos por '\\n'"
+
+#: src/msgfmt.c:883
+#, fuzzy
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "os campos `msgid' e `msgstr' não terminam ambos por '\\n'"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr "o número de especificações em `msgid' e `msgstr' é diferente"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "as especificações do argumento %u são diferentes"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Utilização: %s [OPÇÃO] def.po ref.po\n"
+"Os argumentos obrigatórios para as opções longas são igualmente\n"
+"obrigatórios para as opções curtas.\n"
+" -D, --directory=DIRECTÓRIO adiciona DIRECTÓRIO à lista de procura para\n"
+" os ficheiros de entrada\n"
+" -e, --no-escape não usa sequências de escape do C na saída\n"
+" (opção por defeito)\n"
+" -E, --escape usa sequências de escape do C na saída, não\n"
+" usando caracteres especiais\n"
+" -h, --help mostra esta ajuda e sai\n"
+" -i, --indent modo de saída alinhado\n"
+" -o, --output-file=FICHEIRO os resultados de saída serão escritos no FICHEIRO\n"
+" --strict modo de saída Uniforum estrito\n"
+" -v, --verbose aumenta o nível de verbosidade da saída\n"
+" -V, --version mostra a informação de versão e sai\n"
+" -w, --width=NÚMERO especifica a largura de página na saída\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Combina 2 ficheiros .po do tipo Uniforum num só. O ficheiro def.po\n"
+"deverá ser um ficheiro PO existente com as traduções a manter no novo\n"
+"ficheiro criado, desde que ainda aplicáveis; os comentários serão\n"
+"mantidos, mas os comentários relativos à extração das mensagens e das\n"
+"suas posições nos ficheiros serão eliminados. O ficheiro ref.po deverá\n"
+"ser o último ficheiro PO criado (geralmente pelo xgettext); todas as\n"
+"traduções e comentários neste ficheiro serão eliminados, sendo\n"
+"preservados os comentários e as posições nos ficheiros. Quando um\n"
+"emparelhamento exacto não puder ser efectuado é efectuado um\n"
+"emparelhamento aproximado para produzir melhores resultados. Os\n"
+"resultados serão escritos no canal de saída por defeito (stdout) a\n"
+"menos que seja especificado um ficheiro de saída.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%sLidas %d antigas + %d referências, combinadas %d, aproximadas %d, faltam "
+"%d, obsoletas %d.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr "terminado.\n"
+
+#: src/msgunfmt.c:215
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Utilização: %s [OPÇÃO] [FICHEIRO]...\n"
+"Os argumentos obrigatórios para as opções longas são igualmente\n"
+"obrigatórios para as opções curtas.\n"
+" -e, --no-escape não usa sequências de escape do C na saída\n"
+" (opção por defeito)\n"
+" -E, --escape usa sequências de escape do C na saída, não\n"
+" usando caracteres especiais\n"
+" -h, --help mostra esta ajuda e sai\n"
+" -i, --indent usa o modo de saída alinhado\n"
+" -o, --output-file=FICHEIRO os resultados de saída serão escritos no FICHEIRO\n"
+" em vez do canal de saída por defeito (stdout)\n"
+" --strict usa o modo de saída Uniforum estrito\n"
+" -V, --version mostra a informação de versão e sai\n"
+" -w, --width=NÚMERO especifica a largura de página na saída\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Converte ficheiros .mo binários em ficheiros .po no modo Uniforum.\n"
+"Ficheiros .mo \"little-endian\" e \"big-endian\" são simultaneamente\n"
+"tratados. Se não for indicado ficheiro de entrada ou este for -, é\n"
+"usado o canal de entrada stdin. Por defeito a saída é escrita no\n"
+"stdout.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "erro durante a leitura de \"%s\""
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "ficheiro \"%s\"truncado"
+
+#: src/msgunfmt.c:298
+#, fuzzy, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "seek \"%s\" offset %ld falhou"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "o ficheiro \"%s\" não está no formato .mo GNU"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "falta a secção `msgstr'"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "encontrados %d erros fatais"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "demasiados erros, interrompendo"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "palavra chave \"%s\" desconhecida"
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "sequência de controlo ilegal"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "fim-de-linha dentro da cadeia"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "fim-de-ficheiro dentro da cadeia"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "entrada standard"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr ""
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr ""
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+"--join-existing não pode ser usada quando a saída\n"
+"é escrita no stdout"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, fuzzy, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr ""
+"cuidado: o tipo do ficheiro `%s' com a extensão `%s' é desconhecido;\n"
+"será tentado C"
+
+#: src/xgettext.c:544
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Utilização: %s [OPÇÃO] FICHEIRODEENTRADA...\n"
+"Os argumentos obrigatórios para as opções longas são igualmente\n"
+"obrigatórios para as opções curtas.\n"
+" -a, --extract-all extrai todas as cadeias\n"
+" -c, --add-comments[=TAG] coloca o bloco comentado com TAG (ou as\n"
+" linhas de cabeçalho precedentes) no ficheiro\n"
+" de saída.\n"
+" -C, --c++ reconhece comentários do tipo C++\n"
+" --debug produz resultados mais detalhados do\n"
+" reconhecimento das cadeias de formatação\n"
+" -d, --default-domain=NOME usa NOME.po para a saída (em vez de\n"
+" messages.po)\n"
+" -D, --directory=DIRECTÓRIO adiciona DIRECTÓRIO à lista de procura para\n"
+" \" os ficheiros de entrada\n"
+" -e, --no-escape não usa sequências de escape do C na saída\n"
+" (opção por defeito)\n"
+" -E, --escape usa sequências de escape do C na saída, não\n"
+" usando caracteres especiais\n"
+" -f, --files-from=FICHEIRO obtém lista de ficheiros de entrada de\n"
+" FICHEIRO\n"
+" --force-po escreve o ficheiro PO mesmo se este estiver\n"
+" vazio\n"
+" -F, --sort-by-file ordena a saída pela localização dos ficheiros\n"
+
+#: src/xgettext.c:564
+#, fuzzy, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help mostra esta ajuda e sai\n"
+" -i, --indent escreve o ficheiro .po usando o modo de\n"
+" saída alinhado\n"
+" -j, --join-existing combina as mensagens com o ficheiro existente\n"
+" -k, --keyword[=PALAVRA] palavra chave adicional a ser procurada\n"
+" (sem PALAVRA significa não usar as palavras\n"
+" chave por defeito)\n"
+" -l, --string-limit=NÚMERO especifica o tamanho máximo das cadeias como\n"
+" NÚMERO, em vez de %u\n"
+" -m, --msgstr-prefix[=CADEIA] usa CADEIA or \"\" como prefixo para os\n"
+" campos `msgstr'\n"
+" -M, --msgstr-suffix[=STRING] usa CADEIA ou \"\" como sufixo para as cadeias\n"
+" `msgstr'\n"
+" --no-location não escreve linhas do tipo '#: filename:line'\n"
+
+#: src/xgettext.c:578
+#, fuzzy, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location gera linhas do tipo '#: filename:line'\n"
+" (opção utilizada por defeito)\n"
+" --omit-header não escreve cabeçalhos com campos `msgid\"\"'\n"
+" -p, --output-dir=DIR os ficheiros de saída serão colocados no\n"
+" directório DIR\n"
+" -s, --sort-output gera resultados ordenados, removendo os\n"
+" duplicados\n"
+" --strict escreve um ficheiro .po de acordo com o\n"
+" modo Uniforum estrito\n"
+" -T, --trigraphs entende trigrafos ANSI C na entrada\n"
+" -V, --version mostra a informação de versão e sai\n"
+" -w, --width=NÚMERO especifica a largura de página na saída\n"
+" -x, --exclude-file=FICHEIRO os campos do FICHEIRO não são extraídos\n"
+"\n"
+"Se o ficheiro de entrada for -, o canal de entrada por defeito (stdin) é\n"
+"usado.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr ""
+
+#, fuzzy
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "cuidado: nenhum elemento encontrado no cabeçalho"
+
+#~ msgid "this is the location of the first definition"
+#~ msgstr "este é o local da primeira definição"
+
+#~ msgid "duplicate message ID"
+#~ msgstr "ID de mensagem duplicada"
diff --git a/po/sl.gmo b/po/sl.gmo
new file mode 100644
index 0000000..2d32580
--- /dev/null
+++ b/po/sl.gmo
Binary files differ
diff --git a/po/sl.po b/po/sl.po
new file mode 100644
index 0000000..4004efb
--- /dev/null
+++ b/po/sl.po
@@ -0,0 +1,818 @@
+# Slovenian messages for GNU gettext package.
+# Copyright (C) 1996 Free Software Foundation, Inc.
+# Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>, 1996.
+#
+# $Header: /home/drepper/gnu/gettext/po/RCS/sl.po,v 1.5 2000/05/06 07:34:17 drepper Exp drepper $
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.24\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: 1996-09-12 21:15\n"
+"Last-Translator: Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>\n"
+"Language-Team: Slovenian <sl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "Neznana sistemska napaka"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: izbira ,%s' je dvoumna\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: izbira ,--%s' ne dovoljuje argumenta\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: izbira ,%c%s' ne dovoljuje argumenta\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: izbira ,%s' zahteva argument\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: neprepoznana izbira ,--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: neprepoznana izbira ,%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: nedovoljena izbira -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: neveljavna izbira -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: izbira zahteva argument -- %c\n"
+
+#: lib/getopt.c:865
+#, fuzzy, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: izbira ,%s' je dvoumna\n"
+
+#: lib/getopt.c:883
+#, fuzzy, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: izbira ,--%s' ne dovoljuje argumenta\n"
+
+# Morda ,,Zmanjkalo pomnilnika''?
+#: lib/xmalloc.c:82
+#, fuzzy
+msgid "Memory exhausted"
+msgstr "pomnilnik izèrpan"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "argumenti manjkajo"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "preveè argumentov"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, fuzzy, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Poskusite ,%s --help' za izèrpnej¹a navodila\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Usage: %s [IZBIRA] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Èe parameter TEXTDOMAIN ni podan, se uporabi vrednost spremenljivke TEXTDOMAIN\n"
+"iz okolja. Èe kataloga sporoèil ni moè najti na obièajnem mestu, lahko \n"
+"doloèimo alternativno lokacijo s spremenljivko TEXTDOMAINDIR.\n"
+"Z izbiro -s se program obna¹a podobno kot ukaz ,echo', s to razliko, da\n"
+"na standardni izhod niso prepisani argumenti, ampak njihovi prevodi iz kataloga\n"
+"sporoèil.\n"
+"Privzet imenik s katalogom sporoèil: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr ""
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"internacionalizirana sporoèila ne smejo vsebovati ube¾ne sekvence ,\\%c'"
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "izhodne datoteke \"%s\" ni mogoèe ustvariti"
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "standardni izhod"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "napaka pri pisanju na datoteko \"%s\""
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "vhodni datoteki nista podani"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "potrebni sta natanèno dve vhodni datoteki"
+
+#: src/msgcmp.c:186
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Uporaba: %s [IZBIRA] def.po ref.po\n"
+"Argumenti, obvezni za dolge oblike izbire, so obvezni tudi za kratke.\n"
+" -D, --directory=IMENIK vhodne datoteke i¹èemo tudi v imeniku IMENIK\n"
+" -h, --help ta navodila\n"
+" -V, --version verzija programa\n"
+"\n"
+"Preverimo, èe dve podani datoteki v obliki Uniforum vsebujeta isti nabor\n"
+"sporoèil msgid. Datoteka def.po je obstojeèa datoteka PO s starimi prevodi,\n"
+"datoteka ref.po pa nazadnje ustvarjena datoteka PO (v splo¹nem z xgettext).\n"
+"To je uporabno, ko ¾elimo preveriti, èe so prevedena res vsa sporoèila\n"
+"v programu. Kadar ne najdemo natanènega ujemanja msgid, zaradi bolj¹e\n"
+"diagnostike poskusimo z ohlapnim (fuzzy) algoritmom.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "to sporoèilo je uporabljeno, a ne definirano..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...a ta definicija je podobna"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "to sporoèilo je uporabljeno, a ne definirano v %s"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "pozor: to sporoèilo ni uporabljeno"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "podvojena definicija sporoèila"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...to je kraj prve definicije"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "to sporoèilo ni definirano v domeni \"%s\""
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "med pripravo izpisa"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s in %s se med seboj izkljuèujeta"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr ""
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr ""
+
+# POZOR! Nepopolni prevodi
+#: src/msgcomm.c:400
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Uporaba: %s [IZBIRA] VHODNA_DATOTEKA ...\n"
+"Argumenti, obvezni za dolge oblike izbire, so obvezni tudi za kratke.\n"
+" -a, --extract-all iz datotek potegnemo vse nize\n"
+" -c, --add-comments[=ZNAÈKA] komentarji oznaèeni z ZNAÈKO (ali tisti\n"
+" pred vrsticami s kljuènimi besedami) naj se\n"
+" izpi¹ejo\n"
+" -C, --c++ prepoznavanje komentarjev v stilu C++\n"
+" -d, --default-domain=IME izhod na IME.po (namesto messages.po)\n"
+" -D, --directory=IMENIK vhodne datoteke i¹Èemo tudi v imeniku IMENIK\n"
+" -e, --no-escape brez ube¾nih sekvenc v stilu C (privzeto)\n"
+" -E, --escape z ube¾nimi sekvencami C, brez raz¹irjenega\n"
+" nabora znakov\n"
+" -f, --files-from=DATOTEKA seznam vhodnih datotek preberemo z DATOTEKE\n"
+" --force-po datoteko PO zapi¹emo, èetudi je prazna\n"
+" -F, --sort-by-file izhod sortiramo po lokaciji datotek\n"
+
+# POZOR! Nepopolni prevodi
+#: src/msgcomm.c:412
+#, fuzzy
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -n, --add-location z vrsticami '#: filename:line' (privzeto)\n"
+" --omit-header brez glave z ,msgid \"\"'\n"
+" -p, --output-dir=IMENIK izhodne datoteke zapisane v IMENIK\n"
+" -s, --sort-output sortiran izpis brez podvojenih vnosov\n"
+" --strict strogi stil Uniforum pri izpisu datoteke "
+".po\n"
+" -T, --trigraphs razumi trigrafe ANSI C na vhodu\n"
+" -V, --version verzija programa\n"
+" -w, --width=©TEVILO ¹irina vrstice pri izpisu, v znakih\n"
+" -x, --exclude-file=DATOTEKA entries from FILE are not extracted\n"
+"\n"
+"Èe je ime vhodne datoteke - (minus), beremo s standardnega vhoda.\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "datoteke \"%s\" ni moè odpreti za branje"
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "ta datoteka morda ne vsebuje direktiv domene"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "vhodna datoteka ni podana"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "napaka pri pisanju na \"%s\""
+
+#: src/msgfmt.c:343
+#, fuzzy, c-format
+msgid "%d translated messages"
+msgstr "%d prevedenih sporoèil"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d ohlapnih prevodov"
+
+#: src/msgfmt.c:347
+#, fuzzy, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d neprevedenih sporoèil"
+
+#: src/msgfmt.c:366
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Uporaba: %s [IZBIRA] filename.po ...\n"
+"Argumenti, obvezni za dolge oblike izbire, so obvezni tudi za kratke.\n"
+" -a, --alignment=©TEVILO poravnaj nize znakov na ©TEVILO bytov (privzeto: %d)\n"
+" -c, --check na nizih izvedi teste, odvisne od jezika\n"
+" -D, --directory=IMENIK vhodne datoteke i¹èemo tudi v imeniku IMENIK\n"
+" -f, --use-fuzzy uporaba ohlapnih prevodov pri izpisu\n"
+" -h, --help ta navodila\n"
+" --no-hash binarna datoteka naj bo brez razpr¹ne tabele\n"
+" -o, --output-file=DATOTEKA izhodna DATOTEKA\n"
+" --statistics s statistiko glede prevodov\n"
+" --strict stroga oblika Uniforum\n"
+" -v, --verbose z izpisom anomalij vhodne datoteke\n"
+" -V, --version verzija programa\n"
+"\n"
+"Èe je kot ime vhodne datoteke navedeno - (minus), program bere s standardnega\n"
+"vhoda. Èe je kot ime izhodne datoteke navedeno - (minus), program pi¹e na\n"
+"standardni izhod.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "med ustvarjanjem razpr¹ene tabele"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "POZOR: vhodna datoteka vsebuje ohlapne (fuzzy) prevode"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "ime domene \"%s\" ni primerno kot ime datoteke"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr "ime domene \"%s\" ni primerno kot ime datoteke: uporabimo predpono"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "direktiva ,domain %s' ni bila upo¹tevana"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "prazno polje ,msgstr' ignorirano"
+
+#: src/msgfmt.c:521
+#, fuzzy
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "ohlapen vnos za polje ,msgstr' ignoriran"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "v glavi manjka polje ,%s'"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "polje ,%s' v glavi se mora zaèeti na zaèetku vrstice"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr "nekatera polja v glavi imajo ¹e vedno zaèetne privzete vrednosti"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "polje ,%s' ima ¹e vedno zaèetno privzeto vrednost"
+
+#: src/msgfmt.c:673
+#, fuzzy, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "POZOR: vhodna datoteka vsebuje ohlapne (fuzzy) prevode"
+
+#: src/msgfmt.c:875
+#, fuzzy
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "polji ,msgid' in ,msgstr' se ne zaèneta obe z ,\\n'"
+
+#: src/msgfmt.c:883
+#, fuzzy
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "polji ,msgid' in ,msgstr' se ne konèata obe z ,\\n'"
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr "¹tevili formatnih doloèil v ,msgid' in ,msgstr' se ne ujemata"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "formatni doloèili za argument %u nista enaki"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Uporaba: %s [IZBIRA] def.po ref.po\n"
+"Argumenti, obvezni za dolge oblike izbire, so obvezni tudi za kratke.\n"
+" -D, --directory=IMENIK vhodne datoteke i¹èemo tudi v imeniku IMENIK\n"
+" -e, --no-escape brez ube¾nih sekvenc v stilu C (privzeto)\n"
+" -E, --escape z ube¾nimi sekvencami C, brez raz¹irjenega nabora\n"
+" znakov\n"
+" -h, --help ta navodila\n"
+" -i, --indent izpis z zamiki\n"
+" -o, --output-file=DATOTEKA izhodna DATOTEKA\n"
+" --strict strogi stil Uniforum pri izpisu\n"
+" -v, --verbose z dodatnimi sporoèili med potekom\n"
+" -V, --version verzija programa\n"
+" -w, --width=©TEVILO ¹irina strani pri izpisu, v znakih\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Zdru¾i dve datoteki .po v stilu Uniforum. Datoteka def.po je obstojeèa\n"
+"datoteka s starimi prevodi, ki bodo, kadar se ujemajo, prene¹eni v novo\n"
+"datoteko. Pri prevedbi se komentarji prevajalca ohranijo, strojno ustvarjeni\n"
+"komentarji in podatki o ¹tevilki vrstice pa ne. Datoteka ref.po je nazadnje\n"
+"ustvarjena datoteka PO (v splo¹nem z xgettext). Kakrksnikoli prevodi ali\n"
+"komentarji prevajalca v njej bodo zavr¾eni, ohranjeni pa bodo strojno\n"
+"ustvarjeni komentarji in podatki o ¹tevilki vrstice. Kjer eksaktnega prevoda\n"
+"ni, se uporabi ohlapni (fuzzy) algoritem. Èe izhodna datoteka ni podana, gre\n"
+"izpis na standardni izhod.\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%sPrebrano %d starih + %d referenènih, zdru¾enih %d, ohlapnih %d, "
+"manjkajoèih %d, zastarelih %d.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " opravljeno.\n"
+
+#: src/msgunfmt.c:215
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Uporaba: %s [IZBIRA] [DATOTEKA]\n"
+"Argumenti, obvezni za dolge oblike izbire, so obvezni tudi za kratke.\n"
+" -e, --no-escape brez ube¾nih sekvenc v stilu C (privzeto)\n"
+" -E, --escape z ube¾nimi sekvencami C, brez raz¹irjenega nabora\n"
+" znakov\n"
+" -h, --help ta navodila\n"
+" -i, --indent izpis z zamiki\n"
+" -o, --output-file=DATOTEKA izhodna DATOTEKA\n"
+" --strict strogi stil Uniforum pri izpisu\n"
+" -V, --version verzija programa\n"
+" -w, --width=©TEVILO ¹irina strani pri izpisu, v znakih\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Pretvorba datoteke iz binarne oblike .mo v obliko Uniforum .po\n"
+"Datoteke .mo so lahko little-endian ali big-endian.\n"
+"Èe vhodna datoteka ni podana, ali pa je podano ime -, beremo standardni vhod.\n"
+"Èe ni izbrano drugaèe, gre izpis na standardni izhod.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "napaka pri branju \"%s\""
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "datoteka \"%s\" okrnjena"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "dostop do \"%s\" ofset %ld ni mo¾en"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "datoteka \"%s\" ni v obliki GNU .mo"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "manjka ,msgstr'"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "%d kritiènih napak"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "preveè napak, nadaljevanje ni mo¾no"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "kljuèna beseda \"%s\" neprepoznana"
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "nedovoljena kontrolna sekvenca"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "znak za konec vrstice sredi niza"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "znak za konec datoteke sredi niza"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "standardni vhod"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr ""
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr ""
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr "pri izpisu na standardni izhod ne moremo uporabiti --join-existing"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, fuzzy, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr "pozor: tip datoteke ,%s' s pripono ,%s' ni prepoznan; posku¹amo C"
+
+# POZOR! Nepopolni prevodi
+#: src/xgettext.c:544
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Uporaba: %s [IZBIRA] VHODNA_DATOTEKA ...\n"
+"Argumenti, obvezni za dolge oblike izbire, so obvezni tudi za kratke.\n"
+" -a, --extract-all iz datotek potegnemo vse nize\n"
+" -c, --add-comments[=ZNAÈKA] komentarji oznaèeni z ZNAÈKO (ali tisti\n"
+" pred vrsticami s kljuènimi besedami) naj se\n"
+" izpi¹ejo\n"
+" -C, --c++ prepoznavanje komentarjev v stilu C++\n"
+" -d, --default-domain=IME izhod na IME.po (namesto messages.po)\n"
+" -D, --directory=IMENIK vhodne datoteke i¹Èemo tudi v imeniku IMENIK\n"
+" -e, --no-escape brez ube¾nih sekvenc v stilu C (privzeto)\n"
+" -E, --escape z ube¾nimi sekvencami C, brez raz¹irjenega\n"
+" nabora znakov\n"
+" -f, --files-from=DATOTEKA seznam vhodnih datotek preberemo z DATOTEKE\n"
+" --force-po datoteko PO zapi¹emo, èetudi je prazna\n"
+" -F, --sort-by-file izhod sortiramo po lokaciji datotek\n"
+
+#: src/xgettext.c:564
+#, fuzzy, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help ta navodila\n"
+" -i, --indent izpis z zamiki od levega roba\n"
+" -j, --join-existing zdru¾i sporoèila z obstojeèo datoteko\n"
+" -k, --keyword[=BESEDA] iskanje po dodatnik kljuèih besedah (prazen\n"
+" niz BESEDA pomeni brez uporabe privzetih\n"
+" kljuènih besed)\n"
+" -l, --string-limit=©TEVILO omejitev dol¾ine niza na ©TEVILO namesto %u\n"
+" -m, --msgstr-prefix[=NIZ] NIZ ali \"\" kot predpona za msgstr\n"
+" -M, --msgstr-suffix[=NIZ] NIZ ali \"\" kot pripona za msgstr\n"
+" --no-location brez vrstic '#: filename:line'\n"
+
+# POZOR! Nepopolni prevodi
+#: src/xgettext.c:578
+#, fuzzy, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location z vrsticami '#: filename:line' (privzeto)\n"
+" --omit-header brez glave z ,msgid \"\"'\n"
+" -p, --output-dir=IMENIK izhodne datoteke zapisane v IMENIK\n"
+" -s, --sort-output sortiran izpis brez podvojenih vnosov\n"
+" --strict strogi stil Uniforum pri izpisu datoteke .po\n"
+" -T, --trigraphs razumi trigrafe ANSI C na vhodu\n"
+" -V, --version verzija programa\n"
+" -w, --width=©TEVILO ¹irina vrstice pri izpisu, v znakih\n"
+" -x, --exclude-file=DATOTEKA entries from FILE are not extracted\n"
+"\n"
+"Èe je ime vhodne datoteke - (minus), beremo s standardnega vhoda.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr ""
+
+#, fuzzy
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "pozor: glava manjka"
+
+#~ msgid "this is the location of the first definition"
+#~ msgstr "to je kraj prve definicije"
+
+#~ msgid "duplicate message ID"
+#~ msgstr "podvojen identifikator sporoèila"
+
+#~ msgid "cannot change to directory \"%s\""
+#~ msgstr "dostop do imenika \"%s\" ni mo¾en"
+
+#~ msgid "cannot change back to directory \"%s\""
+#~ msgstr "vrnitev v imenik \"%s\" ni mo¾na"
diff --git a/po/stamp-cat-id b/po/stamp-cat-id
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/po/stamp-cat-id
@@ -0,0 +1 @@
+timestamp
diff --git a/po/sv.gmo b/po/sv.gmo
new file mode 100644
index 0000000..7518db0
--- /dev/null
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
new file mode 100644
index 0000000..5750ff5
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,827 @@
+# Swedish messages for gettext
+# Copyright © 1996 Free Software Foundation, Inc.
+# Jan Djärv <Jan.Djarv@mbox200.swipnet.se>, 1996.
+# $Revision: 1.1 $
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gettext 0.10.31\n"
+"POT-Creation-Date: 1999-10-11 23:03-0700\n"
+"PO-Revision-Date: $Date: 2000/06/16 07:49:23 $\n"
+"Last-Translator: Jan Djärv <Jan.Djarv@mbox200.swipnet.se>\n"
+"Language-Team: Swedish <sv@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/error.c:103
+msgid "Unknown system error"
+msgstr "Okänt systemfel"
+
+#: lib/getopt.c:680
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: flaggan \"%s\" är tvetydig\n"
+
+#: lib/getopt.c:704
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: flaggan \"--%s\" tar inget argument\n"
+
+#: lib/getopt.c:709
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: flaggan \"%c%s\" tar inget argument\n"
+
+#: lib/getopt.c:726 lib/getopt.c:899
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: flaggan \"%s\" behöver ett argument\n"
+
+#. --option
+#: lib/getopt.c:755
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: okänd flagga \"--%s\"\n"
+
+#. +option or -option
+#: lib/getopt.c:759
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: okänd flagga \"%c%s\"\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:785
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: otillåten flagga -- %c\n"
+
+#: lib/getopt.c:788
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ogiltig flagga -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:818 lib/getopt.c:948
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: flaggan behöver ett argument -- %c\n"
+
+#: lib/getopt.c:865
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: flaggan \"-W %s\" är tvetydig\n"
+
+#: lib/getopt.c:883
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: flaggan \"-W %s\" tar inget argument\n"
+
+#: lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Minnet slut"
+
+#: src/gettextp.c:134 src/msgcmp.c:144 src/msgcomm.c:285 src/msgfmt.c:257
+#: src/msgmerge.c:263 src/msgunfmt.c:175 src/xgettext.c:401
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Copyright © %s Free Software Foundation, Inc.\n"
+"Detta är fri programvara; se källkoden för kopieringsvillkor. Det finns\n"
+"INGEN garanti; inte ens för SÄLJBARHET eller LÄMPLIGHET FÖR NÅGOT SPECIELLT\n"
+"ÄNDAMÅL.\n"
+
+#: src/gettextp.c:139 src/msgcmp.c:149 src/msgcomm.c:290 src/msgfmt.c:262
+#: src/msgmerge.c:268 src/msgunfmt.c:180 src/xgettext.c:406
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Skriven av %s.\n"
+
+#: src/gettextp.c:154
+msgid "missing arguments"
+msgstr "argument saknas"
+
+#: src/gettextp.c:164
+msgid "too many arguments"
+msgstr "för många argument"
+
+#: src/gettextp.c:228 src/msgcmp.c:181 src/msgcomm.c:395 src/msgfmt.c:361
+#: src/msgmerge.c:323 src/msgunfmt.c:210 src/xgettext.c:539
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Försök med \"%s --help\" för mer information.\n"
+
+#: src/gettextp.c:233
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+"Användning: %s [FLAGGA] [[[TEXTDOMÄN] MDLID] | [-s [MDLID]...]]\n"
+" -d, --domain=TEXTDOMÄN hämta översatta meddelanden från TEXTDOMÄN\n"
+" -e expandera några kontrollsekvenser\n"
+" -E (ignorerad för bakåtkompatibilitet)\n"
+" -h, --help visa denna hjälptext och avsluta\n"
+" -n skriv inte ut avslutande radframmatning\n"
+" -V, --version visa versionsinformation och avsluta\n"
+" [TEXTDOMÄN] MDLID hämta översatt meddelande som motsvarar\n"
+" MDLID från TEXTDOMÄN\n"
+
+#: src/gettextp.c:245
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
+"\n"
+"Om parametern TEXTDOMÄN utelämnas så bestäms domänen av miljövariabeln\n"
+"TEXTDOMAIN. Om meddelandekatalogen inte hittas i den normala katalogen så\n"
+"kan en annan katalog anges med miljövariabeln TEXTDOMAINDIR.\n"
+"När flaggan -s ges så uppträder programmet som kommandot \"echo\".\n"
+"Men det kopierar inte enbart sina argument till standard ut. Istället\n"
+"översätts de argument som hittas i den valda meddelandekatalogen.\n"
+"Normal katalog för meddelandekataloger: %s\n"
+
+#: src/gettextp.c:255 src/msgcmp.c:200 src/msgcomm.c:442 src/msgfmt.c:388
+#: src/msgmerge.c:358 src/msgunfmt.c:234 src/xgettext.c:591
+#, fuzzy
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr ""
+"Rapportera fel till <bug-gnu-utils@prep.ai.mit.edu>.\n"
+"Rapportera fel på översättningen till <sv@li.org>.\n"
+
+#: src/message.c:900
+#, c-format
+msgid ""
+"internationalized messages should not contain the `\\%c' escape sequence"
+msgstr ""
+"internationaliserade meddelanden bör inte ha kontrollsekvensen \"\\%c\""
+
+#: src/message.c:1231
+#, c-format
+msgid "cannot create output file \"%s\""
+msgstr "kan inte skapa utfilen \"%s\""
+
+#: src/message.c:1238
+#, no-c-format
+msgid "standard output"
+msgstr "standard ut"
+
+#: src/message.c:1298
+#, c-format
+msgid "error while writing \"%s\" file"
+msgstr "fel vid skrivning till filen \"%s\""
+
+#: src/msgcmp.c:160 src/msgmerge.c:279
+msgid "no input files given"
+msgstr "inga infiler givna"
+
+#: src/msgcmp.c:165 src/msgmerge.c:284
+msgid "exactly 2 input files required"
+msgstr "exakt 2 infiler krävs"
+
+#: src/msgcmp.c:186
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Compare two Uniforum style .po files to check that both contain the same\n"
+"set of msgid strings. The def.po file is an existing PO file with the\n"
+"old translations. The ref.po file is the last created PO file\n"
+"(generally by xgettext). This is useful for checking that you have\n"
+"translated each and every message in your program. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better diagnostics.\n"
+msgstr ""
+"Användning: %s [FLAGGA] def.po ref.po\n"
+"Obligatoriska argument för långa flaggor är obligatoriska även för korta.\n"
+" -D, --directory=KATALOG sök infiler även i KATALOG\n"
+" -h, --help visa denna hjälptext och avsluta\n"
+" -V, --version visa versionsinformation och avsluta\n"
+"\n"
+"Jämför två .po-filer av Uniforum-typ för att kontrollera att de innehåller\n"
+"samma uppsättning id-strängar. Filen def.po är en existerande PO-fil med de\n"
+"gamla översättningarna. Filen ref.po är den senast skapade PO-filen\n"
+"(i allmänhet av xgettext). Detta är användbart för att kontrollera att du\n"
+"har översatt alla strängar i programmet. Om en exakt likhet inte kan\n"
+"hittas så används luddig jämförelse för att ge bättre felmeddelanden.\n"
+
+#: src/msgcmp.c:259 src/msgmerge.c:746
+msgid "this message is used but not defined..."
+msgstr "detta meddelande används men är inte definierat..."
+
+#: src/msgcmp.c:261 src/msgmerge.c:748
+msgid "...but this definition is similar"
+msgstr "...men denna definition är likartad"
+
+#: src/msgcmp.c:267 src/msgmerge.c:775
+#, c-format
+msgid "this message is used but not defined in %s"
+msgstr "detta meddelande används men är inte definierat i %s"
+
+#: src/msgcmp.c:281
+msgid "warning: this message is not used"
+msgstr "varning: detta meddelande används inte"
+
+#: src/msgcmp.c:355 src/msgfmt.c:633 src/msgmerge.c:517 src/xgettext.c:1070
+msgid "duplicate message definition"
+msgstr "meddelandedefinitionen är duplicerad"
+
+#: src/msgcmp.c:356 src/msgfmt.c:634 src/msgmerge.c:518 src/xgettext.c:1071
+msgid "...this is the location of the first definition"
+msgstr "...detta är platsen för den första definitionen"
+
+#: src/msgcmp.c:396 src/msgmerge.c:566
+#, c-format
+msgid "this message has no definition in the \"%s\" domain"
+msgstr "detta meddelande har ingen definition i domänen \"%s\""
+
+#. We are about to construct the absolute path to the
+#. directory for the output files but asprintf failed.
+#: src/msgcomm.c:238 src/xgettext.c:340 src/xgettext.c:1265
+msgid "while preparing output"
+msgstr "när resultatet förbereddes"
+
+#: src/msgcomm.c:273 src/msgcomm.c:277 src/xgettext.c:378 src/xgettext.c:382
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s och %s är ömsesidigt uteslutande"
+
+#: src/msgcomm.c:341
+msgid "at least two files must be specified"
+msgstr ""
+
+#: src/msgcomm.c:360
+#, c-format
+msgid "impossible selection criteria specified (%d < n < %d)"
+msgstr ""
+
+#: src/msgcomm.c:400
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" -F, --sort-by-file sort output by file location\n"
+" -h, --help display this help and exit\n"
+msgstr ""
+"Användning: %s [FLAGGA] INFIL ...\n"
+"Obligatoriska argument för långa flaggor är obligatoriska även för korta.\n"
+" -a, --extract-all extrahera alla strängar\n"
+" -c, --add-comments[=MÄRKE] skriv kommentarsblock med MÄRKE (eller de\n"
+" före nyckelordsrader) till resultatet\n"
+" -C, --c++ förkortning för --language=C++\n"
+" --debug mer detaljerad igenkänning av formatsträngar\n"
+" -d, --default-domain=NAMN använd NAMN.po som utfil (i st.f messages.po)\n"
+" -D, --directory=KATALOG sök infiler även i KATALOG\n"
+" -e, --no-escape använd inte C-kontrollsekvenser i resultatet\n"
+" (normalläge)\n"
+" -E, --escape använd C-kontrollsekvenser i resultatet, men\n"
+" inte \\v eller \\a\n"
+" -f, --files-from=FIL hämta lista med infiler från FIL\n"
+" --force-po skriv PO-fil även om den är tom\n"
+" --foreign-user utelämna FSF copyright-text i resultatet\n"
+" -F, --sort-by-file sortera resultatet efter filposition\n"
+
+#: src/msgcomm.c:412
+#, fuzzy
+msgid ""
+" -i, --indent write the .po file using indented style\n"
+" --no-location do not write '#: filename:line' lines\n"
+" -n, --add-location generate '#: filename:line' lines "
+"(default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory "
+"DIR\n"
+" -s, --sort-output generate sorted output and remove "
+"duplicates\n"
+" --strict write out strict Uniforum conforming .po "
+"file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -u, --unique shorthand for --less-than=2, requests\n"
+" that only unique messages be printed\n"
+msgstr ""
+" -n, --add-location skriv ut raderna \"#: filnamn:rad\"\n"
+" (normalläge)\n"
+" --omit-header skriv inte ut huvudrader med msgid \"\"\n"
+" -o, --output=FIL skriv resultatet till FIL\n"
+" -p, --output-dir=KATALOG utfiler placeras i katalogen KATALOG\n"
+" -s, --sort-output sortera resultatet och ta bort dubbletter\n"
+" --strict skriv ut en .po-fil som följer Uniforum "
+"strikt\n"
+" -T, --trigraphs hantera ANSI C treteckenssekvenser i "
+"infiler\n"
+" -V, --version visa versionsinformation och avsluta\n"
+" -w, --width=ANTAL sätt antal kolumner i resultatet\n"
+" -x, --exclude-file=FIL rader från FIL tas inte ut\n"
+"\n"
+"Om INFIL är - så läses standard in.\n"
+
+#: src/msgcomm.c:425
+msgid ""
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -<, --less-than=NUMBER print messages with less than this many\n"
+" definitions, defaults to infinite if not\n"
+" set\n"
+" ->, --more-than=NUMBER print messages with more than this many\n"
+" definitions, defaults to 1 if not set\n"
+"\n"
+"Find messages which are common to two or more of the specified PO files.\n"
+"By using the --more-than option, greater commonality may be requested\n"
+"before messages are printed. Conversely, the --less-than option may be\n"
+"used to specify less commonality before messages are printed (i.e.\n"
+"--less-than=2 will only print the unique messages). Translations,\n"
+"comments and extract comments will be preserved, but only from the first\n"
+"PO file to define them. File positions from all PO files will be\n"
+"preserved.\n"
+msgstr ""
+
+#: src/msgcomm.c:476 src/msgunfmt.c:357 src/po-lex.c:74 src/xget-lex.c:159
+#: src/xget-lex.c:174 src/xget-lex.c:191 src/xgettext.c:625
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr "fel uppstod när \"%s\" öppnades för läsning"
+
+#: src/msgcomm.c:557 src/xgettext.c:667 src/xgettext.c:977
+msgid "this file may not contain domain directives"
+msgstr "denna fil kan inte innehålla domändirektiv"
+
+#: src/msgfmt.c:273 src/xgettext.c:417
+msgid "no input file given"
+msgstr "inga infiler givna"
+
+#: src/msgfmt.c:321
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr "fel uppstod när \"%s\" öppnades för skrivning"
+
+#: src/msgfmt.c:343
+#, c-format
+msgid "%d translated messages"
+msgstr "%d översatta meddelanden"
+
+#: src/msgfmt.c:345
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ", %d luddiga översättningar"
+
+#: src/msgfmt.c:347
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ", %d oöversatta meddelanden"
+
+#: src/msgfmt.c:366
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+"Användning: %s [FLAGGA] filnamn.po ...\n"
+"Obligatoriska argument för långa flaggor är obligatoriska även för korta.\n"
+" -a, --alignment=ANTAL lägg strängar på jämna ANTAL byte (normalt: %d)\n"
+" -c, --check utför språkberoende kontroll av strängar\n"
+" -D, --directory=KATALOG sök infiler även i KATALOG\n"
+" -f, --use-fuzzy använd luddiga poster i resultatet\n"
+" -h, --help visa denna hjälptext och avsluta\n"
+" --no-hash hashtabellen inkluderas inte i binärfilen\n"
+" -o, --output-file=FIL utfilens namn blir FIL\n"
+" --statistics skriv ut statistik om översättningarna\n"
+" --strict kör i strikt Uniforum-läge\n"
+" -v, --verbose visa anomalier i infilen\n"
+" -V, --version visa versionsinformation och avsluta\n"
+"\n"
+"Ger man -v flaggan mer än en gång så ökas pratsamheten.\n"
+"\n"
+"Om infilen är - så läses standard in. Om utfilen är - så skrivs resultatet\n"
+"till standard ut.\n"
+
+#: src/msgfmt.c:409
+msgid "while creating hash table"
+msgstr "när hashtabellen skapades"
+
+#: src/msgfmt.c:451
+#, fuzzy, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr "%s: varning: källfilen innehåller luddiga översättningar"
+
+#: src/msgfmt.c:474
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr "domännamnet \"%s\" är inte lämpligt som filnamn"
+
+#: src/msgfmt.c:479
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr "domännamnet \"%s\" är inte lämpligt som filnamn: använder ett prefix"
+
+#. We don't change the exit status here because this is really
+#. only an information.
+#: src/msgfmt.c:492
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr "direktivet \"domain %s\" ignoreras"
+
+#: src/msgfmt.c:520
+msgid "empty `msgstr' entry ignored"
+msgstr "tom \"msgstr\"-rad ignorerad"
+
+#: src/msgfmt.c:521
+msgid "fuzzy `msgstr' entry ignored"
+msgstr "luddig \"msgstr\"-rad ignorerad"
+
+#: src/msgfmt.c:564
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr "fält \"%s\" saknas i huvudet"
+
+#: src/msgfmt.c:567
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr "huvudrad \"%s\" bör ligga i början på raden"
+
+#: src/msgfmt.c:577
+msgid "some header fields still have the initial default value"
+msgstr "vissa huvudrader har kvar initiala standardvärden"
+
+#: src/msgfmt.c:588
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr "huvudrad \"%s\" har kvar initialt standardvärde"
+
+#: src/msgfmt.c:673
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr "%s: varning: källfilen innehåller luddiga översättningar"
+
+#: src/msgfmt.c:875
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr "\"msgid\"- och \"msgstr\"-raderna börjar inte båda med \"\\n\""
+
+#: src/msgfmt.c:883
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr "\"msgid\"- och \"msgstr\"-raderna slutar inte båda med \"\\n\""
+
+#: src/msgfmt.c:897
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr "antalet formateringsdirektiv i \"msgid\" och \"msgstr\" är olika"
+
+#: src/msgfmt.c:914
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr "formateringsdirektivet för parametern %u är inte likadant"
+
+#: src/msgmerge.c:328
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] def.po ref.po\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -C, --compendium=FILE additional library of message translations,\n"
+" may be specified more than once\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent indented output style\n"
+" -o, --output-file=FILE result will be written to FILE\n"
+" --no-location suppress '#: filename:line' lines\n"
+" --add-location preserve '#: filename:line' lines (default)\n"
+" --strict strict Uniforum output style\n"
+" -v, --verbose increase verbosity level\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Användning: %s [FLAGGA] def.po ref.po\n"
+"Obligatoriska argument för långa flaggor är obligatoriska även för korta.\n"
+" -D, --directory=KATALOG sök infiler även i KATALOG\n"
+" -e, --no-escape använd inte C-kontrollsekvenser i resultatet\n"
+" (normalläge)\n"
+" -E, --escape använd C-kontrollsekvenser i resultatet, men\n"
+" inte \\v eller \\a\n"
+" --force-po skriv PO-fil även om den är tom\n"
+" -h, --help visa denna hjälptext och avsluta\n"
+" -i, --indent indentera resultatet\n"
+" -o, --output-file=FIL skriv resultatet till FIL\n"
+" --no-location skriv inte rader med \"#: filnamn:rad\"\n"
+" --add-location bevara rader med \"#: filnamn:rad\" (normalläge)\n"
+" --strict strikt Uniforum-format på resultatet\n"
+" -v --verbose öka mängden information i meddelanden\n"
+" -V, --version visa versionsinformation och avsluta\n"
+" -w, --width=ANTAL sätt antal kolumner i resultatet\n"
+
+#: src/msgmerge.c:348
+#, no-wrap
+msgid ""
+"\n"
+"Merges two Uniforum style .po files together. The def.po file is an\n"
+"existing PO file with the old translations which will be taken over to\n"
+"the newly created file as long as they still match; comments will be\n"
+"preserved, but extract comments and file positions will be discarded.\n"
+"The ref.po file is the last created PO file (generally by xgettext), any\n"
+"translations or comments in the file will be discarded, however dot\n"
+"comments and file positions will be preserved. Where an exact match\n"
+"cannot be found, fuzzy matching is used to produce better results. The\n"
+"results are written to stdout unless an output file is specified.\n"
+msgstr ""
+"\n"
+"Slår samman två .po-filer av Uniforum-typ. Filen def.po är en\n"
+"existerande PO-fil som innehåller de gamla översättningarna som kommer att\n"
+"flyttas över till den nya filen om de är lika. Kommentarer bevaras men\n"
+"extraheringskommentarer och filpositioner kastas bort.\n"
+"Filen ref.po är den senast skapade PO-filen (i allmänhet med xgettext). Alla\n"
+"översättningar och kommentarer i filen kastas bort, dock bevaras\n"
+"punktkommentarer och filpositioner. Om en exakt likhet\n"
+"inte kan hittas så används luddig jämförelse för att ge bättre resultat.\n"
+"Resultatet skrivs till standard ut om inte en utfil anges.\n"
+"\n"
+
+#: src/msgmerge.c:804
+#, c-format
+msgid ""
+"%sRead %d old + %d reference, merged %d, fuzzied %d, missing %d, obsolete "
+"%d.\n"
+msgstr ""
+"%sLäste %d gamla + %d referenser, %d sammanslagna, %d luddiga, %d saknade, "
+"%d föråldrade.\n"
+
+#: src/msgmerge.c:810
+msgid " done.\n"
+msgstr " klar.\n"
+
+#: src/msgunfmt.c:215
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [FILE]...\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" --force-po write PO file even if empty\n"
+" -h, --help display this help and exit\n"
+" -i, --indent write indented output style\n"
+" -o, --output-file=FILE write output into FILE instead of standard output\n"
+" --strict write strict uniforum style\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+msgstr ""
+"Användning: %s [FLAGGA] [FIL]...\n"
+"Obligatoriska argument för långa flaggor är obligatoriska även för korta.\n"
+" -e, --no-escape använd inte C-kontrollsekvenser i resultatet\n"
+" (normalläge)\n"
+" -E, --escape använd C-kontrollsekvenser i resultatet, men\n"
+" inte \\v eller \\a\n"
+" --force-po skriv PO-fil även om den är tom\n"
+" -h, --help visa denna hjälptext och avsluta\n"
+" -i, --indent indentera resultatet\n"
+" -o, --output-file=FIL skriv resultatet till FIL i stället för standard ut\n"
+" --strict strikt Uniforum-format på resultatet\n"
+" -V, --version visa versionsinformation och avsluta\n"
+" -w, --width=ANTAL sätt antal kolumner i resultatet\n"
+
+#: src/msgunfmt.c:229
+#, no-wrap
+msgid ""
+"\n"
+"Convert binary .mo files to Uniforum style .po files.\n"
+"Both little-endian and big-endian .mo files are handled.\n"
+"If no input file is given or it is -, standard input is read.\n"
+"By default the output is written to standard output.\n"
+msgstr ""
+"\n"
+"Konvertera binära .mo-filer till .po-filer av Uniforum-typ.\n"
+"Båda typer av byteordning (\"little-endian\" och \"big-endian\") i .mo-filer\n"
+"förstås.\n"
+"Om ingen infil ges eller om den är - så läses standard in.\n"
+"I normalläge så skrivs resultatet till standard ut.\n"
+
+#: src/msgunfmt.c:266 src/msgunfmt.c:330 src/po-lex.c:185 src/xget-lex.c:254
+#, c-format
+msgid "error while reading \"%s\""
+msgstr "fel uppstod då \"%s\" lästes"
+
+#: src/msgunfmt.c:267 src/msgunfmt.c:331
+#, c-format
+msgid "file \"%s\" truncated"
+msgstr "filen \"%s\" avkortad"
+
+#: src/msgunfmt.c:298
+#, c-format
+msgid "seek \"%s\" offset %ld failed"
+msgstr "sökning \"%s\", position %ld misslyckades"
+
+#: src/msgunfmt.c:373
+#, c-format
+msgid "file \"%s\" is not in GNU .mo format"
+msgstr "filen \"%s\" är inte på GNUs .mo-format"
+
+#: ../../src/po-gram.y:83
+msgid "missing `msgstr' section"
+msgstr "\"msgstr\"-delen saknas"
+
+#: src/po-lex.c:84
+#, c-format
+msgid "found %d fatal errors"
+msgstr "%d allvarliga fel hittades"
+
+#: src/po-lex.c:129 src/po-lex.c:168
+msgid "too many errors, aborting"
+msgstr "för många fel, avbryter körningen"
+
+#: src/po-lex.c:241
+#, c-format
+msgid "keyword \"%s\" unknown"
+msgstr "nyckelordet \"%s\" är okänt"
+
+#: src/po-lex.c:335
+#, fuzzy
+msgid "invalid control sequence"
+msgstr "otillåten kontrollsekvens"
+
+#: src/po-lex.c:419
+msgid "end-of-line within string"
+msgstr "radslut inne i en sträng"
+
+#: src/po-lex.c:424
+msgid "end-of-file within string"
+msgstr "filslut inne i en sträng"
+
+#: src/xget-lex.c:150
+msgid "standard input"
+msgstr "standard in"
+
+#: src/xget-lex.c:892
+#, c-format
+msgid "%s:%d: warning: unterminated character constant"
+msgstr "%s:%d: varning: oavslutad teckenkonstant"
+
+#: src/xget-lex.c:914
+#, c-format
+msgid "%s:%d: warning: unterminated string literal"
+msgstr "%s:%d: varning: oavslutad sträng"
+
+#: src/xgettext.c:386
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+"--join-existing kan inte användas då resultatet skrivs till standard ut"
+
+#: src/xgettext.c:391
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#: src/xgettext.c:508
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr "varning: filtyp \"%s\" med suffix \"%s\" är okänd; försöker med C"
+
+#: src/xgettext.c:544
+#, fuzzy, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+"Användning: %s [FLAGGA] INFIL ...\n"
+"Obligatoriska argument för långa flaggor är obligatoriska även för korta.\n"
+" -a, --extract-all extrahera alla strängar\n"
+" -c, --add-comments[=MÄRKE] skriv kommentarsblock med MÄRKE (eller de\n"
+" före nyckelordsrader) till resultatet\n"
+" -C, --c++ förkortning för --language=C++\n"
+" --debug mer detaljerad igenkänning av formatsträngar\n"
+" -d, --default-domain=NAMN använd NAMN.po som utfil (i st.f messages.po)\n"
+" -D, --directory=KATALOG sök infiler även i KATALOG\n"
+" -e, --no-escape använd inte C-kontrollsekvenser i resultatet\n"
+" (normalläge)\n"
+" -E, --escape använd C-kontrollsekvenser i resultatet, men\n"
+" inte \\v eller \\a\n"
+" -f, --files-from=FIL hämta lista med infiler från FIL\n"
+" --force-po skriv PO-fil även om den är tom\n"
+" --foreign-user utelämna FSF copyright-text i resultatet\n"
+" -F, --sort-by-file sortera resultatet efter filposition\n"
+
+#: src/xgettext.c:564
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+" -h, --help visa denna hjälptext och avsluta\n"
+" -i, --indent indentera resultatet\n"
+" -j, --join-existing smält ihop meddelanden med existerande fil.\n"
+" -k, --keyword[=ORD] extra nyckelord att titta efter (om ORD\n"
+" utelämnas, titta inte efter standardnyckelord)\n"
+" -l, --string-limit=ANTAL maximera stränglängden till ANTAL i st.f %u\n"
+" -L, --language=SPRÅK känn igen angivet SPRÅK (C, C++, PO),\n"
+" annars gissas språket från filändelsen.\n"
+" -m, --msgstr-prefix[=STRÄNG] inled översatta strängar med STRÄNG eller \"\"\n"
+" -M, --msgstr-suffix[=STRÄNG] avsluta översatta strängar med STRÄNG eller \"\"\n"
+" --no-location skriv inte ut raderna \"#: filnamn:rad\"\n"
+
+#: src/xgettext.c:578
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+" -n, --add-location skriv ut raderna \"#: filnamn:rad\"\n"
+" (normalläge)\n"
+" --omit-header skriv inte ut huvudrader med msgid \"\"\n"
+" -o, --output=FIL skriv resultatet till FIL\n"
+" -p, --output-dir=KATALOG utfiler placeras i katalogen KATALOG\n"
+" -s, --sort-output sortera resultatet och ta bort dubbletter\n"
+" --strict skriv ut en .po-fil som följer Uniforum strikt\n"
+" -T, --trigraphs hantera ANSI C treteckenssekvenser i infiler\n"
+" -V, --version visa versionsinformation och avsluta\n"
+" -w, --width=ANTAL sätt antal kolumner i resultatet\n"
+" -x, --exclude-file=FIL rader från FIL tas inte ut\n"
+"\n"
+"Om INFIL är - så läses standard in.\n"
+
+#: src/xgettext.c:1351
+#, c-format
+msgid "language `%s' unknown"
+msgstr "språket \"%s\" okänt"
+
+#~ msgid "%s: warning: no header entry found"
+#~ msgstr "%s: varning: inga huvudrader funna"
+
+#~ msgid "Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.\n"
+#~ msgstr ""
+#~ "Rapportera fel till <bug-gnu-utils@prep.ai.mit.edu>.\n"
+#~ "Rapportera fel på översättningen till <sv@li.org>.\n"
diff --git a/src/ChangeLog b/src/ChangeLog
new file mode 100644
index 0000000..4c08e95
--- /dev/null
+++ b/src/ChangeLog
@@ -0,0 +1,1548 @@
+2000-05-06 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Replace po-gram.gen.h and po-hash.gen.h
+ with po-gram-gen.h and po-hash-gen.h.
+ (YACC): Define as @YACC@ -d.
+ (YFLAGS): Removed.
+ (msgcmp_SOURCES): Replace dependencies on po-gram.gen.c and
+ po-hash.gen.c with po-gram-gen.y and po-hash-gen.y.
+ (msgmerge_SOURCES): Likewise.
+ (xgettext_SOURCES): Likewise.
+ (msgcomm_SOURCES): Likewise.
+ Add rule to built po-gram-gen2.h and make po-lex.o depend on it.
+ Remove rules to generate po-gram.gen.c and po-hash.gen.c.
+ Patches by Jim Meyering.
+
+ * po-lex.c: Include "po-gram-gen2.h" instead of "po-gram.gen.h".
+
+ * message.c (message_list_search_fuzzy_inner): Define static. Take
+ extra parameter with best weight so far.
+ (message_list_search_fuzzy): New function.
+ (message_list_list_alloc): New function.
+ (message_list_list_append): New function.
+ (message_list_list_append_list): New function.
+ (message_list_list_search): New function.
+ (message_list_list_search_fuzzy): New function.
+ (message_list_list_free): New function.
+ * message.h (message_list_list_ty): Define type.
+ (message_list_list_alloc): Add prototype.
+ (message_list_list_free): Likewise.
+ (message_list_list_append): Likewise.
+ (message_list_list_append_list): Likewise.
+ (message_list_list_search): Likewise.
+ (message_list_list_search_fuzzy): Likewise.
+ * msgmerge.c: Implement --compendium/-C option.
+ * xget-lex.c (xgettext_any_keywords): New function.
+ * xget-lex.h (xgettext_any_keywords): Add prototype.
+ * xgettext.c: Use xgettext_any_keywords to see whether keywords are
+ defined.
+ Patches by Peter Miller.
+
+1998-05-15 Ulrich Drepper <drepper@cygnus.com>
+
+ * po-lex.c (control_sequence): Replace illegal with invalid.
+
+1998-04-30 Ulrich Drepper <drepper@cygnus.com>
+
+ * dir-list.c: Update Peter Miller's mail address.
+ * dir-list.h: Likewise.
+ * message.c: Likewise.
+ * message.h: Likewise.
+ * msgcmp.c: Likewise.
+ * msgcomm.c: Likewise.
+ * msgmerge.c: Likewise.
+ * po-gram.h: Likewise.
+ * po-gram.y: Likewise.
+ * po-hash.h: Likewise.
+ * po-hash.y: Likewise.
+ * po-lex.c: Likewise.
+ * po-lex.h: Likewise.
+ * po.c: Likewise.
+ * po.h: Likewise.
+ * str-list.c: Likewise.
+ * str-list.h: Likewise.
+ * xget-lex.c: Likewise.
+ * xget-lex.h: Likewise.
+
+1998-04-30 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgfmt.c: Fix typo in --help text.
+ Reported by Jan.Djarv@mbox200.swipnet.se.
+
+1998-04-03 01:18 1998 Philippe De Muyter <phdm@macqel.be>
+
+ * str-list.h (stddef.h): Include that file only if STDC_HEADERS.
+ Otherwise include sys/types.h and stdio.h.
+ * msgmerge.c (string.h): Include that file if HAVE_STRING_H, not
+ if STDC_HEADERS.
+
+1998-04-29 Ulrich Drepper <drepper@cygnus.com>
+
+ * message.c: Use unsigned char for various local variables.
+ * xgettext.c (comment_tag): Define as unsigned char *.
+ For loosing Solaris systems. Patches by Jim Meyering.
+
+ * msgfmt.c: Use extra braces in if to shut up gcc.
+ * po-lex.h: Don't declare function po_gram_error and
+ gram_error_at_line if macros with the same names are defined.
+ * Makefile.am (MAINTAINERCLEANFILES): New variable.
+ Patches by Jim Meyering.
+
+1998-04-27 Ulrich Drepper <drepper@cygnus.com>
+
+ * xgettext.c: Update year and bug report address. Add little
+ explanation in --help messages.
+ * msgfmt.c: Likewise.
+
+ * msgmerge.c: Update year and bug report address.
+ * msgcomm.c: Likewise.
+ * msgcmp.c: Likewise.
+ * msgunfmt.c: Likewise.
+
+1997-08-31 22:20 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgfmt.c (format_directive_message): Count fuzzy messages as
+ fuzzy, even if they are not written to the output file.
+
+1997-08-18 13:47 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * msgcomm.c (sys/types.h): File included.
+
+1997-08-15 12:38 Ulrich Drepper <drepper@cygnus.com>
+
+ * xgettext.c: Include <sys/param.h> to define MIN/MAX for HP/UX.
+ Patch by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
+
+ * msgfmt.c: Change DEFAULT_ALIGNMENT to DEFAULT_OUTPUT_ALIGNMENT
+ to avoid clash with macro with same name in obstack.c.
+ Reported by Akim Demaille <demaille@inf.enst.fr>.
+
+1997-08-01 15:48 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Require version 1.2.
+
+1997-05-07 04:21 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgcomm.c (main): Print author in --version message.
+ * msgunfmt.c: Likewise.
+ * msgcmp.c: Likewise.
+ * msgmerge.c: Likewise.
+ * msgfmt.c: Likewise.
+ * xgettext.c: Likewise.
+ * gettextp.c: Likewise.
+
+1997-05-01 02:33 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgcmp.c (main): Update copyright.
+ * msgunfmt.c (main): Likewise.
+ * msgcomm.c (main): Likewise.
+ * msgmerge.c (main): Likewise.
+ * msgfmt.c (main): Likewise.
+ * gettextp.c (main): Likewise.
+
+ * msgcomm.c: Fix comment about default output (Jan Djarv). Split
+ help message.
+
+1997-03-31 16:09 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgcomm.c (usage): Use program_name as argument for print to
+ print message, not stdout.
+ Patch by Jan Djarv <jan.djarv@mbox200.swipnet.se>.
+
+Mon Mar 10 06:18:58 1997 Ulrich Drepper <drepper@cygnus.com>
+
+ * xgettext.c: Implement generic language scanner handling.
+
+ * xget-lex.c (phase7_getc): Better comments.
+ (phase5_get): Print warnings about unterminated strings and
+ character constants.
+
+ * po-lex.c (po_gram_error): Don't count continuation lines in
+ messages as errors.
+ (gram_error_at_line): Likewise.
+ * po-lex.h: Likewise for macro versions.
+
+ * po-hash.y: Correct typo.
+
+ * msgunfmt.c: Implement --force-po option.
+
+ * msgmerge.c: Implement --force-po, --no-location, and
+ --add-location options.
+
+ * msgfmt.c (format_directive_message): If messages are duplicated
+ and translations are different this is a fatal error.
+
+ * msgcmp.c (compare_directive_message): Use correct format for
+ continuation line in message.
+
+ * message.h: Add prototype for message_list_delete_nth.
+
+ * message.c: Add message_list_delete_nth function.
+
+ * Makefile.am (bin_PROGRAMS): Add msgcomm. (l): New variable.
+ Set to `l' is using libtool. (LDADD): Change for the needs of
+ libtool. (msgcomm_SOURCES): New variable.
+
+ * msgcomm.c: New file.
+
+Wed Dec 4 01:58:10 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (LDADD): Change for use of libtool.
+
+Tue Dec 3 18:08:46 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * xget-lex.c (phase7_getc): Return \n when newline is seen, not
+ P7_NEWLINE.
+
+ * xgettext.c (main): Implement --foreign-user flag.
+
+ * msgcmp.c (main): Change --version output to what is required by
+ GNU standards. (usage): Correct bug report address.
+ * msgfmt.c: Likewise.
+ * msgunfmt.c: Likewise.
+ * msgmerge.c: Likewise.
+ * xgettext.c: Likewise.
+ * gettextp.c: Likewise.
+
+Sat Sep 14 04:28:09 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgunfmt.c (usage): Put bug report address in separate string.
+ * msgmerge.c (usage): Likewise.
+ * msgcmp.c (usage): Likewise.
+ * xgettext.c (usage): Likewise.
+ * msgfmt.c (usage): Likewise.
+ * gettextp.c (usage): Likewise.
+
+Thu Sep 12 21:40:48 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * msgfmt.c (check_pair): Fix error messages.
+
+Sat Aug 31 14:05:29 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgunfmt.c (usage): Add hint about where to report bugs to.
+ * msgmerge.c (usage): Likewise.
+ * msgcmp.c (usage): Likewise.
+ * xgettext.c (usage): Likewise.
+ * msgfmt.c (usage): Likewise.
+ * gettextp.c (usage): Likewise.
+
+Sat Aug 31 04:49:38 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettextp.c: Don't include <libintl.h> since this can generate
+ conflicts.
+
+Mon Jul 15 02:21:25 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgfmt.c: Major change: msgfmt now does not write fuzzy messages
+ out by default. The option -f/--use-fuzzy must be used to
+ explicitely tell to do it.
+
+Sat Jul 13 20:23:34 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * xget-lex.c (phase6_get): Reset selected comments on every
+ preprocessor directive.
+
+Fri Jul 12 12:38:49 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * xgettext.c (main): Remove `v' from short option list.
+
+Sat Jul 6 11:22:47 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * message.c (message_merge): Add some casts to (char *) in alloca
+ calls. Make KNOWN_FIELDS array static.
+
+Sat Jul 6 11:15:43 1996 Jim Meyering <meyering@na-net.ornl.gov>
+
+ * msgfmt.c (check_pair): Correct English in Message.
+
+Fri Jul 5 17:27:11 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * message.c (message_merge): Terminate string for UNKNOWN fields
+ in header entry.
+
+ * message.c (message_merge): Don't print POT-Revision-Date twice.
+
+ * msgfmt.c: Implement --statistics.
+ Suggested by Santiago Vila Doncel.
+
+ * msgfmt.c: and change message checking so that tests for leading
+ and trailing \n are always performed.
+ Suggested by François Pinard.
+
+Wed Jun 19 02:42:52 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * message.c (message_merge): Implement sorting of header entry
+ lines.
+
+Sat Jun 15 19:46:50 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgmerge.c (usage): Correct -w option in help string (was -W).
+
+Tue Jun 11 15:28:44 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * xget-lex.c, xget-lex.h (xgettext_lex_comment): Change parameter
+ type to size_t.
+
+ * po-lex.h, po-lex.c (gram_max_allowed_errors): Change type to
+ size_t.
+
+ * message.c, message.h (message_page_width_set): Change parameter
+ type to size_t.
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Add variable. Must be defined
+ in all subdirs.
+
+Mon Jun 10 02:53:52 1996 Marcus Daniels <marcus@sysc.pdx.edu>
+
+ * dir-list.c: Include system.h in order to get size_t and NULL.
+
+Thu Jun 6 01:59:31 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * str-list.h: Include <stddef.h> to get size_t defined.
+ Reported by Philippe Defert.
+
+ * Makefile.am (LDADD): Remove `@INTLLIBS@ ../lib/libnlsut.a
+ @LIBS@'. This is not necessary anymore.
+
+Wed Jun 5 00:00:08 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * xgettext.c, msgunfmt.c (usage): Correct --page-width to --width
+ in usage string.
+
+ * open-po.c (open_po_file): Implement search path for PO files.
+
+ * xget-lex.c (xgettext_lex_open): Implement search path for PO
+ files. Patch by Peter Miller.
+
+ * message.h (struct message_ty): Add do_wrap member.
+ Add prototypes for parse_c_width_description_string and
+ message_page_width_set.
+
+ * xgettext.c: Implement --width option to specify width for which
+ line wrapping is done. Change --directory option implement search
+ path instead of single directory. Patch by Peter Miller.
+
+ * message.c (wrap): Implement no-wrap special comment. If given
+ no wrapping is performed.
+
+ * gettextp.c, msgcmp.c, msgfmt.c, msgmerge.c, msgunfmt.c,
+ xgettext.c: Add `no-wrap' comments at usage message strings.
+
+ * msgcmp.c: Implement --directory to specify search path for .po
+ files. Patch by Peter Miller.
+
+Tue Jun 4 23:57:59 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgfmt.c: Implement --width option to specify width for which
+ line wrapping is done. Patch by Peter Miller.
+
+ * msgmerge.c: Implement --width option to specify width for which
+ line wrapping is done. Implement --directory to specify search
+ path for .po files. Patch by Peter Miller.
+
+ * msgunfmt.c: Implement --width option to specify width for which
+ line wrapping is done. Patch by Peter Miller.
+
+Tue Jun 4 00:12:25 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * po-hash.y: Add new clause where in GNU style format the name is
+ `file'.
+
+ * Makefile.am (noinst_HEADERS): Add dir-list.h.
+ (msgcmp_SOURCES, msgfmt_SOURCES, msgmerge_SOURCES, xgettext_SOURCES):
+ Add dir-list.c
+
+Mon Jun 3 00:43:07 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * message.h: Add new parameter for message_list_print.
+
+ * msgmerge.c, msgunfmt.c (main): Add new parameter to
+ message_list_print. Set to 0 because we don't need to know about
+ the reasoning.
+
+ * xgettext.c: Implement new option --debug which determines
+ whether a difference is made between c-format and
+ possible-c-format. Default is to print c-format for both cases.
+
+ * message.c (make_c_format_description_string): Take additional
+ parameter DEBUG. If nonzero, distinguish between c-format and
+ possible-c-format.
+
+ * message.c (message_print_obsolete): Copy precious translator
+ comment to output file. Reported by Santiago Vila Doncel.
+
+ * dir-list.c: Include file now is called dir-list.h, not
+ dir_list.h.
+
+ * message.c: Include <limits.h>.
+
+ * Makefile.am (EXTRA_DIST): Add variable to distribute po-gram.y
+ and po-hash.y.
+
+ * Makefile.am (msgfmt_SOURCES): Fix typo: msgfmt.o -> msgfmt.c.
+
+Sat Jun 1 04:33:48 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in: Remove support for tupdate. msgmerge is stable
+ now.
+
+Wed Apr 10 01:20:49 1996 Ulrich Drepper <drepper@myware>
+
+ * message.c (message_print_obsolete): Don't print
+ c-format/no-c-format flags for obsolete entries.
+
+ * xgettext.c (construct_header): Change DIST to ZONE in header
+ entry template.
+
+ * message.c (message_merge): Insert POT-Creation-Date field before
+ PO-Revision-Date.
+
+Tue Apr 9 17:13:34 1996 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (construct_header): Move POT-Creation-Date line
+ before PO-Revision-Date line.
+
+Fri Apr 5 12:07:19 1996 Ulrich Drepper <drepper@myware>
+
+ * msgmerge.c: Implement --quiet option to prevent dots printed as
+ progress report.
+ (merge): Don't print dots if `quiet'.
+
+ * msgmerge.c (merge): Nicer statistics message.
+
+ * message.c (message_merge): Update POT-Creation-Date field in
+ header entry from contents in reference file.
+
+ * msgfmt.c (format_directive_message): Better test for unchanged
+ fields in header entry.
+
+ * xgettext.c (difftm): Is back.
+ (construct_header): Print distance to GMT in POT file time stamp.
+
+ * xgettext.c (construct_header): Print leading comment and fuzzy
+ flag.
+
+ * message.c (message_print): Allow translator comment to fill more
+ than one line.
+
+ * xgettext.c (construct_header): Introduce POT-Creation-Date
+ field.
+
+Fri Apr 5 03:05:07 1996 Ulrich Drepper <drepper@myware>
+
+ * msgmerge.c (merge): Rename empty in missing. There might be
+ more empty messages which are not missed.
+
+ * msgmerge.c (merge): Terminate `.' line if no verbose output is
+ selected.
+
+ * msgmerge.c (main): Implement -v option to increase verbosity
+ level.
+ (merge): Print `.' to signal ongoing work.
+ Unless verbosity level > 1 don't print information about fuzzy and
+ missing matches. Instead print statistics at the end.
+ Suggested by François Pinard and Santiago Vila Doncel.
+
+Thu Apr 4 11:59:20 1996 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (difftm): Remove unused function.
+ (construct_header): Don't fill Last-Translator field with information
+ about curent user but instead constant text mentioning xgettext.
+
+ * message.c (message_list_search_fuzzy): Initialize mp before
+ using it.
+
+ * message.c (message_print): Normalize printed messages even more.
+ Don't print fuzzy flag is msgstr is empty.
+
+ * message.c (message_list_search_fuzzy): Don't try to match
+ against msgid if none if the msgstr of this message in non-empty.
+
+Thu Apr 4 01:57:37 1996 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (format_directive_message): When testing header entry
+ also check whether they still contain the initial values.
+ Suggested by François Pinard.
+
+Tue Apr 2 16:19:42 1996 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (main): Add "warning" to message about unknown input
+ file type.
+
+ * Makefile.in (all-gettext): New goal. Same as all.
+
+ * xgettext.c (usage): Rearange help strings. One of them was too
+ long for some dumb catgets programs. Reported by Marcus Daniels.
+
+ * msgfmt.c (format_directive_message): Check for standard header
+ entry fields.
+
+ * xgettext.c (construct_header): MIME-VERSION should be written
+ MIME-Version.
+
+ * msgmerge.c (main): Don't recognize -f option anymore. This is
+ the default now.
+
+ * msgfmt.c (format_debrief): New function. Warn if no header
+ entry is found.
+ (format_directive_message): Remember if header entry is found.
+
+Tue Apr 2 11:12:15 1996 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (format_constructor): New function. Initialize
+ is_c_format field.
+ (format_directive_message): Clear is_c_format field for next message
+ at the end.
+
+ * xgettext.c, po-lex.h, po-lex.c, po-gram.y, msgmerge.c, msgfmt.c,
+ msgcmp.c: Use gram_error_at_line instead of gram_error_with_loc
+ and error_at_line instead of error_with_loc. Roland does not like
+ my English.
+
+Tue Apr 2 03:27:34 1996 Ulrich Drepper <drepper@myware>
+
+ * msgunfmt.c (main): Removed -S option. People should think twice
+ before using this and so are forced to use the long version.
+
+Tue Apr 2 03:25:56 1996 François Pinard <pinard@iro.umontreal.ca>
+
+ * msgunfmt.c (usage): Remove Tab character from message.
+
+Tue Apr 2 03:15:16 1996 Marcus Daniels <marcus@sysc.pdx.edu>
+
+ * message.c (significant_c_format_p): If is_c_format is `no' this
+ is significant.
+
+Tue Apr 2 03:12:24 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * po.c (po_comment_filepos): Make definition static as declaration
+ was before.
+
+ * msgunfmt.c (usage): Add missing \n to help string.
+
+Mon Apr 1 02:37:45 1996 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (main): When recognizing file type, default to C
+ instead of regarding it as an error. Suggested by Marcus Daniels.
+
+ * po.c (po_callback_comment): For now recognize #! also as special
+ comment.
+
+ * msgmerge.c (merge): Remove --force option. We now always write
+ the result. It makes no sense to reject the output because some
+ messages are not matching.
+
+ * po-lex.c (po-gram_error, gram_error_with_loc): Use
+ error_message_count instead of gram_nerrors.
+ (gram_nerrors): Remove definition.
+
+ * po-lex.h (po-gram_error, gram_error_with_loc): Use
+ error_message_count instead of gram_nerrors.
+
+ * xgettext.c: Remove verbose option and variable.
+ (test_whether_c_format): Don't return `possible' is string
+ contains no format specifier.
+
+Sun Mar 31 23:23:40 1996 Ulrich Drepper <drepper@myware>
+
+ * xget-lex.c (xgettext_lex): Fix typo. Reported by François
+ Pinard.
+
+Thu Mar 28 19:01:22 1996 Ulrich Drepper <drepper@myware>
+
+ * po.c (po_callback_comment): Correct handling of special
+ comments. Give whole comment to callback function instead of
+ tokenized form.
+
+Thu Mar 28 18:37:49 1996 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (remember_a_message): Always look through comments
+ because we have to look for c-format comments.
+
+ * message.h, msgmerge.c, xgettext.c, message.c, msgfmt.c:
+ Implement more detailed C format string handling. Basically coded
+ by Marcus Daniels.
+
+Thu Mar 28 16:52:56 1996 Marcus Daniels <marcus@sysc.pdx.edu>
+
+ * Makefile.in (MSGFMT_OBJ): Add message.o.
+
+Wed Mar 27 03:16:01 1996 Ulrich Drepper <drepper@myware>
+
+ * xget-lex.c (xgettext_lex): Correct implementation of comments
+ grouped with messages.
+
+Tue Mar 26 21:23:54 1996 Ulrich Drepper <drepper@myware>
+
+ * po.c (po_callback_comment): Remove unused variable string.
+ Include <ctype.h> because isspace is used.
+
+ * message.h (message_list_print): Undo change of Mon Mar 25
+ 03:34:44 1996. Don't print trailing comment. Remove additional
+ argument.
+
+ * message.c (message_list_print): Undo change of Mon Mar 25
+ 03:34:44 1996. Don't print trailing comment. We now have a
+ correct implementation of obsolete entry handling.
+ * msgmerge.c: Ditto.
+
+ * po-lex.h: Add prototype for po_lex_pass_obsolete_entries.
+
+ * po-lex.c (po_gram_lex): Implement handling of comments for
+ obsolete entries (#~).
+
+ * msgunfmt.c, xgettext.c (main): Undo change of Mon Mar 25
+ 03:34:44 1996. Remove added argument to message_list_print again.
+
+ * po-lex.c (po_gram_lex): Small optimization in string collection.
+
+ * message.c (message_print_obsolete): Obsolete messages are now
+ preceded by #~ on each line.
+
+ * xgettext.c (remember_a_message): Fix bug with dereferencing
+ dangling pointer. This caused xgettext test 1 to fail.
+
+ * xgettext.c (construct_header): Update format for file header.
+
+ * xgettext.c (extract_directive_message): Don't report error when
+ message variant exists but the value is the same. Reported by
+ Roland McGrath.
+
+ * message.c (wrap): Only write characters in escape notation if
+ explicitely wanted or if it is one of the well known escapes like
+ \n.
+
+ * msgunfmt.c (main): Adopt interface to GNU coding standard. All
+ given files on command line are input files. Output by default is
+ written to standard output and can be redirected using -o.
+
+Mon Mar 25 04:25:42 1996 Ulrich Drepper <drepper@myware>
+
+ * message.c, message.h (message_list_print): Parameter filename is
+ const.
+
+ * message.c (wrap): Change line break behaviour a bit. While it
+ is reasonable to break long line containing #: comments
+ immediately when reaching the the limit, this could lead to unnice
+ results for the strings in msgid and msgstr. The programmer
+ usually knows why the lines are that long.
+
+ So we break for now after reaching 2 * PAGE_WIDTH instead of
+ PAGE_WIDTH.
+
+ * message.c (message_list_print): Print blank line before trailing
+ comments.
+
+ * message.c (message_print_obsolete): Don't print anything for
+ obsolete entries with empty msgstr.
+
+Mon Mar 25 03:34:44 1996 Ulrich Drepper <drepper@myware>
+
+ * msgunfmt.c (main): Make program by default read from stdin and
+ by default write to stdout in the appropriate argument is not
+ given. Suggested by Franc,ois Pinard.
+
+ * msgfmt.c (format_directive_domain): Only check for correct
+ format string elements is special comment contains c-format.
+
+ * msgfmt.c: Use sizeof instead of strlen to determine length of
+ constant string.
+
+ * xgettext.c: Implement generation of c-format special comments.
+
+ * msgunfmt.c (main): Call message_list_print with additional
+ argument set to NULL.
+
+ * xgettext.c (main): Call message_list_print with additional
+ argument set to NULL;
+ (extract_class_ty): We don't have field comment_special anymore, but
+ instead flags fuzzy and c_format.
+ (extract_constructor): Reset fields fuzzy and c_format.
+ (extract_directive_message): Set flags according to special comments,
+ not string list.
+ (extract_comment_special): Set flags according to special comment.
+
+ * message.h (message_ty): We don't have field comment_special
+ anymore. Instead flags fuzzy and c_format.
+ (message_comment_special_append): Remove prototype.
+ (message_list_print): Add new argument to prototype.
+
+ * message.c (message_alloc): We don't have the comment_special,
+ but fuzzy and c_format.
+ (message_comment_special_append): Remove function. We now have flags.
+ (message_copy, message_merge): Copy fuzzy and c_format flag
+ appropriately.
+ (message_print, message_print_obsolete): Print special comment using
+ flags, not string list.
+ (message_list_print): Additional argument with trailing comments.
+ Printed at the end if not NULL.
+
+ * msgmerge.c (merge_class_ty): New fields fuzzy and c_format for
+ flags;
+ (trailing_comments): New global variable for list of trailing
+ comments in definition file.
+ (grammar): Takes an additional argument which if NULL gets the list of
+ trailing comments assigned to.
+ (main): Call message_list_print with additional argument of trailing
+ comments.
+ (merge_comment_special): Recognize fuzzy and c-format special comment.
+
+Sun Mar 24 17:35:26 1996 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (usage): Option --output-suffix does not exist
+ anymore.
+
+ * msgmerge.c (usage): --strict does not have short form -S.
+
+ * message.h (message_ty): New field `obsolete'.
+
+ * msgmerge.c (merge): Change behaviour not not matched entries.
+ Instead of giving a message write them out at the end of the
+ regular output and precede each line with `# '.
+
+ * message.c (message_list_print): Handle obsolete entries
+ separately by printing them at the end and preceded by `# '.
+ (message_print_obsolete): New function to print obsolete entries.
+
+ * Makefile.in ($(PROGRAMS)): Add generated libraries as
+ dependencies for programs.
+
+ * Makefile.in (PROGRAMS): Remove msgjoin.
+
+Sun Mar 24 01:03:32 1996 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (extract_comment_filepos): Only add line comment if
+ requested by -n option.
+
+ * po.c (po_callback_comment): Short by one bug in special comment
+ entry copying.
+
+ * po.c (po_callback_comment): Handle special comments. Separate
+ them into a list of comma separate entries.
+
+ * message.c (message_print): Format of lines containing fuzzy
+ comments et.al. is now `#, xxx'.
+
+ * Makefile.in: msgjoin program is not anymore generated.
+
+ * xgettext.c: First step to implementing general input file
+ handling. The program now recognizes the file type by the file
+ name extension and uses the appropriate function. For now two
+ file types are recognized: C/C++ and PO. Especially handling PO
+ files make the msgjoin program obsolete.
+
+Sat Mar 23 01:50:00 1996 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (verbose): Rename to verbose_level.
+ (main): Increment verbose_level each time -v option is given.
+ (format_directive_domain): Print some of the diagnostic messages only
+ if verbosity level is > 1. Suggested by Franc,ois Pinard for a
+ better interface to PO mode.
+
+ * xgettext.c (scan_c_file): Extract all string if `extract-all'
+ option is given. Reported by Roland McGrath.
+
+Thu Mar 14 14:55:20 1996 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (format_comment_special): Be prepared that special
+ comment contains more than one entry, separated by commas.
+
+ * message.c (message_print): Special comments are now written in a
+ line, separated by commas.
+
+ * msgmerge.c (merge): Replace `INEXACT' with `fuzzy'.
+
+Thu Mar 14 11:50:48 1996 Marcus Daniels <marcus@sysc.pdx.edu>
+
+ * po-hash.h (po_hash): Change __P to PARAMS in prototype.
+
+Fri Mar 1 13:35:01 1996 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (main): Set error_one_per_line to 1 to prevent more
+ than one error message per line. Suggested by Franc,ois Pinard.
+
+ * po-lex.h (po_gram_error): Don't write source file name in fatal
+ message.
+ (po_gram_error_with_loc): Ditto.
+
+ * po-lex.c (lex_close): Don't write source file name in fatal
+ message.
+ (po_gram_error): Ditto.
+ (po_gram_error_with_loc): Ditto.
+
+Fri Mar 1 00:30:49 1996 Ulrich Drepper <drepper@myware>
+
+ * po-lex.h: Use PARAMS instead of __P in header declarations.
+
+ * msgcmp.c (compare_methods): Set new field comment_special to
+ NULL.
+
+ * msgjoin.c (join_methods): Set new field comment_special to NULL.
+
+ * xgettext.c (exclude_methods): Set new field comment_special to
+ NULL.
+
+ * po.h (struct po_method_ty): New field comment_special.
+ (po_directive_domain, po_directive_message, po_parse_brief,
+ po_parse_debrief, po_comment, po_comment_dot, po_comment_filepos):
+ Remove prototypes. Now are local functions.
+
+ * po.c (po_parse_brief, po_parse_debrief, po_directive_domain,
+ po_directive_message, po_comment, po_comment_dot,
+ po_comment_filepos): Declare functions as local and add
+ prototypes.
+ (po_comment_special): New function.
+ (po_callback_comment): For special comments call po_comment_special.
+
+ * msgmerge.c (usage): Add --force in help message.
+ (merge_methods): Set special comment callback to NULL.
+
+ * po-lex.c (lex_open): Don't set pass_comments to 0. This has to
+ be done in upper layer functions.
+ (po_gram_lex): Also pass #! comments up.
+
+ * msgfmt.c (main): Make lexer pass comments up.
+ (format_comment_special): New function. Warns about `#! INEXACT'
+ comments.
+ (format_methods): Add callback for special comment.
+
+Wed Feb 14 01:56:14 1996 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (main): Remove option --output-suffix. When default
+ domain name is "-" write to stdout.
+
+Mon Feb 12 02:20:09 1996 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (main): Implement --output-suffix parameter to
+ determine alternative form of suffix for output file.
+
+ * xgettext.c, msgjoin.c, msgmerge.c, msgunfmt.c (main): Add
+ additional argument to message_list_print call: control output in
+ case of empty PO file.
+ * message.c (message_list_print): Implement FORCE parameter.
+ * message.h: Change prototype.
+
+Sun Jan 21 17:24:56 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-exec): Include empty else case for case
+ when Perl is not available. Reported by John David Anglin.
+
+Sat Dec 23 12:41:43 1995 Jun Young <bangjy@nownuri.nowcom.co.kr>
+
+ * gettextp.c (usage): Short option for version info is -V.
+
+Tue Dec 19 22:10:12 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (Makefile, tupdate): Explicitly use $(SHELL) for
+ running shell scripts.
+
+Sat Dec 9 17:06:11 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c, xget-lex.h, xget-lex.c, str-list.h, po.h, po.c,
+ po-lex.c, po-hash.y, po-gram.h, open-po.c, msgunfmt.c, msgmerge.c,
+ msgjoin.c, msgfmt.c, msgcmp.c, message.h, message.c, gettextp.c:
+ Use PARAMS instead of __P. Suggested by Roland McGrath.
+
+Fri Dec 8 01:38:40 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (PROGRAMS): Add definitions for new msgjoin program.
+
+ * msgjoin.c: Initial revision.
+
+Wed Dec 6 18:43:14 1995 Ulrich Drepper <drepper@myware>
+
+ * open-po.c (open_po_file): Recognize /dev/stdin as name for
+ stdin. Recognize .pot as valid extension.
+
+Wed Dec 6 18:05:11 1995 Ulrich Drepper <drepper@myware>
+
+ * msgmerge.c (main): Sort options in getopt loop.
+
+Mon Dec 4 15:37:22 1995 Ulrich Drepper <drepper@myware>
+
+ * msgmerge.c: (main): Remove unused variable `exit_status'.
+
+Sun Dec 3 02:51:31 1995 Ulrich Drepper <drepper@myware>
+
+ * xget-lex.h: [xgettext_token_type_ty]: We now have two keyword
+ types and also the comma is important.
+
+ * xgettext.c (remember_a_message):
+ Correct handling of -c option. This is not a
+ string to prepend to output. Instead it selects single strings to
+ include (instead of all). Reported by Marcus Daniels.
+ (scan_c_file): Extend state machine. We have to retrieve the second
+ argument for the keywords `dgettext' and `dcgetetxt`.
+
+ * xget-lex.c (phase5_get): Recognize ','.
+ (xgettext_lex): Pass ',' on caller.
+ Return different value for keywords `dgetetxt' and `dcgettext`.
+
+ * xget-lex.c (xgettext_lex): `gettext_noop' is an default keyword.
+
+ * msgunfmt.c (usage):
+ Message should not contain TABs. Reported by Franc,ois Pinard.
+
+ * msgunfmt.c (usage):
+ Correct typo: Uniforun -> Uniforum. Reported by Franc,ois Pinard.
+
+Mon Nov 20 21:12:52 1995 Ulrich Drepper <drepper@myware>
+
+ * po-lex.c, message.c: Some more pretty printing.
+
+ * message.c (wrap): Don't support '\a' and '\v'.
+
+ * xget-lex.c (phase7_getc): Don't support '\v'.
+
+ * po-lex.c (control_sequence): Don't support '\v'.
+
+ * gettextp.c (expand_escape): Don't support \a and \v.
+
+ * msgcmp.c (compare): Really define static.
+
+Thu Nov 16 22:42:33 1995 Ulrich Drepper <drepper@myware>
+
+ * msgmerge.c (merge): Remove additional parameter in in prototype.
+
+ * xgettext.c: Reomved unused type definition. Patch by Peter Miller.
+
+ * xget-lex.c: Correct some comments and better implementation of
+ -k option. Patch by Peter Miller.
+
+ * po.h: Fix typos. By Peter Miller.
+
+ * po-lex.c (po_gram_lex): Prevent accumulation of #! comments.
+
+ * po-gram.y (comments): Remove unused rule.
+
+ * msgmerge.c: Implement new options sort-by-file and sort-output.
+ Patches by Peter Miller.
+
+ * msgcmp.c (domain): Remove unused global variable.
+ (domain_directive): Remove unused function.
+
+ * message.h: Fix comment for MESSAGE_DOMAIN_DEFAULT definition.
+
+ * message.c (message_print): Correct typo.
+ Clarify comments about ANSI escape sequences.
+ Patches by Peter Miller.
+
+ * Makefile.in (DISTFILES): Remove $(COMSRCS).
+ (MSGFMT_OBJ): Correct indentation. Patches by Peter Miller.
+
+Sun Nov 12 12:52:29 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (line, string, comment): Remove unused global variables.
+ (read_name_from_file): Remove unused variable `cp'.
+
+ * msgmerge.c (merge): Add missing return statement.
+
+ * msgfmt.c (check_pair): Correctly pair comparisons.
+
+ * msgcmp.c (domain_list, mlp): Remove unused global variables.
+
+Sat Nov 11 21:39:17 1995 Ulrich Drepper <drepper@myware>
+
+ * message.c (message_list_print):
+ Prevent output if we have no (real) entry.
+
+ * xgettext.c (remember_a_message): Implement exclude file handling.
+
+Sat Nov 11 17:38:05 1995 Ulrich Drepper <drepper@myware>
+
+ * msgunfmt.c: Fix message.
+
+ * xgettext.c: Use string handling from str-list and .po file
+ handling use xget-lex et.al.
+
+ * xget-lex.h, xget-lex.c, str-list.h, str-list.c, po.h:
+ Initial revision.
+
+ * po-lex.h: Allow variable upper limit of errors.
+ New prototypes.
+
+ * po-lex.c: Allow variable upper limit of errors.
+ Make comment's text available to the caller.
+
+ * po.c, po-hash.y, po-hash.h: Initial revision.
+
+ * po-gram.y: Add handling of comments.
+
+ * po-gram.h: Remove all but one declaration.
+
+ * msgunfmt.c, msgmerge.c: Initial revision.
+
+ * msgfmt.c: Adopt for new interface to parser.
+
+ * msgcmp.c: Move lot's of general code to other files.
+
+ * message.h, message.c:
+ Extended functionality for Peter Miller's pseudo-OO programming.
+
+ * Makefile.in: Rewrite after adding rules for new programs.
+
+Fri Nov 10 10:01:37 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (PROGRAMS): Add new programs msgmerge and msgunfmt.
+
+Thu Nov 9 01:29:46 1995 Ulrich Drepper <drepper@myware>
+
+ * gettextp.c (usage): Split message in two parts.
+
+ * xgettext.c (usage): Split message in three parts.
+
+ * xgettext.c (main):
+ Print warning if --files-from option and file names on command
+ line are given.
+
+ * xgettext.c (long_options):
+ Mixed up `default-domain' and `directory' values.
+
+Wed Nov 8 23:31:34 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c: Implement -D and -f option.
+
+Tue Nov 7 13:44:44 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (LIBS): One @LIBS@ must be @INTLLIBS@.
+
+ * Makefile.in (LIBS): Correct definition. We must be prepared to
+ use two different libintl.a libraries.
+ (po-gram.gen.c): Don't use $< in non-implicit rule.
+
+ * Makefile.in (install-exec): Use `test -n' instead of
+ `test XXX != ""'. Proposed by Franc,ois Pinard.
+
+Sun Nov 5 23:59:03 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (INSTALL_PROGRAM): Do not specify mode.
+
+Sun Nov 5 21:13:57 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c, msgfmt.c:
+ Comments describing what has to be done should start with FIXME.
+
+Sun Nov 5 19:39:56 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist-gettext): Make synonym for dist.
+
+Sun Nov 5 18:11:15 1995 Ulrich Drepper <drepper@myware>
+
+ * po-lex.h (gram_error, gram_error_with_loc):
+ Don't define macros when !__STDC__
+ even when using gcc.
+
+ * po-lex.c (gram_error, gram_error_with_loc):
+ Compile if !__STDC__ even if using gcc.
+
+ * Makefile.in (po-gram.gen.c po-gram.gen.h):
+ Remove file prior of generation.
+
+Sun Nov 5 11:39:21 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Suppress error message when ln failed.
+ Get files from $(srcdir) explicitly.
+
+ * xgettext.c (process_c_source):
+ Make gettext_noop the forth builtin marker.
+
+Fri Nov 3 00:57:52 1995 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (main): Don't free fname when no suffix was added.
+
+Thu Nov 2 22:55:44 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Also remove msgcmp.
+
+Tue Oct 31 22:27:52 1995 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c: New option --strict: Only if this is given the .mo
+ file ending is forced.
+
+ * msgfmt.c (message_directive):
+ Call error_with_loc with correct parameters.
+
+ * msgfmt.c (message_directive):
+ Ignores empty message does not count as fatal error.
+
+ * Makefile.in (po-gram.gen.c):
+ Add g suffix to make multiple substitution in one
+ line possible.
+
+Mon Oct 30 22:35:41 1995 Ulrich Drepper <drepper@myware>
+
+ * po-gram.h:
+ Don't give defines for translation of yy* symbols. This is not enough
+ to be able to have more than one parser. See src/Makefile for the way
+ we chose.
+
+ * Makefile.in (po-gram.gen.c):
+ Rewrite generated source while copying. This is the
+ only portable way to get more than one parser in the same program.
+ Patch by Peter Miller.
+
+Sun Oct 29 10:49:59 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (INSTALL_SCRIPT): New variable.
+ (install-exec): Install tupdate using INSTALL_SCRIPT to prevent error
+ when using strip flag.
+
+Sat Oct 28 14:39:33 1995 Ulrich Drepper <drepper@myware>
+
+ * po-gram.h: Include <sys/types.h>.
+
+ * xgettext.c (main):
+ Honour -n option even if --omit-header is given. By Peter Miller.
+
+ * msgcmp.c (check_domain_coverage):
+ No double space in message. By Peter Miller.
+
+ * msgcmp.c (grammar):
+ Close input file after coverage check. Patch by Peter Miller.
+
+Wed Sep 27 20:27:26 1995 Ulrich Drepper <drepper@myware>
+
+ * msgcmp.c:
+ Don't try to include <string.h>. This is done in "system.h".
+
+ * po-lex.c (gram_error, gram_error_with_loc):
+ Add argument definition for K&R style.
+ (gram_error, gram_error_with_loc): We increase gram_nerrors,
+ not nerrors. Reported by Francesco Potorti`.
+
+Tue Sep 26 10:03:29 1995 Ulrich Drepper <drepper@myware>
+
+ * po-gram.h (yyparse): Add redefinition to gram_parse.
+
+ * Makefile.in (YFLAGS):
+ Don't use -p option. Stupid old yaccs do not know it.
+
+ * po-lex.c: Include po-gram.h to get redefinitions of yy* symbols.
+
+ * po-gram.h (yylex, yylval, yyerror):
+ Redefine these symbols to gram_* because the
+ yacc is now called without -p option.
+
+ * Makefile.in (LIBS):
+ Undid last change. On some systems libintl.a is not
+ completely self-contained. alloca() is miisong e.g. on HP-UX.
+
+Mon Sep 25 22:35:55 1995 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (add_mo_suffix): Fix typo.
+
+ * po-lex.h: Include <sys/types.h>.
+ (lex_open): Argument is now `const char *'.
+
+ * msgfmt.c (add_mo_suffix):
+ Allow .gmo suffix. Great idea by Marcus Daniels.
+
+Sat Sep 23 08:20:54 1995 Ulrich Drepper <drepper@myware>
+
+ * po-gram.y, po-lex.c: Include error.h.
+
+ * open-po.c (open_po_file):
+ Remove unused variables `path_dir' and `open_po_file'.
+
+Thu Sep 21 15:30:36 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (LIBS):
+ using libnlsut.a twice is not necessary anymore. libintl.a is
+ selfcontained.
+
+ * gettextp.c (main):
+ Use dcgettext__ and bindtextdomain__ instead of __dcgettext
+ and __bindtextdomain.
+
+ * msgfmt.c, xgettext.c (exit_status):
+ New variables. Contains exit status for the case the program
+ ends normally. Changed when non-fatal error messages are given.
+
+Wed Sep 20 09:16:57 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (xgettext): No also link po-gram.gen.o and po-lex.o.
+
+ * po-lex.c: Pretty print comments.
+ Do some CSE in computation of hex value.
+
+ * xgettext.c (read_po_file): Now use the generated scanner.
+ (domain_directive, message_directive): New functions needed for
+ scanner.
+ (add_id_str): Correct test for exclude files. The messages in the
+ exclude table are in raw format, not C format.
+ (write_out_domain): Check for zero messages and don't write anything in
+ this case.
+
+ * po-lex.c (lex_open): Argument NAME is now const.
+ (gram_error): Move VARARGS1 comment to right place.
+ (control_sequence): Pretty print some comments.
+
+Mon Sep 18 21:23:55 1995 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (add_mo_suffix): Really check for not .mo suffix.
+
+ * xgettext.c (write_out_domain):
+ Write file names in #: lines to file, not stdout.
+
+ * po-gram.y (grammar):
+ Remove function. This allows sharing this file in different
+ programs.
+
+ * domain.h (msg_domain): Member DOMAIN_NAME is now const.
+
+ * Makefile.in (PROGRAMS): Add msgcmp.
+ (HEADERS): Add message.h.
+ (SOURCES): Add message.c and msgcmp.c.
+ (OBJECTS): Add message.o and msgcmp.o.
+ (msgcmp): Rule to construct program.
+
+ * message.h, message.c: Initial revision
+
+ * msgfmt.c (grammar): Close comment so that function is seen.
+ (message_directive): MSGID and MSGSTR are not const.
+
+ * msgcmp.c: Initial revision
+
+ * po-gram.h (message_directive):
+ MSGID and MSGSTR argument are not const.
+
+ * po-gram.h (grammar): Remove prototype. Is now locally defined.
+
+ * po-lex.h (gram_error, gram_error_with_loc):
+ Protect the instructions by do while (0).
+
+ * msgfmt.c (grammar):
+ Define function here. This allows sharing the grammar file
+ with the msgcmp program.
+
+ * msgfmt.c (domain_directive): Free memory of NAME if not needed.
+ (new_domain): Do not duplicate filename, use it as it is.
+
+ * msgfmt.c (message_directive):
+ Free parameter string memory here if necessary.
+ Was done in po-gram.y before.
+
+ * po-gram.h: Remove comment after closing #endif.
+
+ * po-gram.h (grammar): Name parameter in prototype.
+
+Sun Sep 17 23:29:30 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (read_po_file): We don't have a search path anymore,
+ so third argument to open_po_file is not needed anymore. Reduce
+ argument list by this parameter, too.
+
+ * po-lex.c (lex_open):
+ We don't have a search path anymore, so third argument to
+ ope_po_file is not needed anymore.
+
+ * open-po.c (open_po_file): Remove unused `use_path' parameter.
+
+ * Makefile.in (HEADERS): Add po-gram.h and po-lex.h.
+
+ * po-gram.h, po-lex.h: Initial revision
+
+ * Makefile.in (YACC, YFLAGS): New program used for .po file grammar.
+ (SOURCES): Add po-gram.y and po-lex.c.
+ (GENHEADERS, GENSOURCES): New variables for generated headers
+ and sources.
+ (OBJECTS): Add po-gram.gen.o and po-lex.o.
+ Add rules for new files and add to dependency list for msgfmt.
+
+ * po-lex.c, po-gram.y: Initial revision
+
+ * xgettext.c: Remove input path handling.
+ Adapt for new hashing functions return values.
+
+ * msgfmt.c:
+ Rewrite .po file handling. Use Peter Millers .po file Yacc grammar.
+
+ * open-po.c: Remove handling of input path.
+
+ * xgettext.c (write_out_domain):
+ Split #: lines each 80 columns. Based on a patch by
+ Peter Miller.
+
+ * Makefile.in: hash.[ch] moved from src/ to lib/ subdirectory.
+
+Wed Aug 23 21:13:11 1995 Ulrich Drepper <drepper@myware>
+
+ * tupdate.in: Don't print comment in front of obsolete entries.
+
+Tue Aug 22 22:16:31 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (AR, RANLIB): Remove definition. Not needed here.
+ Reported by Franc,ois Pinard.
+
+Sat Aug 19 17:38:22 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src):
+ Make behave like install. I.e. really install the catalogs.
+
+Sat Aug 19 00:57:07 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (SCRIPTS):
+ New variable. Contains names of scipts to be generated and
+ installed. For now it is tupdate.
+ (PROGRAMS): Remove tupdate.
+ (all): Also depend on $(SCRIPTS).
+
+Fri Aug 18 13:02:04 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (PROGRAMS): Add tupdate.
+ (tupdate): New rule. Rebuild tupdate if tupdate.in or
+ ../config.status changed.
+
+ * tupdate.in: Correct case where message is new: no really print msgid.
+ Better help message by Franc,ois Pinard.
+ Recognize #\t as comment.
+ Print comment for now obsolete entries.
+ Handle real comments (translator comments and tupdate generate obsolete
+ entries).
+
+ * gettextp.c (usage): Better help message.
+ (usage): Add -s description to help screen.
+
+Mon Aug 14 23:50:48 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): New no-op goal.
+
+Thu Aug 10 11:26:45 1995 Ulrich Drepper <drepper@myware>
+
+ * tupdate.in: Don't print two " in front of commented out msgstrs.
+
+Wed Aug 9 09:10:30 1995 Ulrich Drepper <drepper@myware>
+
+ * hash.c:
+ Better implementation. Rehashing is now much faster because the
+ hashing value stored in the `used' field is reused.
+ (insert_entry): Split into two function. `insert_entry_2' now does the
+ the work while in `insert_entry' the checks are done.
+ (lookup_2): New function. Expects the search key to be NUL
+ terminated. This is the case when the key is already in the
+ hash table when rehashing.
+
+ * msgfmt.c (write_table):
+ Third argument to `iterate_table' is now a `const' pointer.
+
+ * hash.h (iterate_table): Third arguemtn is `const' pointer.
+
+ * xgettext.c (struct id_str): Make fields `const' pointers.
+
+Fri Aug 4 22:45:39 1995 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (main): Fix typo: me -> we.
+
+ * msgfmt.c (output_file_open): Remove this unused variable.
+ Reported by Jim Meyering.
+
+ * Makefile.in (dist): Remove `copying instead' message.
+
+ * gettextp.c: Start to implement non-Uniforum behaviour.
+ Implemented new mode where gettext behaves like `echo',
+ while translating the messages available in the specified test.
+ New option: -d, -e, -E, also available in normal mode:
+ -E: ignored.
+ -e: enable expansion of some escape sequences.
+ -d: specify text domain to use.
+ New option: -s: enable `echo' mode.
+
+Thu Aug 3 18:25:37 1995 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (usage):
+ Fix typo: anormalies -> anomalies.
+ Reported by Karl Anders O/ygard.
+
+Wed Aug 2 18:51:08 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (ID, TAGS): Do not use $^.
+
+ * xgettext.c (write-header): Add `Content-Type' field.
+
+Tue Aug 1 20:07:58 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (distclean): Remove ID file.
+
+ * Makefile.in (TAGS, ID): Use $^ as command argument.
+ (TAGS): Give etags -o option t write to current directory,
+ not $(srcdir).
+ (ID): Use $(srcdir) instead os $(top_srcdir)/src.
+
+Mon Jul 31 20:57:48 1995 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (process_po_file):
+ Quote msgstr in message "empty `msgstr' entry ignored".
+ Report by Karl Anders O/ygard.
+
+Sun Jul 30 12:14:29 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (LIBS): Always use ../intl/libintl.a.
+ (all): Always depend on ../intl/libintl.a.
+
+Tue Jul 25 00:15:01 1995 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (process_po_file): Correct problem with empty lines.
+
+Sun Jul 23 22:47:56 1995 Ulrich Drepper <drepper@myware>
+
+ * msgfmt.c (process_po_file):
+ Give a message when a sole msgid is found at the end of file.
+
+Wed Jul 19 01:52:13 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (PROGRAMS): Always compile all three programs.
+
+ * gettextp.c: Include libgettext.h explicitly, in addition to
+ libintl.h. On system having libintl.h provided by the C library
+ this assures to have the prototypes for the function defined in
+ GNU gettext library.
+ Use __bindtextdomain and __dgettext instead of bindtextdomain and
+ dgettext resp.
+ Swap arguments in bindtextdomain call.
+
+Tue Jul 18 23:57:16 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (add_id_str):
+ `free(msgstr)' can fail on system not allowing free(0).
+ Reported by Francesco Potorti`.
+
+Tue Jul 18 19:43:41 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (getpwuid):
+ Define prototype if !defined _POSIX_VERSION.
+
+ * hash.c: Don't include malloc.h and string.h because it will be
+ done in system.h.
+
+ * msgfmt.c: Don't include malloc.h because it will be done in
+ system.h.
+
+Sat Jul 15 00:45:31 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (main):
+ Disable line_comment option when omit_header is selected.
+ (write_out_domain): Don't write empty line if !line_comment.
+
+ * Makefile.in (DISTFILES):
+ Due shorted file names now distribute tupdate.in.
+ (install, clean): Handle tupdate, not tupdate.perl.
+
+ * tupdate.in: Rename tupdate.perl.in to tupdate.in to fit in 14
+ character file systems.
+
+Thu Jul 13 22:21:22 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install): Test whether Perl was found before
+ installing.
+
+ * tupdate.perl.in: Make die message more GNU-like.
+
+ * gettextp.c (usage):
+ Protect prototypes with __P and use K&R form for parameters.
+
+ * xgettext.c (main):
+ Don't use 100u; poor K&R compilers need (unsigned) 100.
+
+ * open-po.c (xstrdup): Protect prototype with __P.
+
+ * msgfmt.c (usage, new_domain, process_po_file, compare_id,
+ write_table, check_pair): Protect prototypes with __P.
+
+ * hash.c (xmalloc): Protect prototype with __P.
+
+Thu Jul 13 01:39:47 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check): New no-op goal.
+
+Wed Jul 12 10:40:54 1995 Ulrich Drepper <drepper@myware>
+
+ * tupdate.perl.in: Implement --help and --version options
+
+ * xgettext.c: Add --string-limit option to specify limit on string
+ length.
+ Only warned when verbose mode is selected.
+ Add --verbose option.
+ Help message now correctly says --version == -V.
+
+Tue Jul 11 22:57:54 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c (usage): Split help string because it breaks 1024
+ byte limit.
+
+ * Makefile.in (install-exec): Install tupdate.
+
+ * xgettext.c (stdlib.h): Protect inclusion by STDC_HEADERS.
+ (assert): No assertions anymore.
+ (HAVE_STRTOUL): strtoul is now substituted when not available.
+ Add warning about too long strings (some systems have limits
+ for strings in their compiler and/or tools). E.g. Sinix's
+ gencat program.
+
+ * msgfmt.c (printf.h): Include always
+ (assert): No assertions anymore (all bugs are gone :-).
+ (HAVE_STRTOUL): Not needed anymore because we substitute
+ strtoul if not present.
+
+ * Makefile.in (DISTFILES,distclean): tupdate.perl is now found here.
+
+Tue Jul 11 01:31:03 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: msgfmt.o depends on ../lib/printf.h.
+
+ * msgfmt.c: protect inclusion of malloc.h and stdlib.h.
+ Don't use GCC's `case b ... e:' feature (NeXT's gcc is
+ gcc-2.xx but does not understand this. Grrr!).
+
+ * open-po.c: Protect inclusion of string.h and stdlib.h.
+
+ * hash.c: Pretty print #define.
+ (init_hash, insert_entry): Cast result of calloc.
+ (insert_entry): Remove non-ANSI `(type *) var = ...' by
+ `*(type **) &var = ...'.
+ (compute_hashval): Cast constant to unsigned long (default: int).
+ Has effects on 64-bit machines.
+
+Tue Jul 4 00:39:58 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c: Don't write "Version:" field for msgid "".
+
+Mon Jul 3 23:02:04 1995 Ulrich Drepper <drepper@myware>
+
+ * xgettext.c, msgfmt.c: Better comment.
+
+ * Makefile.in: Pretty print with Franc,ois.
+ Fix typo in dependencies.
+ Even more dependency corrections.
+ Correct dependencies of open-po.c.
+ Remove unneeded $(srcdir) from Makefile.in dependency.
+ (LIBS): Correct for building in different directory.
+ (INCLUDES): Correct for building in different directory.
+ (DEFS): Rename DEF_MSG_DOM_DIR to LOCALEDIR.
+ (INCLUDE): Don't use -I paths when not needed.
+
+ * hash.c: Include malloc.c and protect string.h inclusion.
+
+ * gettextp.c: Protect include of stdlib.h declare prototype for
+ getenv if not __STDC__.
+ Include system.h for EXIT_FAILURE.
+ (main, usage): Replace DEF_MSG_DOM_DIR by LOCALEDIR.
+
+ * open-po.c: Include system.h for EXIT_FAILURE.
+
+ * msgfmt.c: Fix typo in !__STDC__ path.
+ (process_po_file): Change for new .po file format.
+
+ * xgettext.c (main): Rename DEF_MSG_DOM_DIR to LOCALEDIR.
+ Update to new .po file format because Solaris' msgfmt can only
+ handle ANSI C style multi-line strings.
+
+Sun Jul 2 21:31:00 1995 Ulrich Drepper <drepper@myware>
+
+ * gettextp.c: gettextp.c (usage): Fix typo in help message.
+ Reported by Franc,ois Pinard.
+
+Sun Jul 2 02:12:41 1995 Ulrich Drepper <drepper@myware>
+
+ * First official release. This directory contains the
+ source code for the programs specified in the Uniforum proposal
+ for internationalization.
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..2e6ffb9
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,61 @@
+## Makefile for program src directory in GNU NLS utilities package.
+## Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+## Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+bin_PROGRAMS = gettext msgcmp msgfmt msgmerge msgunfmt xgettext msgcomm
+
+noinst_HEADERS = domain.h message.h po-gram.h po-hash.h po-lex.h po.h \
+str-list.h xget-lex.h dir-list.h po-gram-gen.h po-hash-gen.h
+
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+
+l = @l@
+
+INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/lib -I../intl \
+-I$(top_srcdir)/intl
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+LDADD = ../lib/libnlsut.a ../intl/libintl.$la
+
+SED = sed
+YACC = @YACC@ -d
+
+# Source dependecies.
+gettext_SOURCES = gettextp.c
+msgcmp_SOURCES = message.c msgcmp.c open-po.c po-gram-gen.y po-hash-gen.y \
+po-lex.c po.c str-list.c dir-list.c
+msgfmt_SOURCES = msgfmt.c open-po.c po-gram-gen.y po-hash-gen.y po-lex.c po.c \
+str-list.c message.c dir-list.c
+msgmerge_SOURCES = message.c msgmerge.c open-po.c po-gram-gen.y po-hash-gen.y \
+po-lex.c po.c str-list.c dir-list.c
+msgunfmt_SOURCES = message.c msgunfmt.c str-list.c
+xgettext_SOURCES = message.c open-po.c po-gram-gen.y po-hash-gen.y po-lex.c \
+po.c str-list.c xget-lex.c xgettext.c dir-list.c
+msgcomm_SOURCES = msgcomm.c message.c po-gram-gen.y po-hash-gen.y po-lex.c \
+open-po.c po.c str-list.c dir-list.c
+
+BUILT_SOURCES = po-gram-gen.c po-hash-gen.c po-gram-gen.h po-hash-gen.h
+
+po-lex.o: po-gram-gen2.h
+po-gram-gen2.h: po-gram-gen.h
+ $(SED) 's/[yY][yY]/po_gram_/g' $^ > $@-tmp
+ mv $@-tmp $@
+
+DISTCLEANFILES = po-gram-gen2.h
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..f438a5a
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,467 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+ACLOCAL_VERSION = @ACLOCAL_VERSION@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+EMACS = @EMACS@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LIBOBJS = @LIBOBJS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+aclocaldir = @aclocaldir@
+lispdir = @lispdir@
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+bin_PROGRAMS = gettext msgcmp msgfmt msgmerge msgunfmt xgettext msgcomm
+
+noinst_HEADERS = domain.h message.h po-gram.h po-hash.h po-lex.h po.h str-list.h xget-lex.h dir-list.h po-gram-gen.h po-hash-gen.h
+
+
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+
+l = @l@
+
+INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/lib -I../intl -I$(top_srcdir)/intl
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+LDADD = ../lib/libnlsut.a ../intl/libintl.$la
+
+SED = sed
+YACC = @YACC@ -d
+
+# Source dependecies.
+gettext_SOURCES = gettextp.c
+msgcmp_SOURCES = message.c msgcmp.c open-po.c po-gram-gen.y po-hash-gen.y po-lex.c po.c str-list.c dir-list.c
+
+msgfmt_SOURCES = msgfmt.c open-po.c po-gram-gen.y po-hash-gen.y po-lex.c po.c str-list.c message.c dir-list.c
+
+msgmerge_SOURCES = message.c msgmerge.c open-po.c po-gram-gen.y po-hash-gen.y po-lex.c po.c str-list.c dir-list.c
+
+msgunfmt_SOURCES = message.c msgunfmt.c str-list.c
+xgettext_SOURCES = message.c open-po.c po-gram-gen.y po-hash-gen.y po-lex.c po.c str-list.c xget-lex.c xgettext.c dir-list.c
+
+msgcomm_SOURCES = msgcomm.c message.c po-gram-gen.y po-hash-gen.y po-lex.c open-po.c po.c str-list.c dir-list.c
+
+
+BUILT_SOURCES = po-gram-gen.c po-hash-gen.c po-gram-gen.h po-hash-gen.h
+
+DISTCLEANFILES = po-gram-gen2.h
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(bin_PROGRAMS)
+
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+gettext_OBJECTS = gettextp.o
+gettext_LDADD = $(LDADD)
+gettext_DEPENDENCIES = ../lib/libnlsut.a ../intl/libintl.$la
+gettext_LDFLAGS =
+msgcmp_OBJECTS = message.o msgcmp.o open-po.o po-gram-gen.o \
+po-hash-gen.o po-lex.o po.o str-list.o dir-list.o
+msgcmp_LDADD = $(LDADD)
+msgcmp_DEPENDENCIES = ../lib/libnlsut.a ../intl/libintl.$la
+msgcmp_LDFLAGS =
+msgfmt_OBJECTS = msgfmt.o open-po.o po-gram-gen.o po-hash-gen.o \
+po-lex.o po.o str-list.o message.o dir-list.o
+msgfmt_LDADD = $(LDADD)
+msgfmt_DEPENDENCIES = ../lib/libnlsut.a ../intl/libintl.$la
+msgfmt_LDFLAGS =
+msgmerge_OBJECTS = message.o msgmerge.o open-po.o po-gram-gen.o \
+po-hash-gen.o po-lex.o po.o str-list.o dir-list.o
+msgmerge_LDADD = $(LDADD)
+msgmerge_DEPENDENCIES = ../lib/libnlsut.a ../intl/libintl.$la
+msgmerge_LDFLAGS =
+msgunfmt_OBJECTS = message.o msgunfmt.o str-list.o
+msgunfmt_LDADD = $(LDADD)
+msgunfmt_DEPENDENCIES = ../lib/libnlsut.a ../intl/libintl.$la
+msgunfmt_LDFLAGS =
+xgettext_OBJECTS = message.o open-po.o po-gram-gen.o po-hash-gen.o \
+po-lex.o po.o str-list.o xget-lex.o xgettext.o dir-list.o
+xgettext_LDADD = $(LDADD)
+xgettext_DEPENDENCIES = ../lib/libnlsut.a ../intl/libintl.$la
+xgettext_LDFLAGS =
+msgcomm_OBJECTS = msgcomm.o message.o po-gram-gen.o po-hash-gen.o \
+po-lex.o open-po.o po.o str-list.o dir-list.o
+msgcomm_LDADD = $(LDADD)
+msgcomm_DEPENDENCIES = ../lib/libnlsut.a ../intl/libintl.$la
+msgcomm_LDFLAGS =
+YLWRAP = $(srcdir)/ylwrap
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+HEADERS = $(noinst_HEADERS)
+
+DIST_COMMON = ChangeLog Makefile.am Makefile.in po-gram-gen.c \
+po-hash-gen.c ylwrap
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+DEP_FILES = .deps/dir-list.P .deps/gettextp.P .deps/message.P \
+.deps/msgcmp.P .deps/msgcomm.P .deps/msgfmt.P .deps/msgmerge.P \
+.deps/msgunfmt.P .deps/open-po.P .deps/po-gram-gen.P \
+.deps/po-hash-gen.P .deps/po-lex.P .deps/po.P .deps/str-list.P \
+.deps/xget-lex.P .deps/xgettext.P
+SOURCES = $(gettext_SOURCES) $(msgcmp_SOURCES) $(msgfmt_SOURCES) $(msgmerge_SOURCES) $(msgunfmt_SOURCES) $(xgettext_SOURCES) $(msgcomm_SOURCES)
+OBJECTS = $(gettext_OBJECTS) $(msgcmp_OBJECTS) $(msgfmt_OBJECTS) $(msgmerge_OBJECTS) $(msgunfmt_OBJECTS) $(xgettext_OBJECTS) $(msgcomm_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s .y
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnits src/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+gettext: $(gettext_OBJECTS) $(gettext_DEPENDENCIES)
+ @rm -f gettext
+ $(LINK) $(gettext_LDFLAGS) $(gettext_OBJECTS) $(gettext_LDADD) $(LIBS)
+
+msgcmp: $(msgcmp_OBJECTS) $(msgcmp_DEPENDENCIES)
+ @rm -f msgcmp
+ $(LINK) $(msgcmp_LDFLAGS) $(msgcmp_OBJECTS) $(msgcmp_LDADD) $(LIBS)
+
+msgfmt: $(msgfmt_OBJECTS) $(msgfmt_DEPENDENCIES)
+ @rm -f msgfmt
+ $(LINK) $(msgfmt_LDFLAGS) $(msgfmt_OBJECTS) $(msgfmt_LDADD) $(LIBS)
+
+msgmerge: $(msgmerge_OBJECTS) $(msgmerge_DEPENDENCIES)
+ @rm -f msgmerge
+ $(LINK) $(msgmerge_LDFLAGS) $(msgmerge_OBJECTS) $(msgmerge_LDADD) $(LIBS)
+
+msgunfmt: $(msgunfmt_OBJECTS) $(msgunfmt_DEPENDENCIES)
+ @rm -f msgunfmt
+ $(LINK) $(msgunfmt_LDFLAGS) $(msgunfmt_OBJECTS) $(msgunfmt_LDADD) $(LIBS)
+
+xgettext: $(xgettext_OBJECTS) $(xgettext_DEPENDENCIES)
+ @rm -f xgettext
+ $(LINK) $(xgettext_LDFLAGS) $(xgettext_OBJECTS) $(xgettext_LDADD) $(LIBS)
+
+msgcomm: $(msgcomm_OBJECTS) $(msgcomm_DEPENDENCIES)
+ @rm -f msgcomm
+ $(LINK) $(msgcomm_LDFLAGS) $(msgcomm_OBJECTS) $(msgcomm_LDADD) $(LIBS)
+.y.c:
+ $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
+po-gram-gen.h: po-gram-gen.c
+po-hash-gen.h: po-hash-gen.c
+
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits src/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ -test -z "po-gram-genhpo-gram-gencpo-hash-genhpo-hash-genc$(BUILT_SOURCES)" || rm -f po-gram-genh po-gram-genc po-hash-genh po-hash-genc $(BUILT_SOURCES)
+mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
+ mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
+ clean-depend clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
+ distclean-tags distclean-depend distclean-generic \
+ clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-binPROGRAMS \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-depend \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+po-lex.o: po-gram-gen2.h
+po-gram-gen2.h: po-gram-gen.h
+ $(SED) 's/[yY][yY]/po_gram_/g' $^ > $@-tmp
+ mv $@-tmp $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/dir-list.c b/src/dir-list.c
new file mode 100644
index 0000000..e02d708
--- /dev/null
+++ b/src/dir-list.c
@@ -0,0 +1,55 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#include "system.h"
+#include "dir-list.h"
+#include "str-list.h"
+
+static string_list_ty *directory;
+
+
+void
+dir_list_append (s)
+ const char *s;
+{
+ if (directory == NULL)
+ directory = string_list_alloc ();
+ string_list_append_unique (directory, s);
+}
+
+
+const char *
+dir_list_nth (n)
+ int n;
+{
+ if (directory == NULL)
+ dir_list_append (".");
+ if (n < 0 || n >= directory->nitems)
+ return NULL;
+ return directory->item[n];
+}
diff --git a/src/dir-list.h b/src/dir-list.h
new file mode 100644
index 0000000..fd6bae7
--- /dev/null
+++ b/src/dir-list.h
@@ -0,0 +1,26 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef SRC_DIR_LIST_H
+#define SRC_DIR_LIST_H
+
+void dir_list_append PARAMS ((const char *__directory));
+const char *dir_list_nth PARAMS ((int __n));
+
+#endif /* SRC_DIR_LIST_H */
diff --git a/src/domain.h b/src/domain.h
new file mode 100644
index 0000000..c3d4284
--- /dev/null
+++ b/src/domain.h
@@ -0,0 +1,35 @@
+
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#ifndef _DOMAIN_H
+#define _DOMAIN_H 1
+
+#include <stdio.h>
+#include "hash.h"
+
+struct msg_domain
+{
+ /* Table for mapping message IDs to message strings. */
+ hash_table symbol_tab;
+ /* Name domain these ID/String pairs are part of. */
+ const char *domain_name;
+ /* Link to the next domain. */
+ struct msg_domain *next;
+};
+
+#endif /* domain.h */
diff --git a/src/gettextp.c b/src/gettextp.c
new file mode 100644
index 0000000..911577e
--- /dev/null
+++ b/src/gettextp.c
@@ -0,0 +1,351 @@
+/* gettext - retrieve text string from message catalog and print it.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, May 1995.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <getopt.h>
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#else
+char *getenv ();
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#include "error.h"
+#include "system.h"
+
+#include "libgettext.h"
+
+#define _(str) gettext (str)
+
+/* If nonzero add newline after last string. This makes only sense in
+ the `echo' emulation mode. */
+int add_newline;
+/* If nonzero expand escape sequences in strings before looking in the
+ message catalog. */
+int do_expand;
+
+/* Name the program is called with. */
+char *program_name;
+
+/* Long options. */
+static const struct option long_options[] =
+{
+ { "domain", required_argument, NULL, 'd' },
+ { "help", no_argument, NULL, 'h' },
+ { "shell-script", no_argument, NULL, 's' },
+ { "version", no_argument, NULL, 'V' },
+ { NULL, 0, NULL, 0 }
+};
+
+/* Prototypes for local functions. */
+static void usage PARAMS ((int __status))
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+ __attribute__ ((noreturn))
+#endif
+;
+static const char *expand_escape PARAMS((const char *__str));
+
+int
+main (argc, argv)
+ int argc;
+ char *argv[];
+{
+ int optchar;
+ int do_help = 0;
+ int do_shell = 0;
+ int do_version = 0;
+ const char *msgid;
+ const char *domain = getenv ("TEXTDOMAIN");
+ const char *domaindir = getenv ("TEXTDOMAINDIR");
+
+ /* Set program name for message texts. */
+ program_name = argv[0];
+ add_newline = 1;
+ do_expand = 0;
+
+#ifdef HAVE_SETLOCALE
+ /* Set locale via LC_ALL. */
+ setlocale (LC_ALL, "");
+#endif
+
+ /* Set the text message domain. */
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ while ((optchar = getopt_long (argc, argv, "+d:eEhnsV", long_options, NULL))
+ != EOF)
+ switch (optchar)
+ {
+ case '\0': /* Long option. */
+ break;
+ case 'd':
+ domain = optarg;
+ break;
+ case 'e':
+ do_expand = 1;
+ break;
+ case 'E':
+ /* Ignore. Just for compatibility. */
+ break;
+ case 'h':
+ do_help = 1;
+ break;
+ case 'n':
+ add_newline = 0;
+ break;
+ case 's':
+ do_shell = 1;
+ break;
+ case 'V':
+ do_version = 1;
+ break;
+ default:
+ usage (EXIT_FAILURE);
+ }
+
+ /* Version information is requested. */
+ if (do_version)
+ {
+ printf ("%s (GNU %s) %s\n", basename (program_name), PACKAGE, VERSION);
+ /* xgettext: no-wrap */
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"),
+ "1995, 1996, 1997");
+ printf (_("Written by %s.\n"), "Ulrich Drepper");
+ exit (EXIT_SUCCESS);
+ }
+
+ /* Help is requested. */
+ if (do_help)
+ usage (EXIT_SUCCESS);
+
+ /* We have two major modes: use following Uniforum spec and as
+ internationalized `echo' program. */
+ if (do_shell == 0)
+ {
+ /* We have to write a single strings translation to stdout. */
+
+ if (optind >= argc)
+ error (EXIT_FAILURE, 0, _("missing arguments"));
+
+ /* Get arguments. */
+ msgid = argv[optind++];
+ if (optind < argc)
+ {
+ domain = msgid;
+ msgid = argv[optind++];
+
+ if (optind < argc)
+ error (EXIT_FAILURE, 0, _("too many arguments"));
+ }
+
+ /* If no domain name is given we print the original string. */
+ if (domain == NULL || domain[0] == '\0')
+ {
+ fputs (msgid, stdout);
+ exit (EXIT_SUCCESS);
+ }
+
+ /* Bind domain to appropriate directory. */
+ if (domaindir != NULL && domaindir[0] != '\0')
+ bindtextdomain__ (domain, domaindir);
+
+ /* Expand escape sequences is enabled. */
+ if (do_expand)
+ msgid = expand_escape (msgid);
+
+ /* Write out the result. */
+ fputs (dgettext__ (domain, msgid), stdout);
+ }
+ else
+ {
+ /* If no domain name is given we print the original string.
+ We mark this assigning NULL to domain. */
+ if (domain == NULL || domain[0] == '\0')
+ domain = NULL;
+ else
+ /* Bind domain to appropriate directory. */
+ if (domaindir != NULL && domaindir[0] != '\0')
+ bindtextdomain__ (domain, domaindir);
+
+ /* We have to simulate `echo'. All arguments are strings. */
+ while (optind < argc)
+ {
+ msgid = argv[optind++];
+
+ /* Expand escape sequences is enabled. */
+ if (do_expand)
+ msgid = expand_escape (msgid);
+
+ /* Write out the result. */
+ fputs (domain == NULL ? msgid : dgettext__ (domain, msgid), stdout);
+
+ /* We separate the arguments by a single ' '. */
+ if (optind < argc)
+ fputc (' ', stdout);
+ }
+
+ /* If not otherwise told add trailing newline. */
+ if (add_newline)
+ fputc ('\n', stdout);
+ }
+
+ exit (EXIT_SUCCESS);
+}
+
+
+/* Display usage information and exit. */
+static void
+usage (status)
+ int status;
+{
+ if (status != EXIT_SUCCESS)
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
+ program_name);
+ else
+ {
+ /* xgettext: no-wrap */
+ printf (_("\
+Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n\
+ -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n\
+ -e enable expansion of some escape sequences\n\
+ -E (ignored for compatibility)\n\
+ -h, --help display this help and exit\n\
+ -n suppress trailing newline\n\
+ -V, --version display version information and exit\n\
+ [TEXTDOMAIN] MSGID retrieve translated message corresponding\n\
+ to MSGID from TEXTDOMAIN\n"),
+ program_name);
+ /* xgettext: no-wrap */
+ printf (_("\
+\n\
+If the TEXTDOMAIN parameter is not given, the domain is determined from the\n\
+environment variable TEXTDOMAIN. If the message catalog is not found in the\n\
+regular directory, another location can be specified with the environment\n\
+variable TEXTDOMAINDIR.\n\
+When used with the -s option the program behaves like the `echo' command.\n\
+But it does not simply copy its arguments to stdout. Instead those messages\n\
+found in the selected catalog are translated.\n\
+Standard search directory: %s\n"), LOCALEDIR);
+ fputs (_("Report bugs to <bug-gnu-utils@gnu.org>.\n"), stdout);
+ }
+
+ exit (status);
+}
+
+
+/* Expand some escape sequences found in the argument string. */
+static const char *
+expand_escape (str)
+ const char *str;
+{
+ char *retval, *rp;
+ const char *cp = str;
+
+ do
+ {
+ while (cp[0] != '\0' && cp[0] != '\\')
+ ++cp;
+ }
+ while (cp[0] != '\0' && cp[1] != '\0'
+ && strchr ("bcfnrt\\01234567", cp[1]) == NULL);
+
+ if (cp[0] == '\0')
+ return str;
+
+ retval = (char *) xmalloc (strlen (str));
+
+ rp = retval + (cp - str);
+ memcpy (retval, str, cp - str);
+
+ do
+ {
+ switch (*++cp)
+ {
+ case 'b': /* backspace */
+ *rp++ = '\b';
+ ++cp;
+ break;
+ case 'c': /* suppress trailing newline */
+ add_newline = 0;
+ ++cp;
+ break;
+ case 'f': /* form feed */
+ *rp++ = '\f';
+ ++cp;
+ break;
+ case 'n': /* new line */
+ *rp++ = '\n';
+ ++cp;
+ break;
+ case 'r': /* carriage return */
+ *rp++ = '\r';
+ ++cp;
+ break;
+ case 't': /* horizontal tab */
+ *rp++ = '\t';
+ ++cp;
+ break;
+ case '\\':
+ *rp = '\\';
+ ++cp;
+ break;
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ {
+ int ch = *cp++ - '0';
+
+ if (*cp >= '0' && *cp <= '7')
+ {
+ ch *= 8;
+ ch += *cp++ - '0';
+
+ if (*cp >= '0' && *cp <= '7')
+ {
+ ch *= 8;
+ ch += *cp++ - '0';
+ }
+ }
+ *rp = ch;
+ }
+ break;
+ default:
+ *rp = '\\';
+ break;
+ }
+
+ while (cp[0] != '\0' && cp[0] != '\\')
+ *rp++ = *cp++;
+ }
+ while (cp[0] != '\0');
+
+ /* Terminate string. */
+ *rp = '\0';
+
+ return (const char *) retval;
+}
diff --git a/src/message.c b/src/message.c
new file mode 100644
index 0000000..2ff1156
--- /dev/null
+++ b/src/message.c
@@ -0,0 +1,1520 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <errno.h>
+#include <ctype.h>
+#include <stdio.h>
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#include "fstrcmp.h"
+#include "message.h"
+#include "system.h"
+#include "error.h"
+#include "libgettext.h"
+
+
+/* Our regular abbreviation. */
+#define _(str) gettext (str)
+
+
+/* These two variables control the output style of the message_print
+ function. Interface functions for them are to be used. */
+static int indent;
+static int uniforum;
+static int escape;
+
+/* This variable controls the page width when printing messages.
+ Defaults to PAGE_WIDTH if not set. Zero (0) given to message_page_-
+ width_set will result in no wrapping being performed. */
+static size_t page_width = PAGE_WIDTH;
+
+
+/* Prototypes for local functions. */
+static void wrap PARAMS ((FILE *__fp, const char *__line_prefix,
+ const char *__name, const char *__value,
+ int do_wrap));
+static void print_blank_line PARAMS ((FILE *__fp));
+static void message_print PARAMS ((const message_ty *__mp, FILE *__fp,
+ const char *__domain, int blank_line,
+ int __debug));
+static void message_print_obsolete PARAMS ((const message_ty *__mp, FILE *__fp,
+ const char *__domain,
+ int blank_line));
+static int msgid_cmp PARAMS ((const void *__va, const void *__vb));
+static int filepos_cmp PARAMS ((const void *__va, const void *__vb));
+static const char *make_c_format_description_string PARAMS ((enum is_c_format,
+ int debug));
+static const char *make_c_width_description_string PARAMS ((enum is_c_format));
+static int significant_c_format_p PARAMS ((enum is_c_format __is_c_format));
+
+ static message_ty *message_list_search_fuzzy_inner PARAMS ((
+ message_list_ty *__mlp, const char *__msgid, double *__best_weight_p));
+
+
+
+message_ty *
+message_alloc (msgid)
+ char *msgid;
+{
+ message_ty *mp;
+
+ mp = xmalloc (sizeof (message_ty));
+ mp->msgid = msgid;
+ mp->comment = NULL;
+ mp->comment_dot = NULL;
+ mp->filepos_count = 0;
+ mp->filepos = NULL;
+ mp->variant_count = 0;
+ mp->variant = NULL;
+ mp->used = 0;
+ mp->obsolete = 0;
+ mp->is_fuzzy = 0;
+ mp->is_c_format = undecided;
+ mp->do_wrap = undecided;
+ return mp;
+}
+
+
+void
+message_free (mp)
+ message_ty *mp;
+{
+ size_t j;
+
+ if (mp->comment != NULL)
+ string_list_free (mp->comment);
+ if (mp->comment_dot != NULL)
+ string_list_free (mp->comment_dot);
+ free ((char *) mp->msgid);
+ for (j = 0; j < mp->variant_count; ++j)
+ free ((char *) mp->variant[j].msgstr);
+ if (mp->variant != NULL)
+ free (mp->variant);
+ for (j = 0; j < mp->filepos_count; ++j)
+ free ((char *) mp->filepos[j].file_name);
+ if (mp->filepos != NULL)
+ free (mp->filepos);
+ free (mp);
+}
+
+
+message_variant_ty *
+message_variant_search (mp, domain)
+ message_ty *mp;
+ const char *domain;
+{
+ size_t j;
+ message_variant_ty *mvp;
+
+ for (j = 0; j < mp->variant_count; ++j)
+ {
+ mvp = &mp->variant[j];
+ if (0 == strcmp (domain, mvp->domain))
+ return mvp;
+ }
+ return 0;
+}
+
+
+void
+message_variant_append (mp, domain, msgstr, pp)
+ message_ty *mp;
+ const char *domain;
+ const char *msgstr;
+ const lex_pos_ty *pp;
+{
+ size_t nbytes;
+ message_variant_ty *mvp;
+
+ nbytes = (mp->variant_count + 1) * sizeof (mp->variant[0]);
+ mp->variant = xrealloc (mp->variant, nbytes);
+ mvp = &mp->variant[mp->variant_count++];
+ mvp->domain = domain;
+ mvp->msgstr = msgstr;
+ mvp->pos = *pp;
+}
+
+
+void
+message_comment_append (mp, s)
+ message_ty *mp;
+ const char *s;
+{
+ if (mp->comment == NULL)
+ mp->comment = string_list_alloc ();
+ string_list_append (mp->comment, s);
+}
+
+
+void
+message_comment_dot_append (mp, s)
+ message_ty *mp;
+ const char *s;
+{
+ if (mp->comment_dot == NULL)
+ mp->comment_dot = string_list_alloc ();
+ string_list_append (mp->comment_dot, s);
+}
+
+
+message_ty *
+message_copy (mp)
+ message_ty *mp;
+{
+ message_ty *result;
+ size_t j;
+
+ result = message_alloc (xstrdup (mp->msgid));
+
+ for (j = 0; j < mp->variant_count; ++j)
+ {
+ message_variant_ty *mvp = &mp->variant[j];
+ message_variant_append (result, mvp->domain, mvp->msgstr, &mvp->pos);
+ }
+ if (mp->comment)
+ {
+ for (j = 0; j < mp->comment->nitems; ++j)
+ message_comment_append (result, mp->comment->item[j]);
+ }
+ if (mp->comment_dot)
+ {
+ for (j = 0; j < mp->comment_dot->nitems; ++j)
+ message_comment_dot_append (result, mp->comment_dot->item[j]);
+ }
+ result->is_fuzzy = mp->is_fuzzy;
+ result->is_c_format = mp->is_c_format;
+ result->do_wrap = mp->do_wrap;
+ for (j = 0; j < mp->filepos_count; ++j)
+ {
+ lex_pos_ty *pp = &mp->filepos[j];
+ message_comment_filepos (result, pp->file_name, pp->line_number);
+ }
+ return result;
+}
+
+
+message_ty *
+message_merge (def, ref)
+ message_ty *def;
+ message_ty *ref;
+{
+ message_ty *result;
+ const char *pot_date_ptr = NULL;
+ size_t pot_date_len = 0;
+ size_t j;
+
+ /* Take the msgid from the reference. When fuzzy matches are made,
+ the definition will not be unique, but the reference will be -
+ usually because it has a typo. */
+ result = message_alloc (xstrdup (ref->msgid));
+
+ /* If msgid is the header entry (i.e., "") we find the
+ POT-Creation-Date line in the reference. */
+ if (ref->msgid[0] == '\0')
+ {
+ pot_date_ptr = strstr (ref->variant[0].msgstr, "POT-Creation-Date:");
+ if (pot_date_ptr != NULL)
+ {
+ const char *endp;
+
+ pot_date_ptr += sizeof ("POT-Creation-Date:") - 1;
+
+ endp = strchr (pot_date_ptr, '\n');
+ if (endp == NULL)
+ {
+ char *extended;
+ endp = strchr (pot_date_ptr, '\0');
+ pot_date_len = (endp - pot_date_ptr) + 1;
+ extended = (char *) alloca (pot_date_len + 1);
+ stpcpy (stpcpy (extended, pot_date_ptr), "\n");
+ pot_date_ptr = extended;
+ }
+ else
+ pot_date_len = (endp - pot_date_ptr) + 1;
+
+ if (pot_date_len == 0)
+ pot_date_ptr = NULL;
+ }
+ }
+
+ /* Take the variant list from the definition. The msgstr of the
+ refences will be empty, as they were generated by xgettext. If
+ we currently process the header entry we have to merge the msgstr
+ by using the POT-Creation-Date field from the .pot file. */
+ for (j = 0; j < def->variant_count; ++j)
+ {
+ message_variant_ty *mvp = &def->variant[j];
+
+ if (ref->msgid[0] == '\0')
+ {
+ /* Oh, oh. The header entry and we have something to fill in. */
+ static const struct
+ {
+ const char *name;
+ size_t len;
+ } known_fields[] =
+ {
+ { "Project-Id-Version:", sizeof ("Project-Id-Version:") - 1 },
+#define PROJECT_ID 0
+ { "POT-Creation-Date:", sizeof ("POT-Creation-Date:") - 1 },
+#define POT_CREATION 1
+ { "PO-Revision-Date:", sizeof ("PO-Revision-Date:") - 1 },
+#define PO_REVISION 2
+ { "Last-Translator:", sizeof ("Last-Translator:") - 1 },
+#define LAST_TRANSLATOR 3
+ { "Language-Team:", sizeof ("Language-Team:") - 1 },
+#define LANGUAGE_TEAM 4
+ { "MIME-Version:", sizeof ("MIME-Version:") - 1 },
+#define MIME_VERSION 5
+ { "Content-Type:", sizeof ("Content-Type:") - 1 },
+#define CONTENT_TYPE 6
+ { "Content-Transfer-Encoding:",
+ sizeof ("Content-Transfer-Encoding:") - 1 }
+#define CONTENT_TRANSFER 7
+ };
+#define UNKNOWN 8
+ struct
+ {
+ const char *string;
+ size_t len;
+ } header_fields[UNKNOWN + 1];
+ const char *cp;
+ char *newp;
+ size_t len, cnt;
+
+ /* Clear all fields. */
+ memset (header_fields, '\0', sizeof (header_fields));
+
+ cp = mvp->msgstr;
+ while (*cp != '\0')
+ {
+ const char *endp = strchr (cp, '\n');
+ int terminated = endp != NULL;
+
+ if (!terminated)
+ {
+ char *copy;
+ endp = strchr (cp, '\0');
+
+ len = endp - cp + 1;
+
+ copy = (char *) alloca (len + 1);
+ stpcpy (stpcpy (copy, cp), "\n");
+ cp = copy;
+ }
+ else
+ {
+ len = (endp - cp) + 1;
+ ++endp;
+ }
+
+ /* Compare with any of the known fields. */
+ for (cnt = 0;
+ cnt < sizeof (known_fields) / sizeof (known_fields[0]);
+ ++cnt)
+ if (strncasecmp (cp, known_fields[cnt].name,
+ known_fields[cnt].len) == 0)
+ break;
+
+ if (cnt < sizeof (known_fields) / sizeof (known_fields[0]))
+ {
+ header_fields[cnt].string = &cp[known_fields[cnt].len];
+ header_fields[cnt].len = len - known_fields[cnt].len;
+ }
+ else
+ {
+ /* It's an unknown field. Append content to what is
+ already known. */
+ char *extended = (char *) alloca (header_fields[UNKNOWN].len
+ + len + 1);
+ memcpy (extended, header_fields[UNKNOWN].string,
+ header_fields[UNKNOWN].len);
+ memcpy (&extended[header_fields[UNKNOWN].len], cp, len);
+ extended[header_fields[UNKNOWN].len + len] = '\0';
+ header_fields[UNKNOWN].string = extended;
+ header_fields[UNKNOWN].len += len;
+ }
+
+ cp = endp;
+ }
+
+ if (pot_date_ptr != NULL)
+ {
+ header_fields[POT_CREATION].string = pot_date_ptr;
+ header_fields[POT_CREATION].len = pot_date_len;
+ }
+
+ /* Concatenate all the various fields. */
+ len = 0;
+ for (cnt = 0; cnt < UNKNOWN; ++cnt)
+ if (header_fields[cnt].string != NULL)
+ len += known_fields[cnt].len + header_fields[cnt].len;
+ len += header_fields[UNKNOWN].len;
+
+ cp = newp = (char *) xmalloc (len + 1);
+ newp[len] = '\0';
+
+#define IF_FILLED(idx) \
+ if (header_fields[idx].string) \
+ newp = stpncpy (stpcpy (newp, known_fields[idx].name), \
+ header_fields[idx].string, header_fields[idx].len)
+
+ IF_FILLED (PROJECT_ID);
+ IF_FILLED (POT_CREATION);
+ IF_FILLED (PO_REVISION);
+ IF_FILLED (LAST_TRANSLATOR);
+ IF_FILLED (LANGUAGE_TEAM);
+ IF_FILLED (MIME_VERSION);
+ IF_FILLED (CONTENT_TYPE);
+ IF_FILLED (CONTENT_TRANSFER);
+ if (header_fields[UNKNOWN].string != NULL)
+ stpcpy (newp, header_fields[UNKNOWN].string);
+
+ message_variant_append (result, mvp->domain, cp, &mvp->pos);
+ }
+ else
+ message_variant_append (result, mvp->domain, mvp->msgstr, &mvp->pos);
+ }
+
+ /* Take the comments from the definition file. There will be none at
+ all in the reference file, as it was generated by xgettext. */
+ if (def->comment)
+ for (j = 0; j < def->comment->nitems; ++j)
+ message_comment_append (result, def->comment->item[j]);
+
+ /* Take the dot comments from the reference file, as they are
+ generated by xgettext. Any in the definition file are old ones
+ collected by previous runs of xgettext and msgmerge. */
+ if (ref->comment_dot)
+ for (j = 0; j < ref->comment_dot->nitems; ++j)
+ message_comment_dot_append (result, ref->comment_dot->item[j]);
+
+ /* The flags are mixed in a special way. Some informations come
+ from the reference message (such as format/no-format), others
+ come from the definition file (fuzzy or not). */
+ result->is_fuzzy = def->is_fuzzy;
+ result->is_c_format = ref->is_c_format;
+ result->do_wrap = ref->do_wrap;
+
+ /* Take the file position comments from the reference file, as they
+ are generated by xgettext. Any in the definition file are old ones
+ collected by previous runs of xgettext and msgmerge. */
+ for (j = 0; j < ref->filepos_count; ++j)
+ {
+ lex_pos_ty *pp = &ref->filepos[j];
+ message_comment_filepos (result, pp->file_name, pp->line_number);
+ }
+
+ /* All done, return the merged message to the caller. */
+ return result;
+}
+
+
+void
+message_comment_filepos (mp, name, line)
+ message_ty *mp;
+ const char *name;
+ size_t line;
+{
+ size_t nbytes;
+ lex_pos_ty *pp;
+ int min, max;
+ int j;
+
+ /* See if we have this position already. They are kept in sorted
+ order, so use a binary chop. */
+ /* FIXME: use bsearch */
+ min = 0;
+ max = (int) mp->filepos_count - 1;
+ while (min <= max)
+ {
+ int mid;
+ int cmp;
+
+ mid = (min + max) / 2;
+ pp = &mp->filepos[mid];
+ cmp = strcmp (pp->file_name, name);
+ if (cmp == 0)
+ cmp = (int) pp->line_number - line;
+ if (cmp == 0)
+ return;
+ if (cmp < 0)
+ min = mid + 1;
+ else
+ max = mid - 1;
+ }
+
+ /* Extend the list so that we can add an position to it. */
+ nbytes = (mp->filepos_count + 1) * sizeof (mp->filepos[0]);
+ mp->filepos = xrealloc (mp->filepos, nbytes);
+
+ /* Shuffle the rest of the list up one, so that we can insert the
+ position at ``min''. */
+ /* FIXME: use memmove */
+ for (j = mp->filepos_count; j > min; --j)
+ mp->filepos[j] = mp->filepos[j - 1];
+ mp->filepos_count++;
+
+ /* Insert the postion into the empty slot. */
+ pp = &mp->filepos[min];
+ pp->file_name = xstrdup (name);
+ pp->line_number = line;
+}
+
+
+void
+message_print_style_indent ()
+{
+ indent = 1;
+}
+
+
+void
+message_print_style_uniforum ()
+{
+ uniforum = 1;
+}
+
+
+void
+message_print_style_escape (flag)
+ int flag;
+{
+ escape = (flag != 0);
+}
+
+
+message_list_ty *
+message_list_alloc ()
+{
+ message_list_ty *mlp;
+
+ mlp = xmalloc (sizeof (message_list_ty));
+ mlp->nitems = 0;
+ mlp->nitems_max = 0;
+ mlp->item = 0;
+ return mlp;
+}
+
+
+void
+message_list_append (mlp, mp)
+ message_list_ty *mlp;
+ message_ty *mp;
+{
+ if (mlp->nitems >= mlp->nitems_max)
+ {
+ size_t nbytes;
+
+ mlp->nitems_max = mlp->nitems_max * 2 + 4;
+ nbytes = mlp->nitems_max * sizeof (message_ty *);
+ mlp->item = xrealloc (mlp->item, nbytes);
+ }
+ mlp->item[mlp->nitems++] = mp;
+}
+
+
+void
+message_list_delete_nth (mlp, n)
+ message_list_ty *mlp;
+ size_t n;
+{
+ size_t j;
+
+ if (n >= mlp->nitems)
+ return;
+ message_free (mlp->item[n]);
+ for (j = n + 1; j < mlp->nitems; ++j)
+ mlp->item[j - 1] = mlp->item[j];
+ mlp->nitems--;
+}
+
+
+message_ty *
+message_list_search (mlp, msgid)
+ message_list_ty *mlp;
+ const char *msgid;
+{
+ size_t j;
+
+ for (j = 0; j < mlp->nitems; ++j)
+ {
+ message_ty *mp;
+
+ mp = mlp->item[j];
+ if (0 == strcmp (msgid, mp->msgid))
+ return mp;
+ }
+ return 0;
+}
+
+
+static message_ty *
+message_list_search_fuzzy_inner (mlp, msgid, best_weight_p)
+ message_list_ty *mlp;
+ const char *msgid;
+ double *best_weight_p;
+{
+ size_t j;
+ message_ty *best_mp;
+
+ best_mp = NULL;
+ for (j = 0; j < mlp->nitems; ++j)
+ {
+ size_t k;
+ double weight;
+ message_ty *mp;
+
+ mp = mlp->item[j];
+
+ for (k = 0; k < mp->variant_count; ++k)
+ if (mp->variant[k].msgstr != NULL && mp->variant[k].msgstr[0] != '\0')
+ break;
+ if (k >= mp->variant_count)
+ continue;
+
+ weight = fstrcmp (msgid, mp->msgid);
+ if (weight > *best_weight_p)
+ {
+ *best_weight_p = weight;
+ best_mp = mp;
+ }
+ }
+ return best_mp;
+}
+
+
+message_ty *
+message_list_search_fuzzy (mlp, msgid)
+ message_list_ty *mlp;
+ const char *msgid;
+{
+ double best_weight;
+
+ best_weight = 0.6;
+ return message_list_search_fuzzy_inner (mlp, msgid, &best_weight);
+}
+
+
+void
+message_list_free (mlp)
+ message_list_ty *mlp;
+{
+ size_t j;
+
+ for (j = 0; j < mlp->nitems; ++j)
+ message_free (mlp->item[j]);
+ if (mlp->item)
+ free (mlp->item);
+ free (mlp);
+}
+
+
+message_list_list_ty *
+message_list_list_alloc ()
+{
+ message_list_list_ty *mllp;
+
+ mllp = xmalloc (sizeof (message_list_list_ty));
+ mllp->nitems = 0;
+ mllp->nitems_max = 0;
+ mllp->item = 0;
+ return mllp;
+}
+
+
+void
+message_list_list_append (mllp, mlp)
+ message_list_list_ty *mllp;
+ message_list_ty *mlp;
+{
+ if (mllp->nitems >= mllp->nitems_max)
+ {
+ size_t nbytes;
+
+ mllp->nitems_max = mllp->nitems_max * 2 + 4;
+ nbytes = mllp->nitems_max * sizeof (message_list_ty *);
+ mllp->item = xrealloc (mllp->item, nbytes);
+ }
+ mllp->item[mllp->nitems++] = mlp;
+}
+
+
+void
+message_list_list_append_list (mllp, mllp2)
+ message_list_list_ty *mllp;
+ message_list_list_ty *mllp2;
+{
+ size_t j;
+
+ for (j = 0; j < mllp2->nitems; ++j)
+ message_list_list_append (mllp, mllp2->item[j]);
+}
+
+
+message_ty *
+message_list_list_search (mllp, msgid)
+ message_list_list_ty *mllp;
+ const char *msgid;
+{
+ size_t j;
+
+ for (j = 0; j < mllp->nitems; ++j)
+ {
+ message_list_ty *mlp;
+ message_ty *mp;
+
+ mlp = mllp->item[j];
+ mp = message_list_search (mlp, msgid);
+ if (mp)
+ return mp;
+ }
+ return 0;
+}
+
+
+message_ty *
+message_list_list_search_fuzzy (mllp, msgid)
+ message_list_list_ty *mllp;
+ const char *msgid;
+{
+ size_t j;
+ double best_weight;
+ message_ty *best_mp;
+
+ best_weight = 0.6;
+ best_mp = NULL;
+ for (j = 0; j < mllp->nitems; ++j)
+ {
+ message_list_ty *mlp;
+ message_ty *mp;
+
+ mlp = mllp->item[j];
+ mp = message_list_search_fuzzy_inner (mlp, msgid, &best_weight);
+ if (mp)
+ best_mp = mp;
+ }
+ return best_mp;
+}
+
+
+void
+message_list_list_free (mllp)
+ message_list_list_ty *mllp;
+{
+ size_t j;
+
+ for (j = 0; j < mllp->nitems; ++j)
+ message_list_free (mllp->item[j]);
+ if (mllp->item)
+ free (mllp->item);
+ free (mllp);
+}
+
+
+/* Local functions. */
+
+static void
+wrap (fp, line_prefix, name, value, do_wrap)
+ FILE *fp;
+ const char *line_prefix;
+ const char *name;
+ const char *value;
+ int do_wrap;
+{
+ const char *s;
+ int first_line;
+ /* The \a and \v escapes were added by the ANSI C Standard. Prior
+ to the Standard, most compilers did not have them. Because we
+ need the same program on all platforms we don't provide support
+ for them here. */
+ static const char escapes[] = "\b\f\n\r\t";
+ static const char escape_names[] = "bfnrt";
+
+ /* The empty string is a special case. */
+ if (*value == '\0')
+ {
+ if (line_prefix != NULL)
+ fputs (line_prefix, fp);
+ fputs (name, fp);
+ putc (indent ? '\t' : ' ', fp);
+ fputs ("\"\"\n", fp);
+ return;
+ }
+
+ s = value;
+ first_line = 1;
+ while (*s)
+ {
+ const char *ep;
+ int ocol;
+
+ /* The line starts with different things depending on whether it
+ is the first line, and if we are using the indented style. */
+ if (first_line)
+ {
+ ocol = strlen (name) + (line_prefix ? strlen (line_prefix) : 0);
+ if (indent && ocol < 8)
+ ocol = 8;
+ else
+ ++ocol;
+ }
+ else
+ ocol = (indent ? 8 : 0);
+
+ /* Allow room for the opening quote character. */
+ ++ocol;
+
+ /* Work out how many characters from the string will fit on a
+ line. Natural breaks occur at embedded newline characters. */
+ for (ep = s; *ep; ++ep)
+ {
+ const char *esc;
+ int cw;
+ int c;
+
+ c = (unsigned char) *ep;
+ /* FIXME This is the wrong locale. While message_list_print
+ set the "C" locale for LC_CTYPE, the need is to use the
+ correct locale for the file's contents. */
+ esc = strchr (escapes, c);
+ if (esc == NULL && (!escape || isprint (c)))
+ cw = 1 + (c == '\\' || c == '"');
+ else
+ cw = esc != NULL ? 2 : 4;
+ /* Allow 1 character for the closing quote. */
+ if (ocol + cw >= (do_wrap == no ? INT_MAX : page_width))
+ break;
+ ocol += cw;
+ if (c == '\n')
+ {
+ ++ep;
+ break;
+ }
+ }
+
+ /* The above loop detects if a line is too long. If it is too
+ long, see if there is a better place to break the line. */
+ if (*ep)
+ {
+ const char *bp;
+
+ for (bp = ep; bp > s; --bp)
+ if (bp[-1] == ' ' || bp[-1] == '\n')
+ {
+ ep = bp;
+ break;
+ }
+ }
+
+ /* If this is the first line, and we are not using the indented
+ style, and the line would wrap, then use an empty first line
+ and restart. */
+ if (first_line && !indent && *ep != '\0')
+ {
+ fprintf (fp, "%s%s \"\"\n", line_prefix ? line_prefix : "", name);
+ s = value;
+ first_line = 0;
+ continue;
+ }
+
+ /* Print the beginning of the line. This will depend on whether
+ this is the first line, and if the indented style is being
+ used. */
+ if (first_line)
+ {
+ first_line = 0;
+ if (line_prefix != NULL)
+ fputs (line_prefix, fp);
+ fputs (name, fp);
+ putc (indent ? '\t' : ' ', fp);
+ }
+ else
+ {
+ if (line_prefix != NULL)
+ fputs (line_prefix, fp);
+ if (indent)
+ putc ('\t', fp);
+ }
+
+ /* Print the body of the line. C escapes are used for
+ unprintable characters. */
+ putc ('"', fp);
+ while (s < ep)
+ {
+ const char *esc;
+ int c;
+
+ c = (unsigned char) *s++;
+ /* FIXME This is the wrong locale. While message_list_print
+ set the "C" locale for LC_CTYPE, the need is to use the
+ correct locale for the file's contents. */
+ esc = strchr (escapes, c);
+ if (esc == NULL && (!escape || isprint (c)))
+ {
+ if (c == '\\' || c == '"')
+ putc ('\\', fp);
+ putc (c, fp);
+ }
+ else if (esc != NULL)
+ {
+ c = escape_names[esc - escapes];
+
+ putc ('\\', fp);
+ putc (c, fp);
+
+ /* We warn about any use of escape sequences beside
+ '\n' and '\t'. */
+ if (c != 'n' && c != 't')
+ error (0, 0, _("\
+internationalized messages should not contain the `\\%c' escape sequence"),
+ c);
+ }
+ else
+ fprintf (fp, "\\%3.3o", c);
+ }
+ fputs ("\"\n", fp);
+ }
+}
+
+
+static void
+print_blank_line (fp)
+ FILE *fp;
+{
+ if (uniforum)
+ fputs ("#\n", fp);
+ else
+ putc ('\n', fp);
+}
+
+
+static void
+message_print (mp, fp, domain, blank_line, debug)
+ const message_ty *mp;
+ FILE *fp;
+ const char *domain;
+ int blank_line;
+ int debug;
+{
+ message_variant_ty *mvp;
+ int first;
+ size_t j;
+
+ /* Find the relevant message variant. If there isn't one, remember
+ this using a NULL pointer. */
+ mvp = NULL;
+ first = 0;
+
+ for (j = 0; j < mp->variant_count; ++j)
+ {
+ if (strcmp (domain, mp->variant[j].domain) == 0)
+ {
+ mvp = &mp->variant[j];
+ first = (j == 0);
+ break;
+ }
+ }
+
+ /* Separate messages with a blank line. Uniforum doesn't like blank
+ lines, so use an empty comment (unless there already is one). */
+ if (blank_line && (!uniforum
+ || mp->comment == NULL
+ || mp->comment->nitems == 0
+ || mp->comment->item[0][0] != '\0'))
+ print_blank_line (fp);
+
+ /* The first variant of a message will have the comments attached to
+ it. We can't attach them to all variants in case we are read in
+ again, multiplying the number of comment lines. Usually there is
+ only one variant. */
+ if (first)
+ {
+ if (mp->comment != NULL)
+ for (j = 0; j < mp->comment->nitems; ++j)
+ {
+ const char *s = mp->comment->item[j];
+ do
+ {
+ const char *e;
+ putc ('#', fp);
+ /* FIXME This is the wrong locale. While
+ message_list_print set the "C" locale for LC_CTYPE,
+ the need to use the correct locale for the file's
+ contents. */
+ if (*s != '\0' && !isspace (*s))
+ putc (' ', fp);
+ e = strchr (s, '\n');
+ if (e == NULL)
+ {
+ fputs (s, fp);
+ s = NULL;
+ }
+ else
+ {
+ fwrite (s, 1, e - s, fp);
+ s = e + 1;
+ }
+ putc ('\n', fp);
+ }
+ while (s != NULL);
+ }
+
+ if (mp->comment_dot != NULL)
+ for (j = 0; j < mp->comment_dot->nitems; ++j)
+ {
+ const char *s = mp->comment_dot->item[j];
+ putc ('#', fp);
+ putc ('.', fp);
+ /* FIXME This is the wrong locale. While
+ message_list_print set the "C" locale for LC_CTYPE, the
+ need to use the correct locale for the file's contents. */
+ if (*s && !isspace (*s))
+ putc (' ', fp);
+ fputs (s, fp);
+ putc ('\n', fp);
+ }
+ }
+
+ /* Print the file position comments for every domain. This will
+ help a human who is trying to navigate the sources. There is no
+ problem of getting repeat positions, because duplicates are
+ checked for. */
+ if (mp->filepos_count != 0)
+ {
+ if (uniforum)
+ for (j = 0; j < mp->filepos_count; ++j)
+ {
+ lex_pos_ty *pp = &mp->filepos[j];
+ char *cp = pp->file_name;
+ while (cp[0] == '.' && cp[1] == '/')
+ cp += 2;
+ /* There are two Sun formats to choose from: SunOS and
+ Solaris. Use the Solaris form here. */
+ fprintf (fp, "# File: %s, line: %ld\n",
+ cp, (long) pp->line_number);
+ }
+ else
+ {
+ size_t column;
+
+ fputs ("#:", fp);
+ column = 2;
+ for (j = 0; j < mp->filepos_count; ++j)
+ {
+ lex_pos_ty *pp;
+ char buffer[20];
+ char *cp;
+ size_t len;
+
+ pp = &mp->filepos[j];
+ cp = pp->file_name;
+ while (cp[0] == '.' && cp[1] == '/')
+ cp += 2;
+ sprintf (buffer, "%ld", (long) pp->line_number);
+ len = strlen (cp) + strlen (buffer) + 2;
+ if (column > 2 && column + len >= page_width)
+ {
+ fputs ("\n#:", fp);
+ column = 2;
+ }
+ fprintf (fp, " %s:%s", cp, buffer);
+ column += len;
+ }
+ putc ('\n', fp);
+ }
+ }
+
+ /* Print flag information in special comment. */
+ if (first && ((mp->is_fuzzy && mvp != NULL && mvp->msgstr[0] != '\0')
+ || significant_c_format_p (mp->is_c_format)
+ || mp->do_wrap == no))
+ {
+ int first_flag = 1;
+
+ putc ('#', fp);
+ putc (',', fp);
+
+ /* We don't print the fuzzy flag if the msgstr is empty. This
+ might be introduced by the user but we want to normalize the
+ output. */
+ if (mp->is_fuzzy && mvp != NULL && mvp->msgstr[0] != '\0')
+ {
+ fputs (" fuzzy", fp);
+ first_flag = 0;
+ }
+
+ if (significant_c_format_p (mp->is_c_format))
+ {
+ if (!first_flag)
+ putc (',', fp);
+
+ fputs (make_c_format_description_string (mp->is_c_format, debug),
+ fp);
+ first_flag = 0;
+ }
+
+ if (mp->do_wrap == no)
+ {
+ if (!first_flag)
+ putc (',', fp);
+
+ fputs (make_c_width_description_string (mp->do_wrap), fp);
+ first_flag = 0;
+ }
+
+ putc ('\n', fp);
+ }
+
+ /* Print each of the message components. Wrap them nicely so they
+ are as readable as possible. If there is no recorded msgstr for
+ this domain, emit an empty string. */
+ wrap (fp, NULL, "msgid", mp->msgid, mp->do_wrap);
+ wrap (fp, NULL, "msgstr", mvp ? mvp->msgstr : "", mp->do_wrap);
+}
+
+
+static void
+message_print_obsolete (mp, fp, domain, blank_line)
+ const message_ty *mp;
+ FILE *fp;
+ const char *domain;
+ int blank_line;
+{
+ message_variant_ty *mvp;
+ size_t j;
+
+ /* Find the relevant message variant. If there isn't one, remember
+ this using a NULL pointer. */
+ mvp = NULL;
+
+ for (j = 0; j < mp->variant_count; ++j)
+ {
+ if (strcmp (domain, mp->variant[j].domain) == 0)
+ {
+ mvp = &mp->variant[j];
+ break;
+ }
+ }
+
+ /* If no msgstr is found or it is the empty string we print nothing. */
+ if (mvp == NULL || mvp->msgstr[0] == '\0')
+ return;
+
+ /* Separate messages with a blank line. Uniforum doesn't like blank
+ lines, so use an empty comment (unless there already is one). */
+ if (blank_line)
+ print_blank_line (fp);
+
+ /* Print translator comment if available. */
+ if (mp->comment)
+ for (j = 0; j < mp->comment->nitems; ++j)
+ {
+ const char *s = mp->comment->item[j];
+ do
+ {
+ const char *e;
+ putc ('#', fp);
+ /* FIXME This is the wrong locale. While
+ message_list_print set the "C" locale for LC_CTYPE, the
+ need to use the correct locale for the file's contents. */
+ if (*s != '\0' && !isspace (*s))
+ putc (' ', fp);
+ e = strchr (s, '\n');
+ if (e == NULL)
+ {
+ fputs (s, fp);
+ s = NULL;
+ }
+ else
+ {
+ fwrite (s, 1, e - s, fp);
+ s = e + 1;
+ }
+ putc ('\n', fp);
+ }
+ while (s != NULL);
+ }
+
+ /* Print flag information in special comment. */
+ if (mp->is_fuzzy)
+ {
+ int first = 1;
+
+ putc ('#', fp);
+ putc (',', fp);
+
+ if (mp->is_fuzzy)
+ {
+ fputs (" fuzzy", fp);
+ first = 0;
+ }
+
+ putc ('\n', fp);
+ }
+
+ /* Print each of the message components. Wrap them nicely so they
+ are as readable as possible. */
+ wrap (fp, "#~ ", "msgid", mp->msgid, mp->do_wrap);
+ wrap (fp, "#~ ", "msgstr", mvp->msgstr, mp->do_wrap);
+}
+
+
+void
+message_list_print (mlp, filename, force, debug)
+ message_list_ty *mlp;
+ const char *filename;
+ int force;
+ int debug;
+{
+ FILE *fp;
+ size_t j, k;
+ string_list_ty *dl;
+ int blank_line;
+#ifdef HAVE_SETLOCALE
+ char *old_locale;
+#endif
+
+ /* We will not write anything if we have no message or only the
+ header entry. */
+ if (force == 0
+ && (mlp->nitems == 0
+ || (mlp->nitems == 1 && *mlp->item[0]->msgid == '\0')))
+ return;
+
+ /* Build the list of domains. */
+ dl = string_list_alloc ();
+ for (j = 0; j < mlp->nitems; ++j)
+ {
+ message_ty *mp = mlp->item[j];
+ for (k = 0; k < mp->variant_count; ++k)
+ string_list_append_unique (dl, mp->variant[k].domain);
+ }
+
+ /* Open the output file. */
+ if (filename != NULL && strcmp (filename, "-") != 0
+ && strcmp (filename, "/dev/stdout") != 0)
+ {
+ fp = fopen (filename, "w");
+ if (fp == NULL)
+ error (EXIT_FAILURE, errno, _("cannot create output file \"%s\""),
+ filename);
+ }
+ else
+ {
+ fp = stdout;
+ /* xgettext:no-c-format */
+ filename = _("standard output");
+ }
+
+#ifdef HAVE_SETLOCALE
+ /* FIXME This is the wrong locale. The program is currently set for
+ the user's native language locale, for the error messages. This
+ code sets it to the "C" locale, but that isn't right either. The
+ need is to use the correct locale for the file's contents. */
+ old_locale = setlocale (LC_CTYPE, "C");
+ if (old_locale)
+ old_locale = xstrdup (old_locale);
+#endif
+
+ /* Write out the messages for each domain. */
+ blank_line = 0;
+ for (k = 0; k < dl->nitems; ++k)
+ {
+ /* If there is only one domain, and that domain is the default,
+ don't bother emitting the domain name, because it is the
+ default. */
+ if (dl->nitems != 1 || strcmp (dl->item[0], MESSAGE_DOMAIN_DEFAULT) != 0)
+ {
+ if (blank_line)
+ print_blank_line (fp);
+ fprintf (fp, "domain \"%s\"\n", dl->item[k]);
+ blank_line = 1;
+ }
+
+ /* Write out each of the messages for this domain. */
+ for (j = 0; j < mlp->nitems; ++j)
+ if (mlp->item[j]->obsolete == 0)
+ {
+ message_print (mlp->item[j], fp, dl->item[k], blank_line, debug);
+ blank_line = 1;
+ }
+
+ /* Write out each of the obsolete messages for this domain. */
+ for (j = 0; j < mlp->nitems; ++j)
+ if (mlp->item[j]->obsolete != 0)
+ {
+ message_print_obsolete (mlp->item[j], fp, dl->item[k], blank_line);
+ blank_line = 1;
+ }
+ }
+ string_list_free (dl);
+
+ /* Restore the old locale. Do this before emitting error messages,
+ so that the correct locale is used for the error. (Ideally,
+ error should ensure this before calling gettext for the format
+ string.) */
+#ifdef HAVE_SETLOCALE
+ if (old_locale)
+ {
+ setlocale (LC_CTYPE, old_locale);
+ free (old_locale);
+ }
+#endif
+
+ /* Make sure nothing went wrong. */
+ if (fflush (fp))
+ error (EXIT_FAILURE, errno, _("error while writing \"%s\" file"),
+ filename);
+ fclose (fp);
+}
+
+
+static int
+msgid_cmp (va, vb)
+ const void *va;
+ const void *vb;
+{
+ const message_ty *a = *(const message_ty **) va;
+ const message_ty *b = *(const message_ty **) vb;
+#ifdef HAVE_STRCOLL
+ return strcoll (a->msgid, b->msgid);
+#else
+ return strcmp (a->msgid, b->msgid);
+#endif
+}
+
+
+void
+message_list_sort_by_msgid (mlp)
+ message_list_ty *mlp;
+{
+ /* FIXME This is the wrong locale. The program is currently set for
+ the user's native language locale, for the error messages. This
+ code sets it to the "C" locale, but that isn't right either. The
+ need is to use the correct locale for the file's contents. */
+#ifdef HAVE_SETLOCALE
+ char *tmp = setlocale (LC_COLLATE, "C");
+ if (tmp)
+ tmp = xstrdup (tmp);
+#endif
+ qsort (mlp->item, mlp->nitems, sizeof (mlp->item[0]), msgid_cmp);
+#ifdef HAVE_SETLOCALE
+ if (tmp)
+ {
+ setlocale (LC_COLLATE, tmp);
+ free (tmp);
+ }
+#endif
+}
+
+
+static int
+filepos_cmp (va, vb)
+ const void *va;
+ const void *vb;
+{
+ const message_ty *a = *(const message_ty **) va;
+ const message_ty *b = *(const message_ty **) vb;
+ int cmp;
+
+ /* No filepos is smaller than any other filepos. */
+ if (a->filepos_count == 0)
+ {
+ if (b->filepos_count != 0)
+ return -1;
+ }
+ if (b->filepos_count == 0)
+ return 1;
+
+ /* Compare on the file names... */
+ cmp = strcmp (a->filepos[0].file_name, b->filepos[0].file_name);
+ if (cmp != 0)
+ return cmp;
+
+ /* If they are equal, compare on the line numbers... */
+ cmp = a->filepos[0].line_number - b->filepos[0].line_number;
+ if (cmp != 0)
+ return cmp;
+
+ /* If they are equal, compare on the msgid strings. */
+#ifdef HAVE_STRCOLL
+ return strcoll (a->msgid, b->msgid);
+#else
+ return strcmp (a->msgid, b->msgid);
+#endif
+}
+
+
+void
+message_list_sort_by_filepos (mlp)
+ message_list_ty *mlp;
+{
+ /* FIXME This is the wrong locale. The program is currently set for
+ the user's native language locale, for the error messages. This
+ code sets it to the "C" locale, but that isn't right either. The
+ need is to use the correct locale for the file's contents. */
+#ifdef HAVE_SETLOCALE
+ char *tmp = setlocale (LC_COLLATE, "C");
+ if (tmp)
+ tmp = xstrdup (tmp);
+#endif
+ qsort (mlp->item, mlp->nitems, sizeof (mlp->item[0]), filepos_cmp);
+#ifdef HAVE_SETLOCALE
+ if (tmp)
+ {
+ setlocale (LC_COLLATE, tmp);
+ free (tmp);
+ }
+#endif
+}
+
+
+enum is_c_format
+parse_c_format_description_string (s)
+ const char *s;
+{
+ if (strstr (s, "no-c-format") != NULL)
+ return no;
+ else if (strstr (s, "impossible-c-format") != NULL)
+ return impossible;
+ else if (strstr (s, "possible-c-format") != NULL)
+ return possible;
+ else if (strstr (s, "c-format") != NULL)
+ return yes;
+ return undecided;
+}
+
+
+enum is_c_format
+parse_c_width_description_string (s)
+ const char *s;
+{
+ if (strstr (s, "no-wrap") != NULL)
+ return no;
+ else if (strstr (s, "wrap") != NULL)
+ return yes;
+ return undecided;
+}
+
+
+static const char *
+make_c_format_description_string (is_c_format, debug)
+ enum is_c_format is_c_format;
+ int debug;
+{
+ const char *result = NULL;
+
+ switch (is_c_format)
+ {
+ case possible:
+ if (debug)
+ {
+ result = " possible-c-format";
+ break;
+ }
+ /* FALLTHROUGH */
+ case yes:
+ result = " c-format";
+ break;
+ case impossible:
+ result = " impossible-c-format";
+ break;
+ case no:
+ result = " no-c-format";
+ break;
+ case undecided:
+ result = " undecided";
+ break;
+ default:
+ abort ();
+ }
+
+ return result;
+}
+
+
+static const char *
+make_c_width_description_string (do_wrap)
+ enum is_c_format do_wrap;
+{
+ const char *result = NULL;
+
+ switch (do_wrap)
+ {
+ case yes:
+ result = " wrap";
+ break;
+ case no:
+ result = " no-wrap";
+ break;
+ default:
+ abort ();
+ }
+
+ return result;
+}
+
+
+int
+possible_c_format_p (is_c_format)
+ enum is_c_format is_c_format;
+{
+ return is_c_format == possible || is_c_format == yes;
+}
+
+
+static int
+significant_c_format_p (is_c_format)
+ enum is_c_format is_c_format;
+{
+ return is_c_format != undecided && is_c_format != impossible;
+}
+
+
+void
+message_page_width_set (n)
+ size_t n;
+{
+ if (n == 0)
+ {
+ page_width = INT_MAX;
+ return;
+ }
+
+ if (n < 20)
+ n = 20;
+
+ page_width = n;
+}
diff --git a/src/message.h b/src/message.h
new file mode 100644
index 0000000..aa60005
--- /dev/null
+++ b/src/message.h
@@ -0,0 +1,149 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free SoftwareFoundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _MESSAGE_H
+#define _MESSAGE_H
+
+#include "po-lex.h"
+#include "str-list.h"
+
+/* According to Sun's Uniforum proposal the default message domain is
+ named `messages'. */
+#define MESSAGE_DOMAIN_DEFAULT "messages"
+
+
+/* Is current msgid a format string? */
+enum is_c_format
+{
+ undecided,
+ yes,
+ no,
+ possible,
+ impossible
+};
+
+typedef struct message_variant_ty message_variant_ty;
+struct message_variant_ty
+{
+ const char *domain;
+ lex_pos_ty pos;
+ const char *msgstr;
+};
+
+typedef struct message_ty message_ty;
+struct message_ty
+{
+ /* Plain comments (#) appearing before the message. */
+ string_list_ty *comment;
+
+ /* Extracted comments (#.) appearing before the message. */
+ string_list_ty *comment_dot;
+
+ /* File position comments (#:) appearing before the message, one for
+ each unique file position instance, sorted by file name and then
+ by line. */
+ size_t filepos_count;
+ lex_pos_ty *filepos;
+
+ /* Informations from special comments (e.g. generated by msgmerge). */
+ int is_fuzzy;
+ enum is_c_format is_c_format;
+
+ /* Do we want the string to be wrapped in the emitted PO file? */
+ enum is_c_format do_wrap;
+
+ /* The msgid string. */
+ const char *msgid;
+
+ /* The msgstr strings, one for each observed domain in the file. */
+ size_t variant_count;
+ message_variant_ty *variant;
+
+ /* Used for checking that messages have been used, in the msgcmp and
+ msgmerge programs. */
+ int used;
+
+ /* If set the message is obsolete and while writing out it should be
+ commented out. */
+ int obsolete;
+};
+
+message_ty *message_alloc PARAMS ((char *msgid));
+void message_free PARAMS ((message_ty *));
+
+message_variant_ty *message_variant_search PARAMS ((message_ty *mp,
+ const char *domain));
+void message_variant_append PARAMS ((message_ty *mp, const char *domain,
+ const char *msgstr,
+ const lex_pos_ty *pp));
+void message_comment_append PARAMS ((message_ty *, const char *));
+void message_comment_dot_append PARAMS ((message_ty *, const char *));
+message_ty *message_copy PARAMS ((message_ty *));
+message_ty *message_merge PARAMS ((message_ty *def, message_ty *ref));
+void message_comment_filepos PARAMS ((message_ty *, const char *, size_t));
+void message_print_style_indent PARAMS ((void));
+void message_print_style_uniforum PARAMS ((void));
+void message_print_style_escape PARAMS ((int));
+
+
+typedef struct message_list_ty message_list_ty;
+struct message_list_ty
+{
+ message_ty **item;
+ size_t nitems;
+ size_t nitems_max;
+};
+
+message_list_ty *message_list_alloc PARAMS ((void));
+void message_list_free PARAMS ((message_list_ty *));
+void message_list_append PARAMS ((message_list_ty *, message_ty *));
+void message_list_delete_nth PARAMS ((message_list_ty *, size_t));
+message_ty *message_list_search PARAMS ((message_list_ty *, const char *));
+message_ty *message_list_search_fuzzy PARAMS ((message_list_ty *,
+ const char *));
+void message_list_print PARAMS ((message_list_ty *, const char *, int, int));
+void message_list_sort_by_msgid PARAMS ((message_list_ty *));
+void message_list_sort_by_filepos PARAMS ((message_list_ty *));
+
+
+typedef struct message_list_list_ty message_list_list_ty;
+struct message_list_list_ty
+{
+ message_list_ty **item;
+ size_t nitems;
+ size_t nitems_max;
+};
+
+message_list_list_ty *message_list_list_alloc PARAMS ((void));
+void message_list_list_free PARAMS ((message_list_list_ty *));
+void message_list_list_append PARAMS ((message_list_list_ty *,
+ message_list_ty *));
+void message_list_list_append_list PARAMS ((message_list_list_ty *,
+ message_list_list_ty *));
+message_ty *message_list_list_search PARAMS ((message_list_list_ty *,
+ const char *));
+message_ty *message_list_list_search_fuzzy PARAMS ((message_list_list_ty *,
+ const char *));
+
+enum is_c_format parse_c_format_description_string PARAMS ((const char *s));
+enum is_c_format parse_c_width_description_string PARAMS ((const char *s));
+int possible_c_format_p PARAMS ((enum is_c_format));
+void message_page_width_set PARAMS ((size_t width));
+
+#endif /* message.h */
diff --git a/src/msgcmp.c b/src/msgcmp.c
new file mode 100644
index 0000000..af689a2
--- /dev/null
+++ b/src/msgcmp.c
@@ -0,0 +1,437 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <getopt.h>
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#include "dir-list.h"
+#include "error.h"
+#include "message.h"
+#include <system.h>
+#include <libintl.h>
+#include "po.h"
+#include "str-list.h"
+
+#define _(str) gettext (str)
+
+
+/* This structure defines a derived class of the po_ty class. (See
+ po.h for an explanation.) */
+typedef struct compare_class_ty compare_class_ty;
+struct compare_class_ty
+{
+ /* inherited instance variables, etc */
+ PO_BASE_TY
+
+ /* Name of domain we are currently examining. */
+ char *domain;
+
+ /* List of domains already appeared in the current file. */
+ string_list_ty *domain_list;
+
+ /* List of messages already appeared in the current file. */
+ message_list_ty *mlp;
+};
+
+/* String containing name the program is called with. */
+const char *program_name;
+
+/* Long options. */
+static const struct option long_options[] =
+{
+ { "directory", required_argument, NULL, 'D' },
+ { "help", no_argument, NULL, 'h' },
+ { "version", no_argument, NULL, 'V' },
+ { NULL, 0, NULL, 0 }
+};
+
+
+/* Prototypes for local functions. */
+static void usage PARAMS ((int __status));
+static void error_print PARAMS ((void));
+static void compare PARAMS ((char *, char *));
+static message_list_ty *grammar PARAMS ((char *__filename));
+static void compare_constructor PARAMS ((po_ty *__that));
+static void compare_destructor PARAMS ((po_ty *__that));
+static void compare_directive_domain PARAMS ((po_ty *__that, char *__name));
+static void compare_directive_message PARAMS ((po_ty *__that, char *__msgid,
+ lex_pos_ty *msgid_pos,
+ char *__msgstr,
+ lex_pos_ty *__msgstr_pos));
+static void compare_parse_debrief PARAMS ((po_ty *__that));
+
+
+int
+main (argc, argv)
+ int argc;
+ char *argv[];
+{
+ int optchar;
+ int do_help;
+ int do_version;
+
+ /* Set program name for messages. */
+ program_name = argv[0];
+ error_print_progname = error_print;
+
+#ifdef HAVE_SETLOCALE
+ /* Set locale via LC_ALL. */
+ setlocale (LC_ALL, "");
+#endif
+
+ /* Set the text message domain. */
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ do_help = 0;
+ do_version = 0;
+ while ((optchar = getopt_long (argc, argv, "D:hV", long_options, NULL))
+ != EOF)
+ switch (optchar)
+ {
+ case '\0': /* long option */
+ break;
+
+ case 'D':
+ dir_list_append (optarg);
+ break;
+
+ case 'h':
+ do_help = 1;
+ break;
+
+ case 'V':
+ do_version = 1;
+ break;
+
+ default:
+ usage (EXIT_FAILURE);
+ break;
+ }
+
+ /* Version information is requested. */
+ if (do_version)
+ {
+ printf ("%s (GNU %s) %s\n", basename (program_name), PACKAGE, VERSION);
+ /* xgettext: no-wrap */
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"),
+ "1995, 1996, 1997, 1998");
+ printf (_("Written by %s.\n"), "Peter Miller");
+ exit (EXIT_SUCCESS);
+ }
+
+ /* Help is requested. */
+ if (do_help)
+ usage (EXIT_SUCCESS);
+
+ /* Test whether we have an .po file name as argument. */
+ if (optind >= argc)
+ {
+ error (EXIT_SUCCESS, 0, _("no input files given"));
+ usage (EXIT_FAILURE);
+ }
+ if (optind + 2 != argc)
+ {
+ error (EXIT_SUCCESS, 0, _("exactly 2 input files required"));
+ usage (EXIT_FAILURE);
+ }
+
+ /* compare the two files */
+ compare (argv[optind], argv[optind + 1]);
+ exit (EXIT_SUCCESS);
+}
+
+
+/* Display usage information and exit. */
+static void
+usage (status)
+ int status;
+{
+ if (status != EXIT_SUCCESS)
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
+ program_name);
+ else
+ {
+ /* xgettext: no-wrap */
+ printf (_("\
+Usage: %s [OPTION] def.po ref.po\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -h, --help display this help and exit\n\
+ -V, --version output version information and exit\n\
+\n\
+Compare two Uniforum style .po files to check that both contain the same\n\
+set of msgid strings. The def.po file is an existing PO file with the\n\
+old translations. The ref.po file is the last created PO file\n\
+(generally by xgettext). This is useful for checking that you have\n\
+translated each and every message in your program. Where an exact match\n\
+cannot be found, fuzzy matching is used to produce better diagnostics.\n"),
+ program_name);
+ fputs (_("Report bugs to <bug-gnu-utils@gnu.org>.\n"), stdout);
+ }
+
+ exit (status);
+}
+
+
+/* The address of this function will be assigned to the hook in the error
+ functions. */
+static void
+error_print ()
+{
+ /* We don't want the program name to be printed in messages. Emacs'
+ compile.el does not like this. */
+}
+
+
+static void
+compare (fn1, fn2)
+ char *fn1;
+ char *fn2;
+{
+ message_list_ty *list1;
+ message_list_ty *list2;
+ int nerrors;
+ message_ty *mp1;
+ size_t j, k;
+
+ /* This is the master file, created by a human. */
+ list1 = grammar (fn1);
+
+ /* This is the generated file, created by groping the sources with
+ the xgettext program. */
+ list2 = grammar (fn2);
+
+ /* Every entry in the xgettext generated file must be matched by a
+ (single) entry in the human created file. */
+ nerrors = 0;
+ for (j = 0; j < list2->nitems; ++j)
+ {
+ message_ty *mp2;
+
+ mp2 = list2->item[j];
+
+ /* See if it is in the other file. */
+ mp1 = message_list_search (list1, mp2->msgid);
+ if (mp1)
+ {
+ mp1->used = 1;
+ continue;
+ }
+
+ /* If the message was not defined at all, try to find a very
+ similar message, it could be a typo, or the suggestion may
+ help. */
+ ++nerrors;
+ mp1 = message_list_search_fuzzy (list1, mp2->msgid);
+ if (mp1)
+ {
+ gram_error_at_line (&mp2->variant[0].pos, _("\
+this message is used but not defined..."));
+ gram_error_at_line (&mp1->variant[0].pos, _("\
+...but this definition is similar"));
+ mp1->used = 1;
+ }
+ else
+ {
+ gram_error_at_line (&mp2->variant[0].pos, _("\
+this message is used but not defined in %s"), fn1);
+ }
+ }
+
+ /* Look for messages in the human generated file, which are not
+ present in the xgettext generated file, indicating messages which
+ are not used in the program. */
+ for (k = 0; k < list1->nitems; ++k)
+ {
+ mp1 = list1->item[k];
+ if (mp1->used)
+ continue;
+ gram_error_at_line (&mp1->variant[0].pos,
+ _("warning: this message is not used"));
+ }
+
+ /* Exit with status 1 on any error. */
+ if (nerrors > 0)
+ error (EXIT_FAILURE, 0, "found %d fatal errors", nerrors);
+}
+
+
+/* Local functions. */
+
+static void
+compare_constructor (that)
+ po_ty *that;
+{
+ compare_class_ty *this = (compare_class_ty *) that;
+
+ this->mlp = message_list_alloc ();
+ this->domain = MESSAGE_DOMAIN_DEFAULT;
+ this->domain_list = string_list_alloc ();
+}
+
+
+static void
+compare_destructor (that)
+ po_ty *that;
+{
+ compare_class_ty *this = (compare_class_ty *) that;
+
+ string_list_free (this->domain_list);
+ /* Do not free this->mlp! */
+}
+
+
+static void
+compare_directive_domain (that, name)
+ po_ty *that;
+ char *name;
+{
+ compare_class_ty *this = (compare_class_ty *)that;
+ /* Override current domain name. Don't free memory. */
+ this->domain = name;
+}
+
+
+static void
+compare_directive_message (that, msgid, msgid_pos, msgstr, msgstr_pos)
+ po_ty *that;
+ char *msgid;
+ lex_pos_ty *msgid_pos;
+ char *msgstr;
+ lex_pos_ty *msgstr_pos;
+{
+ compare_class_ty *this = (compare_class_ty *) that;
+ message_ty *mp;
+ message_variant_ty *mvp;
+
+ /* Remember the domain names for later. */
+ string_list_append_unique (this->domain_list, this->domain);
+
+ /* See if this message ID has been seen before. */
+ mp = message_list_search (this->mlp, msgid);
+ if (mp)
+ free (msgid);
+ else
+ {
+ mp = message_alloc (msgid);
+ message_list_append (this->mlp, mp);
+ }
+
+ /* See if this domain has been seen for this message ID. */
+ mvp = message_variant_search (mp, this->domain);
+ if (mvp)
+ {
+ gram_error_at_line (msgid_pos, _("duplicate message definition"));
+ gram_error_at_line (&mvp->pos, _("\
+...this is the location of the first definition"));
+ free (msgstr);
+ }
+ else
+ message_variant_append (mp, this->domain, msgstr, msgstr_pos);
+}
+
+
+static void
+compare_parse_debrief (that)
+ po_ty *that;
+{
+ compare_class_ty *this = (compare_class_ty *) that;
+ message_list_ty *mlp = this->mlp;
+ size_t j;
+
+ /* For each domain in the used-domain-list, make sure each message
+ defines a msgstr in that domain. */
+ for (j = 0; j < this->domain_list->nitems; ++j)
+ {
+ const char *domain_name;
+ size_t k;
+
+ domain_name = this->domain_list->item[j];
+ for (k = 0; k < mlp->nitems; ++k)
+ {
+ const message_ty *mp;
+ size_t m;
+
+ mp = mlp->item[k];
+ for (m = 0; m < mp->variant_count; ++m)
+ {
+ message_variant_ty *mvp;
+
+ mvp = &mp->variant[m];
+ if (strcmp (domain_name, mvp->domain) == 0)
+ break;
+ }
+ if (m >= mp->variant_count)
+ gram_error_at_line (&mp->variant[0].pos, _("\
+this message has no definition in the \"%s\" domain"), domain_name);
+ }
+ }
+}
+
+
+/* So that the one parser can be used for multiple programs, and also
+ use good data hiding and encapsulation practices, an object
+ oriented approach has been taken. An object instance is allocated,
+ and all actions resulting from the parse will be through
+ invokations of method functions of that object. */
+
+static po_method_ty compare_methods =
+{
+ sizeof (compare_class_ty),
+ compare_constructor,
+ compare_destructor,
+ compare_directive_domain,
+ compare_directive_message,
+ NULL, /* parse_brief */
+ compare_parse_debrief,
+ NULL, /* comment */
+ NULL, /* comment_dot */
+ NULL, /* comment_filepos */
+ NULL, /* comment_special */
+};
+
+
+static message_list_ty *
+grammar (filename)
+ char *filename;
+{
+ po_ty *pop;
+ message_list_ty *mlp;
+
+ pop = po_alloc(&compare_methods);
+ po_scan(pop, filename);
+ mlp = ((compare_class_ty *)pop)->mlp;
+ po_free(pop);
+ return mlp;
+}
diff --git a/src/msgcomm.c b/src/msgcomm.c
new file mode 100644
index 0000000..082639a
--- /dev/null
+++ b/src/msgcomm.c
@@ -0,0 +1,781 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <errno.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "dir-list.h"
+#include "error.h"
+#include "getline.h"
+#include "libgettext.h"
+#include "message.h"
+#include "po.h"
+#include "system.h"
+
+
+/* A convenience macro. I don't like writing gettext() every time. */
+#define _(str) gettext (str)
+
+
+/* If nonzero add comments for file name and line number for each msgid. */
+static int line_comment = 1;
+
+/* Name of default domain file. If not set defaults to messages.po. */
+static char *default_domain;
+
+/* Force output of PO file even if empty. */
+static int force_po;
+
+/* Directory in which output files are created. */
+static char *output_dir;
+
+/* If nonzero omit header with information about this run. */
+static int omit_header;
+
+/* String containing name the program is called with. */
+const char *program_name;
+
+/* These variables control which messages are selected. */
+static int more_than = -1;
+static int less_than = -1;
+
+/* Long options. */
+static const struct option long_options[] =
+{
+ { "add-comments", optional_argument, NULL, 'c' },
+ { "add-location", no_argument, &line_comment, 1 },
+ { "default-domain", required_argument, NULL, 'd' },
+ { "directory", required_argument, NULL, 'D' },
+ { "escape", no_argument, NULL, 'E' },
+ { "files-from", required_argument, NULL, 'f' },
+ { "force-po", no_argument, &force_po, 1 },
+ { "help", no_argument, NULL, 'h' },
+ { "indent", no_argument, NULL, 'i' },
+ { "join-existing", no_argument, NULL, 'j' },
+ { "no-escape", no_argument, NULL, 'e' },
+ { "no-location", no_argument, &line_comment, 0 },
+ { "omit-header", no_argument, &omit_header, 1 },
+ { "output", required_argument, NULL, 'o' },
+ { "output-dir", required_argument, NULL, 'p' },
+ { "sort-by-file", no_argument, NULL, 'F' },
+ { "sort-output", no_argument, NULL, 's' },
+ { "strict", no_argument, NULL, 'S' },
+ { "version", no_argument, NULL, 'V' },
+ { "width", required_argument, NULL, 'w', },
+ { "more-than", required_argument, NULL, '>', },
+ { "less-than", required_argument, NULL, '<', },
+ { NULL, 0, NULL, 0 }
+};
+
+
+/* Prototypes for local functions. */
+static void usage PARAMS ((int status))
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ > 4) || __GNUC__ > 2)
+ __attribute__ ((noreturn))
+#endif
+;
+static void error_print PARAMS ((void));
+static string_list_ty *read_name_from_file PARAMS ((const char *__file_name));
+static void extract_constructor PARAMS ((po_ty *__that));
+static void extract_directive_domain PARAMS ((po_ty *__that, char *__name));
+static void extract_directive_message PARAMS ((po_ty *__that, char *__msgid,
+ lex_pos_ty *__msgid_pos,
+ char *__msgstr,
+ lex_pos_ty *__msgstr_pos));
+static void extract_parse_brief PARAMS ((po_ty *__that));
+static void extract_comment PARAMS ((po_ty *__that, const char *__s));
+static void extract_comment_dot PARAMS ((po_ty *__that, const char *__s));
+static void extract_comment_filepos PARAMS ((po_ty *__that, const char *__name,
+ int __line));
+static void extract_comment_special PARAMS ((po_ty *that, const char *s));
+static void read_po_file PARAMS ((const char *__file_name,
+ message_list_ty *__mlp));
+
+
+int
+main (argc, argv)
+ int argc;
+ char *argv[];
+{
+ int cnt;
+ int optchar;
+ int do_help = 0;
+ int do_version = 0;
+ message_list_ty *mlp;
+ int sort_output = 0;
+ int sort_by_file = 0;
+ char *file_name;
+ const char *files_from = NULL;
+ string_list_ty *file_list;
+ char *output_file = NULL;
+ size_t j;
+
+ /* Set program name for messages. */
+ program_name = argv[0];
+ error_print_progname = error_print;
+
+#ifdef HAVE_SETLOCALE
+ /* Set locale via LC_ALL. */
+ setlocale (LC_ALL, "");
+#endif
+
+ /* Set the text message domain. */
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ /* Set initial value of variables. */
+ line_comment = -1;
+ default_domain = MESSAGE_DOMAIN_DEFAULT;
+
+ while ((optchar = getopt_long (argc, argv,
+ "<>ac::Cd:D:eEf:Fhijk::l:L:m::M::no:p:sTuVw:x:",
+ long_options, NULL)) != EOF)
+ switch (optchar)
+ {
+ case '\0': /* Long option. */
+ break;
+ case '>':
+ {
+ int value;
+ char *endp;
+ value = strtol (optarg, &endp, 10);
+ if (endp != optarg)
+ more_than = value;
+ }
+ break;
+ case '<':
+ {
+ int value;
+ char *endp;
+ value = strtol (optarg, &endp, 10);
+ if (endp != optarg)
+ less_than = value;
+ }
+ break;
+ case 'd':
+ default_domain = optarg;
+ break;
+ case 'D':
+ dir_list_append (optarg);
+ break;
+ case 'e':
+ message_print_style_escape (0);
+ break;
+ case 'E':
+ message_print_style_escape (1);
+ break;
+ case 'f':
+ files_from = optarg;
+ break;
+ case 'F':
+ sort_by_file = 1;
+ break;
+ case 'h':
+ do_help = 1;
+ break;
+ case 'i':
+ message_print_style_indent ();
+ break;
+ case 'n':
+ line_comment = 1;
+ break;
+ case 'o':
+ output_file = optarg;
+ break;
+ case 'p':
+ {
+ size_t len = strlen (optarg);
+
+ if (output_dir != NULL)
+ free (output_dir);
+
+ if (optarg[len - 1] == '/')
+ output_dir = xstrdup (optarg);
+ else
+ {
+ asprintf (&output_dir, "%s/", optarg);
+ if (output_dir == NULL)
+ /* We are about to construct the absolute path to the
+ directory for the output files but asprintf failed. */
+ error (EXIT_FAILURE, errno, _("while preparing output"));
+ }
+ }
+ break;
+ case 's':
+ sort_output = 1;
+ break;
+ case 'S':
+ message_print_style_uniforum ();
+ break;
+ case 'u':
+ less_than = 2;
+ break;
+ case 'V':
+ do_version = 1;
+ break;
+ case 'w':
+ {
+ int value;
+ char *endp;
+ value = strtol (optarg, &endp, 10);
+ if (endp != optarg)
+ message_page_width_set (value);
+ }
+ break;
+ default:
+ usage (EXIT_FAILURE);
+ /* NOTREACHED */
+ }
+
+ /* Normalize selected options. */
+ if (omit_header != 0 && line_comment < 0)
+ line_comment = 0;
+
+ if (!line_comment && sort_by_file)
+ error (EXIT_FAILURE, 0, _("%s and %s are mutually exclusive"),
+ "--no-location", "--sort-by-file");
+
+ if (sort_output && sort_by_file)
+ error (EXIT_FAILURE, 0, _("%s and %s are mutually exclusive"),
+ "--sort-output", "--sort-by-file");
+
+ /* Version information requested. */
+ if (do_version)
+ {
+ printf ("%s (GNU %s) %s\n", basename (program_name), PACKAGE, VERSION);
+ /* xgettext: no-wrap */
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"),
+ "1995, 1996, 1997, 1998");
+ printf (_("Written by %s.\n"), "Peter Miller");
+ exit (EXIT_SUCCESS);
+ }
+
+ /* Help is requested. */
+ if (do_help)
+ usage (EXIT_SUCCESS);
+
+ /* Default output directory is the current directory. */
+ if (output_dir == NULL)
+ output_dir = ".";
+
+ /* Construct the name of the ouput file. If the default domain has
+ the special name "-" we write to stdout. */
+ if (output_file)
+ {
+ if (output_file[0] == '/' ||
+ strcmp(output_dir, ".") == 0 ||
+ strcmp(output_file, "-") == 0
+ )
+ file_name = xstrdup (output_file);
+ else
+ {
+ /* Please do NOT add a .po suffix! */
+ file_name = xmalloc (strlen (output_dir) + strlen (default_domain) + 2);
+ strcat (strcat (strcpy(file_name, output_dir), "/"), output_file);
+ }
+ }
+ else if (strcmp (default_domain, "-") == 0)
+ file_name = "-";
+ else
+ {
+ file_name = (char *) xmalloc (strlen (output_dir)
+ + strlen (default_domain)
+ + sizeof (".po") + 2);
+ stpcpy (stpcpy (stpcpy (stpcpy (file_name, output_dir), "/"),
+ default_domain), ".po");
+ }
+
+ /* Determine list of files we have to process. */
+ if (files_from != NULL)
+ file_list = read_name_from_file (files_from);
+ else
+ file_list = string_list_alloc ();
+ /* Append names from command line. */
+ for (cnt = optind; cnt < argc; ++cnt)
+ string_list_append_unique (file_list, argv[cnt]);
+
+ /* Test whether sufficient input files weregiven. */
+ if (file_list->nitems < 2)
+ {
+ error (EXIT_SUCCESS, 0, _("at least two files must be specified"));
+ usage (EXIT_FAILURE);
+ }
+
+ /* Allocate a message list to remember all the messages. */
+ mlp = message_list_alloc ();
+
+ /* Process all input files. */
+ for (cnt = 0; cnt < file_list->nitems; ++cnt)
+ read_po_file (file_list->item[cnt], mlp);
+ string_list_free (file_list);
+
+ /* Default the message selection criteria, and check them for sanity. */
+ if (more_than < 0)
+ more_than = (less_than < 0 ? 1 : 0);
+ if (less_than < 0)
+ less_than = INT_MAX;
+ if (more_than >= less_than || less_than < 2 || more_than >= mlp->nitems)
+ error (EXIT_FAILURE, 0,
+ _("impossible selection criteria specified (%d < n < %d)"),
+ more_than, less_than);
+
+ /* Remove messages which do not fit the criteria. */
+ j = 0;
+ while (j < mlp->nitems)
+ {
+ message_ty *mp;
+
+ mp = mlp->item[j];
+ if (mp->used > more_than && mp->used < less_than)
+ ++j;
+ else
+ message_list_delete_nth(mlp, j);
+ }
+
+ /* Sorting the list of messages. */
+ if (sort_by_file)
+ message_list_sort_by_filepos (mlp);
+ else if (sort_output)
+ message_list_sort_by_msgid (mlp);
+
+ /* Write the PO file. */
+ message_list_print (mlp, file_name, force_po, 0);
+
+ exit (EXIT_SUCCESS);
+}
+
+
+/* Display usage information and exit. */
+static void
+usage (status)
+ int status;
+{
+ if (status != EXIT_SUCCESS)
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
+ program_name);
+ else
+ {
+ /* xgettext: no-wrap */
+ printf (_("\
+Usage: %s [OPTION] INPUTFILE ...\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -e, --no-escape do not use C escapes in output (default)\n\
+ -E, --escape use C escapes in output, no extended chars\n\
+ -f, --files-from=FILE get list of input files from FILE\n\
+ --force-po write PO file even if empty\n\
+ -F, --sort-by-file sort output by file location\n\
+ -h, --help display this help and exit\n"),
+ program_name);
+ fputs (_("\
+ -i, --indent write the .po file using indented style\n\
+ --no-location do not write '#: filename:line' lines\n\
+ -n, --add-location generate '#: filename:line' lines (default)\n\
+ --omit-header don't write header with `msgid \"\"' entry\n\
+ -o, --output=FILE write output to specified file\n\
+ -p, --output-dir=DIR output files will be placed in directory DIR\n\
+ -s, --sort-output generate sorted output and remove duplicates\n\
+ --strict write out strict Uniforum conforming .po file\n\
+ -T, --trigraphs understand ANSI C trigraphs for input\n\
+ -u, --unique shorthand for --less-than=2, requests\n\
+ that only unique messages be printed\n"),
+ stdout);
+ fputs (_("\
+ -V, --version output version information and exit\n\
+ -w, --width=NUMBER set output page width\n\
+ -<, --less-than=NUMBER print messages with less than this many\n\
+ definitions, defaults to infinite if not\n\
+ set\n\
+ ->, --more-than=NUMBER print messages with more than this many\n\
+ definitions, defaults to 1 if not set\n\
+\n\
+Find messages which are common to two or more of the specified PO files.\n\
+By using the --more-than option, greater commonality may be requested\n\
+before messages are printed. Conversely, the --less-than option may be\n\
+used to specify less commonality before messages are printed (i.e.\n\
+--less-than=2 will only print the unique messages). Translations,\n\
+comments and extract comments will be preserved, but only from the first\n\
+PO file to define them. File positions from all PO files will be\n\
+preserved.\n"), stdout);
+ fputs (_("Report bugs to <bug-gnu-utils@gnu.org>.\n"),
+ stdout);
+ }
+
+ exit (status);
+}
+
+
+/* The address of this function will be assigned to the hook in the error
+ functions. */
+static void
+error_print ()
+{
+ /* We don't want the program name to be printed in messages. */
+}
+
+
+/* Read list of files to process from file. */
+static string_list_ty *
+read_name_from_file (file_name)
+ const char *file_name;
+{
+ size_t line_len = 0;
+ char *line_buf = NULL;
+ FILE *fp;
+ string_list_ty *result;
+
+ if (strcmp (file_name, "-") == 0)
+ fp = stdin;
+ else
+ {
+ fp = fopen (file_name, "r");
+ if (fp == NULL)
+ error (EXIT_FAILURE, errno,
+ _("error while opening \"%s\" for reading"), file_name);
+ }
+
+ result = string_list_alloc ();
+
+ while (!feof (fp))
+ {
+ /* Read next line from file. */
+ int len = getline (&line_buf, &line_len, fp);
+
+ /* In case of an error leave loop. */
+ if (len < 0)
+ break;
+
+ /* Remove trailing '\n'. */
+ if (len > 0 && line_buf[len - 1] == '\n')
+ line_buf[--len] = '\0';
+
+ /* Test if we have to ignore the line. */
+ if (*line_buf == '\0' || *line_buf == '#')
+ continue;
+
+ string_list_append_unique (result, line_buf);
+ }
+
+ /* Free buffer allocated through getline. */
+ if (line_buf != NULL)
+ free (line_buf);
+
+ /* Close input stream. */
+ if (fp != stdin)
+ fclose (fp);
+
+ return result;
+}
+
+
+typedef struct extract_class_ty extract_class_ty;
+struct extract_class_ty
+{
+ /* Inherited instance variables and methods. */
+ PO_BASE_TY
+
+ /* Cumulative list of messages. */
+ message_list_ty *mlp;
+
+ /* Cumulative comments for next message. */
+ string_list_ty *comment;
+ string_list_ty *comment_dot;
+
+ int is_fuzzy;
+ int is_c_format;
+ int do_wrap;
+
+ int filepos_count;
+ lex_pos_ty *filepos;
+};
+
+
+static void
+extract_constructor (that)
+ po_ty *that;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+
+ this->mlp = NULL; /* actually set in read_po_file, below */
+ this->comment = NULL;
+ this->comment_dot = NULL;
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+ this->filepos_count = 0;
+ this->filepos = NULL;
+}
+
+
+static void
+extract_directive_domain (that, name)
+ po_ty *that;
+ char *name;
+{
+ po_gram_error (_("this file may not contain domain directives"));
+}
+
+
+static void
+extract_directive_message (that, msgid, msgid_pos, msgstr, msgstr_pos)
+ po_ty *that;
+ char *msgid;
+ lex_pos_ty *msgid_pos;
+ char *msgstr;
+ lex_pos_ty *msgstr_pos;
+{
+ extract_class_ty *this = (extract_class_ty *)that;
+ message_ty *mp;
+ message_variant_ty *mvp;
+ size_t j;
+
+ /* If the msgid is the empty string, and we are omiting headers, throw
+ it away. */
+ if (omit_header && *msgid == '\0')
+ {
+ free (msgid);
+ free (msgstr);
+ if (this->comment != NULL)
+ string_list_free (this->comment);
+ if (this->comment_dot != NULL)
+ string_list_free (this->comment_dot);
+ if (this->filepos != NULL)
+ free (this->filepos);
+ this->comment = NULL;
+ this->comment_dot = NULL;
+ this->filepos_count = 0;
+ this->filepos = NULL;
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+ return;
+ }
+
+ /* See if this message ID has been seen before. */
+ mp = message_list_search (this->mlp, msgid);
+ if (mp)
+ free (msgid);
+ else
+ {
+ mp = message_alloc (msgid);
+ message_list_append (this->mlp, mp);
+ }
+
+ /* The ``obsolete'' flag is cleared before reading each PO file.
+ If thisflag is clear, set it, and increment the ``used'' counter.
+ This allows us to count how many of the PO files use the message. */
+ if (mp->obsolete == 0)
+ {
+ mp->obsolete = 1;
+ mp->used++;
+ }
+
+ /* Add the accumulated comments to the message. Clear the
+ accumulation in preparation for the next message. */
+ if (this->comment != NULL)
+ {
+ if (mp->comment == NULL)
+ for (j = 0; j < this->comment->nitems; ++j)
+ message_comment_append (mp, this->comment->item[j]);
+ string_list_free (this->comment);
+ this->comment = NULL;
+ }
+ if (this->comment_dot != NULL)
+ {
+ if (mp->comment_dot == NULL)
+ for (j = 0; j < this->comment_dot->nitems; ++j)
+ message_comment_dot_append (mp, this->comment_dot->item[j]);
+ string_list_free (this->comment_dot);
+ this->comment_dot = NULL;
+ }
+ mp->is_fuzzy |= this->is_fuzzy;
+ if (mp->is_c_format == undecided)
+ mp->is_c_format = this->is_c_format;
+ if (mp->do_wrap == undecided)
+ mp->do_wrap = this->do_wrap;
+ for (j = 0; j < this->filepos_count; ++j)
+ {
+ lex_pos_ty *pp;
+
+ pp = &this->filepos[j];
+ message_comment_filepos (mp, pp->file_name, pp->line_number);
+ free (pp->file_name);
+ }
+ if (this->filepos != NULL)
+ free (this->filepos);
+ this->filepos_count = 0;
+ this->filepos = NULL;
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+
+ /* See if this domain has been seen for this message ID. */
+ mvp = message_variant_search (mp, MESSAGE_DOMAIN_DEFAULT);
+ if (mvp != NULL)
+ free (msgstr);
+ else
+ message_variant_append (mp, MESSAGE_DOMAIN_DEFAULT, msgstr, msgstr_pos);
+}
+
+
+static void
+extract_parse_brief (that)
+ po_ty *that;
+{
+ po_lex_pass_comments (1);
+}
+
+
+static void
+extract_comment (that, s)
+ po_ty *that;
+ const char *s;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+
+ if (this->comment == NULL)
+ this->comment = string_list_alloc ();
+ string_list_append (this->comment, s);
+}
+
+
+static void
+extract_comment_dot (that, s)
+ po_ty *that;
+ const char *s;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+
+ if (this->comment_dot == NULL)
+ this->comment_dot = string_list_alloc ();
+ string_list_append (this->comment_dot, s);
+}
+
+
+static void
+extract_comment_filepos (that, name, line)
+ po_ty *that;
+ const char *name;
+ int line;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+ size_t nbytes;
+ lex_pos_ty *pp;
+
+ /* Write line numbers only if -n option is given. */
+ if (line_comment != 0)
+ {
+ nbytes = (this->filepos_count + 1) * sizeof (this->filepos[0]);
+ this->filepos = xrealloc (this->filepos, nbytes);
+ pp = &this->filepos[this->filepos_count++];
+ pp->file_name = xstrdup (name);
+ pp->line_number = line;
+ }
+}
+
+
+static void
+extract_comment_special (that, s)
+ po_ty *that;
+ const char *s;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+
+ if (strstr (s, "fuzzy") != NULL)
+ this->is_fuzzy = 1;
+ if (strstr (s, "c-format") != NULL)
+ this->is_c_format = yes;
+ if (strstr (s, "no-c-format") != NULL)
+ this->is_c_format = no;
+ if (strstr (s, "wrap") != NULL)
+ this->do_wrap = yes;
+ if (strstr (s, "no-wrap") != NULL)
+ this->do_wrap = no;
+}
+
+
+/* So that the one parser can be used for multiple programs, and also
+ use good data hiding and encapsulation practices, an object
+ oriented approach has been taken. An object instance is allocated,
+ and all actions resulting from the parse will be through
+ invocations of method functions of that object. */
+
+static po_method_ty extract_methods =
+{
+ sizeof (extract_class_ty),
+ extract_constructor,
+ NULL, /* destructor */
+ extract_directive_domain,
+ extract_directive_message,
+ extract_parse_brief,
+ NULL, /* parse_debrief */
+ extract_comment,
+ extract_comment_dot,
+ extract_comment_filepos,
+ extract_comment_special
+};
+
+
+/* Read the contents of the specified .po file into a message list. */
+
+static void
+read_po_file (file_name, mlp)
+ const char *file_name;
+ message_list_ty *mlp;
+{
+ size_t j;
+
+ po_ty *pop = po_alloc (&extract_methods);
+ ((extract_class_ty *) pop)->mlp = mlp;
+ po_scan (pop, file_name);
+ po_free (pop);
+
+ /* The ``obsolete'' flag of each message is cleared before reading
+ each PO file. As each message is read from a PO file, if this flag
+ is clear, it is set, and increment the ``used'' counter. This
+ allows us to count how many of the PO files use each message. */
+ for (j = 0; j < mlp->nitems; ++j)
+ mlp->item[j]->obsolete = 0;
+}
diff --git a/src/msgfmt.c b/src/msgfmt.c
new file mode 100644
index 0000000..6230ebe
--- /dev/null
+++ b/src/msgfmt.c
@@ -0,0 +1,973 @@
+/* Converts Uniforum style .po files to binary .mo files
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <sys/param.h>
+#include <sys/types.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#include "hash.h"
+
+#include "dir-list.h"
+#include "error.h"
+#include "getline.h"
+#include "printf.h"
+#include <system.h>
+
+#include "gettext.h"
+#include "domain.h"
+#include "hash-string.h"
+#include <libintl.h>
+#include "message.h"
+#include "po.h"
+
+#define _(str) gettext (str)
+
+#ifndef errno
+extern int errno;
+#endif
+
+/* Define the data structure which we need to represent the data to
+ be written out. */
+struct id_str_pair
+{
+ char *id;
+ char *str;
+};
+
+/* Contains information about the definition of one translation. */
+struct msgstr_def
+{
+ char *msgstr;
+ lex_pos_ty pos;
+};
+
+/* This structure defines a derived class of the po_ty class. (See
+ po.h for an explanation.) */
+typedef struct msgfmt_class_ty msgfmt_class_ty;
+struct msgfmt_class_ty
+{
+ /* inherited instance variables, etc */
+ PO_BASE_TY
+
+ int is_fuzzy;
+ enum is_c_format is_c_format;
+ enum is_c_format do_wrap;
+
+ int has_header_entry;
+};
+
+/* Alignment of strings in resulting .mo file. */
+static size_t alignment;
+
+/* Contains exit status for case in which no premature exit occurs. */
+static int exit_status;
+
+/* If nonzero include even fuzzy translations in output file. */
+static int include_all;
+
+/* Nonzero if no hash table in .mo is wanted. */
+static int no_hash_table;
+
+/* Specifies name of the output file. */
+static const char *output_file_name;
+
+/* String containing name the program is called with. */
+const char *program_name;
+
+/* We may have more than one input file. Domains with same names in
+ different files have to merged. So we need a list of tables for
+ each output file. */
+static struct msg_domain *domain;
+static struct msg_domain *current_domain;
+
+/* If not zero list duplicate message identifiers. */
+static int verbose_level;
+
+/* If not zero check strings according to format string rules for the
+ language. */
+static int do_check;
+
+/* Counters for statistics on translations for the processed files. */
+static int msgs_translated;
+static int msgs_untranslated;
+static int msgs_fuzzy;
+
+/* If not zero print statistics about translation at the end. */
+static int do_statistics;
+
+/* Long options. */
+static const struct option long_options[] =
+{
+ { "alignment", required_argument, NULL, 'a' },
+ { "check", no_argument, &do_check, 1 },
+ { "directory", required_argument, NULL, 'D' },
+ { "help", no_argument, NULL, 'h' },
+ { "no-hash", no_argument, &no_hash_table, 1 },
+ { "output-file", required_argument, NULL, 'o' },
+ { "statistics", no_argument, &do_statistics, 1 },
+ { "strict", no_argument, NULL, 'S' },
+ { "use-fuzzy", no_argument, NULL, 'f' },
+ { "verbose", no_argument, NULL, 'v' },
+ { "version", no_argument, NULL, 'V' },
+ { NULL, 0, NULL, 0 }
+};
+
+
+#ifndef roundup
+# if defined __GNUC__ && __GNUC__ >= 2
+# define roundup(x, y) ({typeof(x) _x = (x); typeof(y) _y = (y); \
+ ((_x + _y - 1) / _y) * _y; })
+# else
+# define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
+# endif /* GNU CC2 */
+#endif /* roundup */
+
+/* Prototypes for local functions. */
+static void usage PARAMS ((int status))
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+ __attribute__ ((noreturn))
+#endif
+;
+static void error_print PARAMS ((void));
+static void grammar PARAMS ((char *__filename));
+static void format_constructor PARAMS ((po_ty *__that));
+static void format_directive_domain PARAMS ((po_ty *__pop, char *__name));
+static void format_directive_message PARAMS ((po_ty *__pop, char *__msgid,
+ lex_pos_ty *__msgid_pos,
+ char *__msgstr,
+ lex_pos_ty *__msgstr_pos));
+static void format_comment_special PARAMS ((po_ty *pop, const char *s));
+static void format_debrief PARAMS((po_ty *));
+static struct msg_domain *new_domain PARAMS ((const char *name));
+static int compare_id PARAMS ((const void *pval1, const void *pval2));
+static void write_table PARAMS ((FILE *output_file, hash_table *tab));
+static void check_pair PARAMS ((const char *msgid, const lex_pos_ty *msgid_pos,
+ const char *msgstr,
+ const lex_pos_ty *msgstr_pos, int is_format));
+static const char *add_mo_suffix PARAMS ((const char *));
+
+
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int opt;
+ int do_help = 0;
+ int do_version = 0;
+ int strict_uniforum = 0;
+
+ /* Set default value for global variables. */
+ alignment = DEFAULT_OUTPUT_ALIGNMENT;
+
+ /* Set program name for messages. */
+ program_name = argv[0];
+ error_print_progname = error_print;
+ error_one_per_line = 1;
+ exit_status = EXIT_SUCCESS;
+
+#ifdef HAVE_SETLOCALE
+ /* Set locale via LC_ALL. */
+ setlocale (LC_ALL, "");
+#endif
+
+ /* Set the text message domain. */
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ while ((opt = getopt_long (argc, argv, "a:cD:fho:vV", long_options, NULL))
+ != EOF)
+ switch (opt)
+ {
+ case '\0': /* Long option. */
+ break;
+ case 'a':
+ {
+ char *endp;
+ size_t new_align = strtoul (optarg, &endp, 0);
+
+ if (endp != optarg)
+ alignment = new_align;
+ }
+ break;
+ case 'c':
+ do_check = 1;
+ break;
+ case 'D':
+ dir_list_append (optarg);
+ break;
+ case 'f':
+ include_all = 1;
+ break;
+ case 'h':
+ do_help = 1;
+ break;
+ case 'o':
+ output_file_name = optarg;
+ break;
+ case 'S':
+ strict_uniforum = 1;
+ break;
+ case 'v':
+ ++verbose_level;
+ break;
+ case 'V':
+ do_version = 1;
+ break;
+ default:
+ usage (EXIT_FAILURE);
+ break;
+ }
+
+ /* Version information is requested. */
+ if (do_version)
+ {
+ printf ("%s (GNU %s) %s\n", basename (program_name), PACKAGE, VERSION);
+ /* xgettext: no-wrap */
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"),
+ "1995, 1996, 1997, 1998");
+ printf (_("Written by %s.\n"), "Ulrich Drepper");
+ exit (EXIT_SUCCESS);
+ }
+
+ /* Help is requested. */
+ if (do_help)
+ usage (EXIT_SUCCESS);
+
+ /* Test whether we have a .po file name as argument. */
+ if (optind >= argc)
+ {
+ error (EXIT_SUCCESS, 0, _("no input file given"));
+ usage (EXIT_FAILURE);
+ }
+
+ /* The -o option determines the name of the domain and therefor
+ the output file. */
+ if (output_file_name != NULL)
+ current_domain = new_domain (output_file_name);
+
+ /* Prepare PO file reader. We need to see the comments because inexact
+ translations must be reported. */
+ po_lex_pass_comments (1);
+
+ /* Now write out all domains. */
+ /* Process all given .po files. */
+ while (argc > optind)
+ {
+ /* Remember that we currently have not specified any domain. This
+ is of course not true when we saw the -o option. */
+ if (output_file_name == NULL)
+ current_domain = NULL;
+
+ /* And process the input file. */
+ grammar (argv[optind]);
+
+ ++optind;
+ }
+
+ while (domain != NULL)
+ {
+ FILE *output_file;
+
+ /* If no entry for this domain don't even create the file. */
+ if (domain->symbol_tab.filled != 0)
+ {
+ if (strcmp (domain->domain_name, "-") == 0)
+ output_file = stdout;
+ else
+ {
+ const char *fname;
+
+ fname = strict_uniforum ? add_mo_suffix (domain->domain_name)
+ : domain->domain_name;
+
+ output_file = fopen (fname, "w");
+ if (output_file == NULL)
+ {
+ error (0, errno,
+ _("error while opening \"%s\" for writing"), fname);
+ exit_status = EXIT_FAILURE;
+ }
+
+ if (strict_uniforum)
+ free ((void *) fname);
+ }
+
+ if (output_file != NULL)
+ {
+ write_table (output_file, &domain->symbol_tab);
+ if (output_file != stdout)
+ fclose (output_file);
+ }
+ }
+
+ domain = domain->next;
+ }
+
+ /* Print statistics if requested. */
+ if (verbose_level > 0 || do_statistics)
+ {
+ fprintf (stderr, _("%d translated messages"), msgs_translated);
+ if (msgs_fuzzy > 0)
+ fprintf (stderr, _(", %d fuzzy translations"), msgs_fuzzy);
+ if (msgs_untranslated > 0)
+ fprintf (stderr, _(", %d untranslated messages"), msgs_untranslated);
+ fputs (".\n", stderr);
+ }
+
+ exit (exit_status);
+}
+
+
+/* Display usage information and exit. */
+static void
+usage (status)
+ int status;
+{
+ if (status != EXIT_SUCCESS)
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
+ program_name);
+ else
+ {
+ /* xgettext: no-wrap */
+ printf (_("\
+Usage: %s [OPTION] filename.po ...\n\
+Generate binary message catalog from textual translation description.\n\
+\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n\
+ -c, --check perform language dependent checks on strings\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -f, --use-fuzzy use fuzzy entries in output\n\
+ -h, --help display this help and exit\n\
+ --no-hash binary file will not include the hash table\n\
+ -o, --output-file=FILE specify output file name as FILE\n\
+ --statistics print statistics about translations\n\
+ --strict enable strict Uniforum mode\n\
+ -v, --verbose list input file anomalies\n\
+ -V, --version output version information and exit\n\
+\n\
+Giving the -v option more than once increases the verbosity level.\n\
+\n\
+If input file is -, standard input is read. If output file is -,\n\
+output is written to standard output.\n"),
+ program_name, DEFAULT_OUTPUT_ALIGNMENT);
+ fputs (_("Report bugs to <bug-gnu-utils@gnu.org>.\n"), stdout);
+ }
+
+ exit (status);
+}
+
+
+static struct msg_domain *
+new_domain (name)
+ const char *name;
+{
+ struct msg_domain **p_dom = &domain;
+
+ while (*p_dom != NULL && strcmp (name, (*p_dom)->domain_name) != 0)
+ p_dom = &(*p_dom)->next;
+
+ if (*p_dom == NULL)
+ {
+ *p_dom = (struct msg_domain *) xmalloc (sizeof (**p_dom));
+
+ if (init_hash (&(*p_dom)->symbol_tab, 100) != 0)
+ error (EXIT_FAILURE, errno, _("while creating hash table"));
+ (*p_dom)->domain_name = name;
+ (*p_dom)->next = NULL;
+ }
+
+ return *p_dom;
+}
+
+
+/* The address of this function will be assigned to the hook in the error
+ functions. */
+static void
+error_print ()
+{
+ /* We don't want the program name to be printed in messages. Emacs'
+ compile.el does not like this. */
+}
+
+
+/* Prepare for first message. */
+static void
+format_constructor (that)
+ po_ty *that;
+{
+ msgfmt_class_ty *this = (msgfmt_class_ty *) that;
+
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+ this->has_header_entry = 0;
+}
+
+
+/* Some checks after whole file is read. */
+static void
+format_debrief (that)
+ po_ty *that;
+{
+ msgfmt_class_ty *this = (msgfmt_class_ty *) that;
+
+ /* If in verbose mode, test whether header entry was found. */
+ if (verbose_level > 0 && this->has_header_entry == 0)
+ error (0, 0, _("%s: warning: PO file header missing, fuzzy, or invalid"),
+ gram_pos.file_name);
+}
+
+
+/* Process `domain' directive from .po file. */
+static void
+format_directive_domain (pop, name)
+ po_ty *pop;
+ char *name;
+{
+ /* If no output file was given, we change it with each `domain'
+ directive. */
+ if (output_file_name == NULL)
+ {
+ size_t correct;
+
+ correct = strcspn (name, INVALID_PATH_CHAR);
+ if (name[correct] != '\0')
+ {
+ exit_status = EXIT_FAILURE;
+ if (correct == 0)
+ {
+ error (0, 0, _("\
+domain name \"%s\" not suitable as file name"), name);
+ return;
+ }
+ else
+ error (0, 0, _("\
+domain name \"%s\" not suitable as file name: will use prefix"), name);
+ name[correct] = '\0';
+ }
+
+ /* Set new domain. */
+ current_domain = new_domain (name);
+ }
+ else
+ {
+ if (verbose_level > 0)
+ /* We don't change the exit status here because this is really
+ only an information. */
+ error (0, 0, _("`domain %s' directive ignored"), name);
+
+ /* NAME was allocated in po-gram.y but is not used anywhere. */
+ free (name);
+ }
+}
+
+
+/* Process `msgid'/`msgstr' pair from .po file. */
+static void
+format_directive_message (that, msgid_string, msgid_pos, msgstr_string,
+ msgstr_pos)
+ po_ty *that;
+ char *msgid_string;
+ lex_pos_ty *msgid_pos;
+ char *msgstr_string;
+ lex_pos_ty *msgstr_pos;
+{
+ msgfmt_class_ty *this = (msgfmt_class_ty *) that;
+ struct msgstr_def *entry;
+
+ if (msgstr_string[0] == '\0' || (!include_all && this->is_fuzzy))
+ {
+ if (verbose_level > 1)
+ /* We don't change the exit status here because this is really
+ only an information. */
+ error_at_line (0, 0, msgstr_pos->file_name, msgstr_pos->line_number,
+ (msgstr_string[0] == '\0'
+ ? _("empty `msgstr' entry ignored")
+ : _("fuzzy `msgstr' entry ignored")));
+
+ /* Free strings allocated in po-gram.y. */
+ free (msgstr_string);
+
+ /* Increment counter for fuzzy/untranslated messages. */
+ if (this->is_fuzzy)
+ ++msgs_fuzzy;
+ else
+ ++msgs_untranslated;
+
+ goto prepare_next;
+ }
+
+ /* Test for header entry. */
+ if (msgid_string[0] == '\0')
+ {
+ this->has_header_entry = 1;
+
+ /* Do some more tests on test contents of the header entry. */
+ if (verbose_level > 0)
+ {
+ static const char *required_fields[] =
+ {
+ "Project-Id-Version", "PO-Revision-Date",
+ "Last-Translator", "Language-Team", "MIME-Version",
+ "Content-Type", "Content-Transfer-Encoding"
+ };
+ static const char *default_values[] =
+ {
+ "PACKAGE VERSION", "YEAR-MO-DA", "FULL NAME", "LANGUAGE",
+ NULL, "text/plain; charset=CHARSET", "ENCODING"
+ };
+ const size_t nfields = (sizeof (required_fields)
+ / sizeof (required_fields[0]));
+ int initial = -1;
+ int cnt;
+
+ for (cnt = 0; cnt < nfields; ++cnt)
+ {
+ char *endp = strstr (msgstr_string, required_fields[cnt]);
+
+ if (endp == NULL)
+ error (0, 0, _("headerfield `%s' missing in header"),
+ required_fields[cnt]);
+ else if (endp != msgstr_string && endp[-1] != '\n')
+ error (0, 0, _("\
+header field `%s' should start at beginning of line"),
+ required_fields[cnt]);
+ else if (default_values[cnt] != NULL
+ && strncmp (default_values[cnt],
+ endp + strlen (required_fields[cnt]) + 2,
+ strlen (default_values[cnt])) == 0)
+ {
+ if (initial != -1)
+ {
+ error (0, 0, _("\
+some header fields still have the initial default value"));
+ initial = -1;
+ break;
+ }
+ else
+ initial = cnt;
+ }
+ }
+
+ if (initial != -1)
+ error (0, 0, _("field `%s' still has initial default value"),
+ required_fields[initial]);
+ }
+ }
+ else
+ /* We don't count the header entry in the statistic so place the
+ counter incrementation here. */
+ if (this->is_fuzzy)
+ ++msgs_fuzzy;
+ else
+ ++msgs_translated;
+
+ /* We found a valid pair of msgid/msgstr.
+ Construct struct to describe msgstr definition. */
+ entry = (struct msgstr_def *) xmalloc (sizeof (*entry));
+
+ entry->msgstr = msgstr_string;
+ entry->pos = *msgstr_pos;
+
+ /* Do some more checks on both strings. */
+ check_pair (msgid_string, msgid_pos, msgstr_string, msgstr_pos,
+ do_check && possible_c_format_p (this->is_c_format));
+
+ /* Check whether already a domain is specified. If not use default
+ domain. */
+ if (current_domain == NULL)
+ current_domain = new_domain ("messages");
+
+ /* We insert the ID/string pair into the hashing table. But we have
+ to take care for dublicates. */
+ if (insert_entry (&current_domain->symbol_tab, msgid_string,
+ strlen (msgid_string), entry))
+ {
+ /* We don't need the just constructed entry. */
+ free (entry);
+
+ if (verbose_level > 0)
+ {
+ /* We give a fatal error about this, but only if the
+ translations are different. Tell the user the old
+ definition for reference. */
+ find_entry (&current_domain->symbol_tab, msgid_string,
+ strlen (msgid_string), (void **) &entry);
+ if (0 != strcmp(msgstr_string, entry->msgstr))
+ {
+ gram_error_at_line (msgid_pos, _("duplicate message definition"));
+ gram_error_at_line (&entry->pos, _("\
+...this is the location of the first definition"));
+
+ /* FIXME Should this be always a reason for an exit status != 0? */
+ exit_status = EXIT_FAILURE;
+ }
+ }
+
+ /* We don't need the just constructed entries'
+ parameter string (allocated in po-gram.y). */
+ free (msgstr_string);
+ }
+
+prepare_next:
+ /* We do not need the msgid string in any case. */
+ free (msgid_string);
+
+ /* Prepare for next message. */
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+}
+
+
+/* Test for `#, fuzzy' comments and warn. */
+static void
+format_comment_special (that, s)
+ po_ty *that;
+ const char *s;
+{
+ msgfmt_class_ty *this = (msgfmt_class_ty *) that;
+
+ if (strstr (s, "fuzzy") != NULL)
+ {
+ static int warned = 0;
+
+ if (!include_all && verbose_level > 1 && warned == 0)
+ {
+ warned = 1;
+ error (0, 0, _("\
+%s: warning: source file contains fuzzy translation"),
+ gram_pos.file_name);
+ }
+
+ this->is_fuzzy = 1;
+ }
+ this->is_c_format = parse_c_format_description_string (s);
+ this->do_wrap = parse_c_width_description_string (s);
+}
+
+
+static int
+compare_id (pval1, pval2)
+ const void *pval1;
+ const void *pval2;
+{
+ return strcmp (((struct id_str_pair *) pval1)->id,
+ ((struct id_str_pair *) pval2)->id);
+}
+
+
+static void
+write_table (output_file, tab)
+ FILE *output_file;
+ hash_table *tab;
+{
+ static char null = '\0';
+ /* This should be explained:
+ Each string has an associate hashing value V, computed by a fixed
+ function. To locate the string we use open addressing with double
+ hashing. The first index will be V % M, where M is the size of the
+ hashing table. If no entry is found, iterating with a second,
+ independent hashing function takes place. This second value will
+ be 1 + V % (M - 2).
+ The approximate number of probes will be
+
+ for unsuccessful search: (1 - N / M) ^ -1
+ for successful search: - (N / M) ^ -1 * ln (1 - N / M)
+
+ where N is the number of keys.
+
+ If we now choose M to be the next prime bigger than 4 / 3 * N,
+ we get the values
+ 4 and 1.85 resp.
+ Because unsuccesful searches are unlikely this is a good value.
+ Formulas: [Knuth, The Art of Computer Programming, Volume 3,
+ Sorting and Searching, 1973, Addison Wesley] */
+ nls_uint32 hash_tab_size = no_hash_table ? 0
+ : next_prime ((tab->filled * 4)
+ / 3);
+ nls_uint32 *hash_tab;
+
+ /* Header of the .mo file to be written. */
+ struct mo_file_header header;
+ struct id_str_pair *msg_arr;
+ void *ptr;
+ size_t cnt;
+ char *id;
+ struct msgstr_def *entry;
+ struct string_desc sd;
+
+ /* Fill the structure describing the header. */
+ header.magic = _MAGIC; /* Magic number. */
+ header.revision = MO_REVISION_NUMBER; /* Revision number of file format. */
+ header.nstrings = tab->filled; /* Number of strings. */
+ header.orig_tab_offset = sizeof (header);
+ /* Offset of table for original string offsets. */
+ header.trans_tab_offset = sizeof (header)
+ + tab->filled * sizeof (struct string_desc);
+ /* Offset of table for translation string offsets. */
+ header.hash_tab_size = hash_tab_size; /* Size of used hashing table. */
+ header.hash_tab_offset =
+ no_hash_table ? 0 : sizeof (header)
+ + 2 * (tab->filled * sizeof (struct string_desc));
+ /* Offset of hashing table. */
+
+ /* Write the header out. */
+ fwrite (&header, sizeof (header), 1, output_file);
+
+ /* Allocate table for the all elements of the hashing table. */
+ msg_arr = (struct id_str_pair *) alloca (tab->filled * sizeof (msg_arr[0]));
+
+ /* Read values from hashing table into array. */
+ for (cnt = 0, ptr = NULL;
+ iterate_table (tab, &ptr, (const void **) &id, (void **) &entry) >= 0;
+ ++cnt)
+ {
+ msg_arr[cnt].id = id;
+ msg_arr[cnt].str = entry->msgstr;
+ }
+
+ /* Sort the table according to original string. */
+ qsort (msg_arr, tab->filled, sizeof (msg_arr[0]), compare_id);
+
+ /* Set offset to first byte after all the tables. */
+ sd.offset = roundup (sizeof (header)
+ + tab->filled * sizeof (sd)
+ + tab->filled * sizeof (sd)
+ + hash_tab_size * sizeof (nls_uint32),
+ alignment);
+
+ /* Write out length and starting offset for all original strings. */
+ for (cnt = 0; cnt < tab->filled; ++cnt)
+ {
+ sd.length = strlen (msg_arr[cnt].id);
+ fwrite (&sd, sizeof (sd), 1, output_file);
+ sd.offset += roundup (sd.length + 1, alignment);
+ }
+
+ /* Write out length and starting offset for all translation strings. */
+ for (cnt = 0; cnt < tab->filled; ++cnt)
+ {
+ sd.length = strlen (msg_arr[cnt].str);
+ fwrite (&sd, sizeof (sd), 1, output_file);
+ sd.offset += roundup (sd.length + 1, alignment);
+ }
+
+ /* Skip this part when no hash table is needed. */
+ if (!no_hash_table)
+ {
+ /* Allocate room for the hashing table to be written out. */
+ hash_tab = (nls_uint32 *) alloca (hash_tab_size * sizeof (nls_uint32));
+ memset (hash_tab, '\0', hash_tab_size * sizeof (nls_uint32));
+
+ /* Insert all value in the hash table, following the algorithm described
+ above. */
+ for (cnt = 0; cnt < tab->filled; ++cnt)
+ {
+ nls_uint32 hash_val = hash_string (msg_arr[cnt].id);
+ nls_uint32 idx = hash_val % hash_tab_size;
+
+ if (hash_tab[idx] != 0)
+ {
+ /* We need the second hashing function. */
+ nls_uint32 c = 1 + (hash_val % (hash_tab_size - 2));
+
+ do
+ if (idx >= hash_tab_size - c)
+ idx -= hash_tab_size - c;
+ else
+ idx += c;
+ while (hash_tab[idx] != 0);
+ }
+
+ hash_tab[idx] = cnt + 1;
+ }
+
+ /* Write the hash table out. */
+ fwrite (hash_tab, sizeof (nls_uint32), hash_tab_size, output_file);
+ }
+
+ /* Write bytes to make first string to be aligned. */
+ cnt = sizeof (header) + 2 * tab->filled * sizeof (sd)
+ + hash_tab_size * sizeof (nls_uint32);
+ fwrite (&null, 1, roundup (cnt, alignment) - cnt, output_file);
+
+ /* Now write the original strings. */
+ for (cnt = 0; cnt < tab->filled; ++cnt)
+ {
+ size_t len = strlen (msg_arr[cnt].id);
+
+ fwrite (msg_arr[cnt].id, len + 1, 1, output_file);
+ fwrite (&null, 1, roundup (len + 1, alignment) - (len + 1), output_file);
+ }
+
+ /* Now write the translation strings. */
+ for (cnt = 0; cnt < tab->filled; ++cnt)
+ {
+ size_t len = strlen (msg_arr[cnt].str);
+
+ fwrite (msg_arr[cnt].str, len + 1, 1, output_file);
+ fwrite (&null, 1, roundup (len + 1, alignment) - (len + 1), output_file);
+
+ free (msg_arr[cnt].str);
+ }
+
+ /* Hashing table is not used anmore. */
+ delete_hash (tab);
+}
+
+
+static void
+check_pair (msgid, msgid_pos, msgstr, msgstr_pos, is_format)
+ const char *msgid;
+ const lex_pos_ty *msgid_pos;
+ const char *msgstr;
+ const lex_pos_ty *msgstr_pos;
+ int is_format;
+{
+ size_t msgid_len = strlen (msgid);
+ size_t msgstr_len = strlen (msgstr);
+ size_t nidfmts, nstrfmts;
+
+ /* If the msgid string is empty we have the special entry reserved for
+ information about the translation. */
+ if (msgid_len == 0)
+ return;
+
+ /* Test 1: check whether both or none of the strings begin with a '\n'. */
+ if (((msgid[0] == '\n') ^ (msgstr[0] == '\n')) != 0)
+ {
+ error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\
+`msgid' and `msgstr' entries do not both begin with '\\n'"));
+ exit_status = EXIT_FAILURE;
+ }
+
+ /* Test 2: check whether both or none of the strings end with a '\n'. */
+ if (((msgid[msgid_len - 1] == '\n') ^ (msgstr[msgstr_len - 1] == '\n')) != 0)
+ {
+ error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\
+`msgid' and `msgstr' entries do not both end with '\\n'"));
+ exit_status = EXIT_FAILURE;
+ }
+
+ if (is_format != 0)
+ {
+ /* Test 3: check whether both formats strings contain the same
+ number of format specifications. */
+ nidfmts = parse_printf_format (msgid, 0, NULL);
+ nstrfmts = parse_printf_format (msgstr, 0, NULL);
+ if (nidfmts != nstrfmts)
+ {
+ error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number,
+ _("\
+number of format specifications in `msgid' and `msgstr' does not match"));
+ exit_status = EXIT_FAILURE;
+ }
+ else
+ {
+ int *id_args = (int *) alloca (nidfmts * sizeof (int));
+ int *str_args = (int *) alloca (nstrfmts * sizeof (int));
+ size_t cnt;
+
+ (void) parse_printf_format (msgid, nidfmts, id_args);
+ (void) parse_printf_format (msgstr, nstrfmts, str_args);
+
+ for (cnt = 0; cnt < nidfmts; ++cnt)
+ if (id_args[cnt] != str_args[cnt])
+ {
+ error_at_line (0, 0, msgid_pos->file_name,
+ msgid_pos->line_number, _("\
+format specifications for argument %u are not the same"), cnt);
+ exit_status = EXIT_FAILURE;
+ }
+ }
+ }
+}
+
+
+/* So that the one parser can be used for multiple programs, and also
+ use good data hiding and encapsulation practices, an object
+ oriented approach has been taken. An object instance is allocated,
+ and all actions resulting from the parse will be through
+ invokations of method functions of that object. */
+
+static po_method_ty format_methods =
+{
+ sizeof (msgfmt_class_ty),
+ format_constructor, /* constructor */
+ NULL, /* destructor */
+ format_directive_domain,
+ format_directive_message,
+ NULL, /* parse_brief */
+ format_debrief, /* parse_debrief */
+ NULL, /* comment */
+ NULL, /* comment_dot */
+ NULL, /* comment_filepos */
+ format_comment_special /* comment */
+};
+
+
+/* Read .po file FILENAME and store translation pairs. */
+static void
+grammar (filename)
+ char *filename;
+{
+ po_ty *pop;
+
+ pop = po_alloc (&format_methods);
+ po_scan (pop, filename);
+ po_free (pop);
+}
+
+
+static const char *
+add_mo_suffix (fname)
+ const char *fname;
+{
+ size_t len;
+ char *result;
+
+ len = strlen (fname);
+ if (len > 3 && memcmp (fname + len - 3, ".mo", 3) == 0)
+ return xstrdup (fname);
+ if (len > 4 && memcmp (fname + len - 4, ".gmo", 4) == 0)
+ return xstrdup (fname);
+ result = (char *) xmalloc (len + 4);
+ stpcpy (stpcpy (result, fname), ".mo");
+ return result;
+}
diff --git a/src/msgmerge.c b/src/msgmerge.c
new file mode 100644
index 0000000..27481d9
--- /dev/null
+++ b/src/msgmerge.c
@@ -0,0 +1,813 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <getopt.h>
+#include <limits.h>
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#include "dir-list.h"
+#include "error.h"
+#include "message.h"
+#include <system.h>
+#include <libintl.h>
+#include "po.h"
+
+#define _(str) gettext (str)
+
+
+/* This structure defines a derived class of the po_ty class. (See
+ po.h for an explanation.) */
+typedef struct merge_class_ty merge_class_ty;
+struct merge_class_ty
+{
+ /* inherited instance variables, etc */
+ PO_BASE_TY
+
+ /* Name of domain we are currently examining. */
+ char *domain;
+
+ /* List of domains already appeared in the current file. */
+ string_list_ty *domain_list;
+
+ /* List of messages already appeared in the current file. */
+ message_list_ty *mlp;
+
+ /* Accumulate comments for next message directive */
+ string_list_ty *comment;
+ string_list_ty *comment_dot;
+
+ /* Flags transported in special comments. */
+ int is_fuzzy;
+ enum is_c_format is_c_format;
+ enum is_c_format do_wrap;
+
+ /* Accumulate filepos comments for the next message directive. */
+ size_t filepos_count;
+ lex_pos_ty *filepos;
+};
+
+
+/* String containing name the program is called with. */
+const char *program_name;
+
+/* If non-zero do not print unneeded messages. */
+static int quiet;
+
+/* Verbosity level. */
+static int verbosity_level;
+
+/* If nonzero, remember comments for file name and line number for each
+ msgid, if present in the reference input. Defaults to true. */
+static int line_comment = 1;
+
+/* Force output of PO file even if empty. */
+static int force_po;
+
+/* list of user-specified compendiums. */
+static message_list_list_ty *compendiums;
+
+/* Long options. */
+static const struct option long_options[] =
+{
+ { "add-location", no_argument, &line_comment, 1 },
+ { "compendium", required_argument, NULL, 'C', },
+ { "directory", required_argument, NULL, 'D' },
+ { "escape", no_argument, NULL, 'E' },
+ { "force-po", no_argument, &force_po, 1 },
+ { "help", no_argument, NULL, 'h' },
+ { "indent", no_argument, NULL, 'i' },
+ { "no-escape", no_argument, NULL, 'e' },
+ { "no-location", no_argument, &line_comment, 0 },
+ { "output-file", required_argument, NULL, 'o' },
+ { "quiet", no_argument, NULL, 'q' },
+ { "sort-by-file", no_argument, NULL, 'F' },
+ { "sort-output", no_argument, NULL, 's' },
+ { "silent", no_argument, NULL, 'q' },
+ { "strict", no_argument, NULL, 'S' },
+ { "verbose", no_argument, NULL, 'v' },
+ { "version", no_argument, NULL, 'V' },
+ { "width", required_argument, NULL, 'w', },
+ { NULL, 0, NULL, 0 }
+};
+
+
+/* Prototypes for local functions. */
+static void usage PARAMS ((int __status));
+static void error_print PARAMS ((void));
+static void merge_constructor PARAMS ((po_ty *__that));
+static void merge_destructor PARAMS ((po_ty *__that));
+static void merge_directive_domain PARAMS ((po_ty *__that, char *__name));
+static void merge_directive_message PARAMS ((po_ty *__that, char *__msgid,
+ lex_pos_ty *__msgid_pos,
+ char *__msgstr,
+ lex_pos_ty *__msgstr_pos));
+static void merge_parse_brief PARAMS ((po_ty *__that));
+static void merge_parse_debrief PARAMS ((po_ty *__that));
+static void merge_comment PARAMS ((po_ty *__that, const char *__s));
+static void merge_comment_dot PARAMS ((po_ty *__that, const char *__s));
+static void merge_comment_special PARAMS ((po_ty *__that, const char *__s));
+static void merge_comment_filepos PARAMS ((po_ty *__that, const char *__name,
+ int __line));
+static message_list_ty *grammar PARAMS ((const char *__filename));
+static message_list_ty *merge PARAMS ((const char *__fn1, const char *__fn2));
+static void compendium PARAMS ((const char *__filename));
+
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int opt;
+ int do_help;
+ int do_version;
+ char *output_file;
+ message_list_ty *result;
+ int sort_by_filepos = 0;
+ int sort_by_msgid = 0;
+
+ /* Set program name for messages. */
+ program_name = argv[0];
+ verbosity_level = 0;
+ quiet = 0;
+ error_print_progname = error_print;
+ gram_max_allowed_errors = INT_MAX;
+
+#ifdef HAVE_SETLOCALE
+ /* Set locale via LC_ALL. */
+ setlocale (LC_ALL, "");
+#endif
+
+ /* Set the text message domain. */
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ /* Set default values for variables. */
+ do_help = 0;
+ do_version = 0;
+ output_file = NULL;
+
+ while ((opt
+ = getopt_long (argc, argv, "C:D:eEFhio:qsvVw:", long_options, NULL))
+ != EOF)
+ switch (opt)
+ {
+ case '\0': /* Long option. */
+ break;
+
+ case 'C':
+ compendium (optarg);
+ break;
+
+ case 'D':
+ dir_list_append (optarg);
+ break;
+
+ case 'e':
+ message_print_style_escape (0);
+ break;
+
+ case 'E':
+ message_print_style_escape (1);
+ break;
+
+ case 'F':
+ sort_by_filepos = 1;
+ break;
+
+ case 'h':
+ do_help = 1;
+ break;
+
+ case 'i':
+ message_print_style_indent ();
+ break;
+
+ case 'o':
+ output_file = optarg;
+ break;
+
+ case 'q':
+ quiet = 1;
+ break;
+
+ case 's':
+ sort_by_msgid = 1;
+ break;
+
+ case 'S':
+ message_print_style_uniforum ();
+ break;
+
+ case 'v':
+ ++verbosity_level;
+ break;
+
+ case 'V':
+ do_version = 1;
+ break;
+
+ case 'w':
+ {
+ int value;
+ char *endp;
+ value = strtol (optarg, &endp, 10);
+ if (endp != optarg)
+ message_page_width_set (value);
+ }
+ break;
+
+ default:
+ usage (EXIT_FAILURE);
+ break;
+ }
+
+ /* Version information is requested. */
+ if (do_version)
+ {
+ printf ("%s (GNU %s) %s\n", basename (program_name), PACKAGE, VERSION);
+ /* xgettext: no-wrap */
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"),
+ "1995, 1996, 1997, 1998");
+ printf (_("Written by %s.\n"), "Peter Miller");
+ exit (EXIT_SUCCESS);
+ }
+
+ /* Help is requested. */
+ if (do_help)
+ usage (EXIT_SUCCESS);
+
+ /* Test whether we have an .po file name as argument. */
+ if (optind >= argc)
+ {
+ error (EXIT_SUCCESS, 0, _("no input files given"));
+ usage (EXIT_FAILURE);
+ }
+ if (optind + 2 != argc)
+ {
+ error (EXIT_SUCCESS, 0, _("exactly 2 input files required"));
+ usage (EXIT_FAILURE);
+ }
+
+ /* merge the two files */
+ result = merge (argv[optind], argv[optind + 1]);
+
+ /* Sort the results. */
+ if (sort_by_filepos)
+ message_list_sort_by_filepos (result);
+ else if (sort_by_msgid)
+ message_list_sort_by_msgid (result);
+
+ /* Write the merged message list out. */
+ message_list_print (result, output_file, force_po, 0);
+
+ exit (EXIT_SUCCESS);
+}
+
+
+static void
+compendium (filename)
+ const char *filename;
+{
+ message_list_ty *mlp;
+
+ mlp = grammar (filename);
+ if (!compendiums)
+ compendiums = message_list_list_alloc ();
+ message_list_list_append (compendiums, mlp);
+}
+
+
+/* Display usage information and exit. */
+static void
+usage (status)
+ int status;
+{
+ if (status != EXIT_SUCCESS)
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
+ program_name);
+ else
+ {
+ /* xgettext: no-wrap */
+ printf (_("\
+Usage: %s [OPTION] def.po ref.po\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -C, --compendium=FILE additional library of message translations,\n\
+ may be specified more than once\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -e, --no-escape do not use C escapes in output (default)\n\
+ -E, --escape use C escapes in output, no extended chars\n\
+ --force-po write PO file even if empty\n\
+ -h, --help display this help and exit\n\
+ -i, --indent indented output style\n\
+ -o, --output-file=FILE result will be written to FILE\n\
+ --no-location suppress '#: filename:line' lines\n\
+ --add-location preserve '#: filename:line' lines (default)\n\
+ --strict strict Uniforum output style\n\
+ -v, --verbose increase verbosity level\n\
+ -V, --version output version information and exit\n\
+ -w, --width=NUMBER set output page width\n"),
+ program_name);
+ /* xgettext: no-wrap */
+ fputs (_("\n\
+Merges two Uniforum style .po files together. The def.po file is an\n\
+existing PO file with the old translations which will be taken over to\n\
+the newly created file as long as they still match; comments will be\n\
+preserved, but extract comments and file positions will be discarded.\n\
+The ref.po file is the last created PO file (generally by xgettext), any\n\
+translations or comments in the file will be discarded, however dot\n\
+comments and file positions will be preserved. Where an exact match\n\
+cannot be found, fuzzy matching is used to produce better results. The\n\
+results are written to stdout unless an output file is specified.\n"), stdout);
+ fputs (_("Report bugs to <bug-gnu-utils@gnu.org>.\n"),
+ stdout);
+ }
+
+ exit (status);
+}
+
+
+/* The address of this function will be assigned to the hook in the
+ error functions. */
+static void
+error_print ()
+{
+ /* We don't want the program name to be printed in messages. Emacs'
+ compile.el does not like this. */
+
+ /* FIXME Why must this program toady to Emacs? Why can't compile.el
+ be enhanced to cope with a leading program name? --PMiller */
+}
+
+
+static void
+merge_constructor (that)
+ po_ty *that;
+{
+ merge_class_ty *this = (merge_class_ty *) that;
+
+ this->mlp = message_list_alloc ();
+ this->domain = MESSAGE_DOMAIN_DEFAULT;
+ this->domain_list = string_list_alloc ();
+ this->comment = NULL;
+ this->comment_dot = NULL;
+ this->filepos_count = 0;
+ this->filepos = NULL;
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+}
+
+
+static void
+merge_destructor (that)
+ po_ty *that;
+{
+ merge_class_ty *this = (merge_class_ty *) that;
+ size_t j;
+
+ string_list_free (this->domain_list);
+ /* Do not free this->mlp. */
+ if (this->comment != NULL)
+ string_list_free (this->comment);
+ if (this->comment_dot != NULL)
+ string_list_free (this->comment_dot);
+ for (j = 0; j < this->filepos_count; ++j)
+ free (this->filepos[j].file_name);
+ if (this->filepos != NULL)
+ free (this->filepos);
+}
+
+
+static void
+merge_directive_domain (that, name)
+ po_ty *that;
+ char *name;
+{
+ size_t j;
+
+ merge_class_ty *this = (merge_class_ty *) that;
+ /* Override current domain name. Don't free memory. */
+ this->domain = name;
+
+ /* If there are accumulated comments, throw them away, they are
+ probably part of the file header, or about the domain directive,
+ and will be unrelated to the next message. */
+ if (this->comment != NULL)
+ {
+ string_list_free (this->comment);
+ this->comment = NULL;
+ }
+ if (this->comment_dot != NULL)
+ {
+ string_list_free (this->comment_dot);
+ this->comment_dot = NULL;
+ }
+ for (j = 0; j < this->filepos_count; ++j)
+ free (this->filepos[j].file_name);
+ if (this->filepos != NULL)
+ free (this->filepos);
+ this->filepos_count = 0;
+ this->filepos = NULL;
+}
+
+
+static void
+merge_directive_message (that, msgid, msgid_pos, msgstr, msgstr_pos)
+ po_ty *that;
+ char *msgid;
+ lex_pos_ty *msgid_pos;
+ char *msgstr;
+ lex_pos_ty *msgstr_pos;
+{
+ merge_class_ty *this = (merge_class_ty *) that;
+ message_ty *mp;
+ message_variant_ty *mvp;
+ size_t j;
+
+ /* Remember the domain names for later. */
+ string_list_append_unique (this->domain_list, this->domain);
+
+ /* See if this message ID has been seen before. */
+ mp = message_list_search (this->mlp, msgid);
+ if (mp)
+ free (msgid);
+ else
+ {
+ mp = message_alloc (msgid);
+ message_list_append (this->mlp, mp);
+ }
+
+ /* Add the accumulated comments to the message. Clear the
+ accumulation in preparation for the next message. */
+ if (this->comment != NULL)
+ {
+ for (j = 0; j < this->comment->nitems; ++j)
+ message_comment_append (mp, this->comment->item[j]);
+ string_list_free (this->comment);
+ this->comment = NULL;
+ }
+ if (this->comment_dot != NULL)
+ {
+ for (j = 0; j < this->comment_dot->nitems; ++j)
+ message_comment_dot_append (mp, this->comment_dot->item[j]);
+ string_list_free (this->comment_dot);
+ this->comment_dot = NULL;
+ }
+ for (j = 0; j < this->filepos_count; ++j)
+ {
+ lex_pos_ty *pp;
+
+ pp = &this->filepos[j];
+ message_comment_filepos (mp, pp->file_name, pp->line_number);
+ free (pp->file_name);
+ }
+ mp->is_fuzzy = this->is_fuzzy;
+ mp->is_c_format = this->is_c_format;
+ mp->do_wrap = this->do_wrap;
+
+ if (this->filepos != NULL)
+ free (this->filepos);
+ this->filepos_count = 0;
+ this->filepos = NULL;
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+
+ /* See if this domain has been seen for this message ID. */
+ mvp = message_variant_search (mp, this->domain);
+ if (mvp)
+ {
+ gram_error_at_line (msgid_pos, _("duplicate message definition"));
+ gram_error_at_line (&mvp->pos, _("\
+...this is the location of the first definition"));
+ free (msgstr);
+ }
+ else
+ message_variant_append (mp, this->domain, msgstr, msgstr_pos);
+}
+
+
+static void
+merge_parse_brief (that)
+ po_ty *that;
+{
+ po_lex_pass_comments (1);
+}
+
+
+static void
+merge_parse_debrief (that)
+ po_ty *that;
+{
+ merge_class_ty *this = (merge_class_ty *) that;
+ message_list_ty *mlp = this->mlp;
+ size_t j;
+
+ /* For each domain in the used-domain-list, make sure each message
+ defines a msgstr in that domain. */
+ for (j = 0; j < this->domain_list->nitems; ++j)
+ {
+ const char *domain_name;
+ size_t k;
+
+ domain_name = this->domain_list->item[j];
+ for (k = 0; k < mlp->nitems; ++k)
+ {
+ const message_ty *mp;
+ size_t m;
+
+ mp = mlp->item[k];
+ for (m = 0; m < mp->variant_count; ++m)
+ {
+ message_variant_ty *mvp;
+
+ mvp = &mp->variant[m];
+ if (strcmp (domain_name, mvp->domain) == 0)
+ break;
+ }
+ if (m >= mp->variant_count)
+ gram_error_at_line (&mp->variant[0].pos, _("\
+this message has no definition in the \"%s\" domain"), domain_name);
+ }
+ }
+}
+
+
+static void
+merge_comment (that, s)
+ po_ty *that;
+ const char *s;
+{
+ merge_class_ty *this = (merge_class_ty *) that;
+
+ if (this->comment == NULL)
+ this->comment = string_list_alloc ();
+ string_list_append (this->comment, s);
+}
+
+
+static void
+merge_comment_dot (that, s)
+ po_ty *that;
+ const char *s;
+{
+ merge_class_ty *this = (merge_class_ty *) that;
+
+ if (this->comment_dot == NULL)
+ this->comment_dot = string_list_alloc ();
+ string_list_append (this->comment_dot, s);
+}
+
+
+static void
+merge_comment_special (that, s)
+ po_ty *that;
+ const char *s;
+{
+ merge_class_ty *this = (merge_class_ty *) that;
+
+ if (strstr (s, "fuzzy") != NULL)
+ this->is_fuzzy = 1;
+
+ this->is_c_format = parse_c_format_description_string (s);
+ this->do_wrap = parse_c_width_description_string (s);
+}
+
+
+static void
+merge_comment_filepos (that, name, line)
+ po_ty *that;
+ const char *name;
+ int line;
+{
+ merge_class_ty *this = (merge_class_ty *) that;
+ size_t nbytes;
+ lex_pos_ty *pp;
+
+ if (!line_comment)
+ return;
+ nbytes = (this->filepos_count + 1) * sizeof (this->filepos[0]);
+ this->filepos = xrealloc (this->filepos, nbytes);
+ pp = &this->filepos[this->filepos_count++];
+ pp->file_name = xstrdup (name);
+ pp->line_number = line;
+}
+
+
+/* So that the one parser can be used for multiple programs, and also
+ use good data hiding and encapsulation practices, an object
+ oriented approach has been taken. An object instance is allocated,
+ and all actions resulting from the parse will be through
+ invokations of method functions of that object. */
+
+static po_method_ty merge_methods =
+{
+ sizeof (merge_class_ty),
+ merge_constructor,
+ merge_destructor,
+ merge_directive_domain,
+ merge_directive_message,
+ merge_parse_brief,
+ merge_parse_debrief,
+ merge_comment,
+ merge_comment_dot,
+ merge_comment_filepos,
+ merge_comment_special
+};
+
+
+static message_list_ty *
+grammar (filename)
+ const char *filename;
+{
+ po_ty *pop;
+ message_list_ty *mlp;
+
+ pop = po_alloc (&merge_methods);
+ po_lex_pass_obsolete_entries (1);
+ po_scan (pop, filename);
+ mlp = ((merge_class_ty *) pop)->mlp;
+ po_free (pop);
+ return mlp;
+}
+
+
+#define DOT_FREQUENCE 10
+
+static message_list_ty *
+merge (fn1, fn2)
+ const char *fn1; /* definitions */
+ const char *fn2; /* references */
+{
+ message_list_ty *def;
+ message_list_ty *ref;
+ message_ty *defmsg;
+ size_t j, k;
+ size_t merged, fuzzied, missing, obsolete;
+ message_list_ty *result;
+ message_list_list_ty *definitions;
+
+ merged = fuzzied = missing = obsolete = 0;
+
+ /* This is the definitions file, created by a human. */
+ def = grammar (fn1);
+
+ /* Glue the definition file and the compendiums together, to define
+ the set of places to look for message definitions. */
+ definitions = message_list_list_alloc ();
+ message_list_list_append (definitions, def);
+ if (compendiums)
+ message_list_list_append_list (definitions, compendiums);
+
+ /* This is the references file, created by groping the sources with
+ the xgettext program. */
+ ref = grammar (fn2);
+
+ result = message_list_alloc ();
+
+ /* Every reference must be matched with its definition. */
+ for (j = 0; j < ref->nitems; ++j)
+ {
+ message_ty *refmsg;
+
+ /* Because merging can take a while we print something to signal
+ we are not dead. */
+ if (!quiet && verbosity_level <= 1 && j % DOT_FREQUENCE == 0)
+ fputc ('.', stderr);
+
+ refmsg = ref->item[j];
+
+ /* See if it is in the other file. */
+ defmsg = message_list_list_search (definitions, refmsg->msgid);
+ if (defmsg)
+ {
+ /* Merge the reference with the definition: take the #. and
+ #: comments from the reference, take the # comments from
+ the definition, take the msgstr from the definition. Add
+ this merged entry to the output message list. */
+ message_ty *mp = message_merge (defmsg, refmsg);
+
+ message_list_append (result, mp);
+
+ /* Remember that this message has been used, when we scan
+ later to see if anything was omitted. */
+ defmsg->used = 1;
+ ++merged;
+ continue;
+ }
+
+ /* If the message was not defined at all, try to find a very
+ similar message, it could be a typo, or the suggestion may
+ help. */
+ defmsg = message_list_list_search_fuzzy (definitions, refmsg->msgid);
+ if (defmsg)
+ {
+ message_ty *mp;
+
+ if (verbosity_level > 1)
+ {
+ gram_error_at_line (&refmsg->variant[0].pos, _("\
+this message is used but not defined..."));
+ gram_error_at_line (&defmsg->variant[0].pos, _("\
+...but this definition is similar"));
+ }
+
+ /* Merge the reference with the definition: take the #. and
+ #: comments from the reference, take the # comments from
+ the definition, take the msgstr from the definition. Add
+ this merged entry to the output message list. */
+ mp = message_merge (defmsg, refmsg);
+
+ mp->is_fuzzy = 1;
+
+ message_list_append (result, mp);
+
+ /* Remember that this message has been used, when we scan
+ later to see if anything was omitted. */
+ defmsg->used = 1;
+ ++fuzzied;
+ if (!quiet && verbosity_level <= 1)
+ /* Always print a dot if we handled a fuzzy match. */
+ fputc ('.', stderr);
+ }
+ else
+ {
+ message_ty *mp;
+
+ if (verbosity_level > 1)
+ gram_error_at_line (&refmsg->variant[0].pos, _("\
+this message is used but not defined in %s"), fn1);
+
+ mp = message_copy (refmsg);
+
+ message_list_append (result, mp);
+ ++missing;
+ }
+ }
+
+ /* Look for messages in the definition file, which are not present
+ in the reference file, indicating messages which defined but not
+ used in the program. Don't scan the compendium(s). */
+ for (k = 0; k < def->nitems; ++k)
+ {
+ defmsg = def->item[k];
+ if (defmsg->used)
+ continue;
+
+ /* Remember the old translation although it is not used anymore.
+ But we mark it as obsolete. */
+ defmsg->obsolete = 1;
+
+ message_list_append (result, defmsg);
+ ++obsolete;
+ }
+
+ /* Report some statistics. */
+ if (verbosity_level > 0)
+ fprintf (stderr, _("%s\
+Read %d old + %d reference, \
+merged %d, fuzzied %d, missing %d, obsolete %d.\n"),
+ !quiet && verbosity_level <= 1 ? "\n" : "",
+ def->nitems, ref->nitems, merged, fuzzied, missing, obsolete);
+ else if (!quiet)
+ fputs (_(" done.\n"), stderr);
+
+ return result;
+}
diff --git a/src/msgunfmt.c b/src/msgunfmt.c
new file mode 100644
index 0000000..920d82f
--- /dev/null
+++ b/src/msgunfmt.c
@@ -0,0 +1,411 @@
+/* msgunfmt - converts binary .mo files to Uniforum style .po files
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <sys/param.h>
+#include <sys/types.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#include "hash.h"
+
+#include "error.h"
+#include "getline.h"
+#include "printf.h"
+#include <system.h>
+
+#include "gettext.h"
+#include "domain.h"
+#include "hash-string.h"
+#include <libintl.h>
+#include "message.h"
+
+#define _(str) gettext (str)
+
+#ifndef errno
+extern int errno;
+#endif
+
+
+/* String containing name the program is called with. */
+const char *program_name;
+
+/* Force output of PO file even if empty. */
+static int force_po;
+
+/* Long options. */
+static const struct option long_options[] =
+{
+ { "escape", no_argument, NULL, 'E' },
+ { "force-po", no_argument, &force_po, 1 },
+ { "help", no_argument, NULL, 'h' },
+ { "indent", no_argument, NULL, 'i' },
+ { "no-escape", no_argument, NULL, 'e' },
+ { "output-file", required_argument, NULL, 'o' },
+ { "strict", no_argument, NULL, 'S' },
+ { "version", no_argument, NULL, 'V' },
+ { "width", required_argument, NULL, 'w', },
+ { NULL, 0, NULL, 0 }
+};
+
+
+/* This defines the byte order within the file. It needs to be set
+ appropriately once we have the file open. */
+static enum { MO_LITTLE_ENDIAN, MO_BIG_ENDIAN } endian;
+
+
+/* Prototypes for local functions. */
+static void usage PARAMS ((int __status));
+static void error_print PARAMS ((void));
+static nls_uint32 read32 PARAMS ((FILE *__fp, const char *__fn));
+static void seek32 PARAMS ((FILE *__fp, const char *__fn, long __offset));
+static char *string32 PARAMS ((FILE *__fp, const char *__fn, long __offset));
+static message_list_ty *read_mo_file PARAMS ((message_list_ty *__mlp,
+ const char *__fn));
+
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int optchar;
+ int do_help = 0;
+ int do_version = 0;
+ const char *output_file = "-";
+ message_list_ty *mlp = NULL;
+
+ /* Set program name for messages. */
+ program_name = argv[0];
+ error_print_progname = error_print;
+
+#ifdef HAVE_SETLOCALE
+ /* Set locale via LC_ALL. */
+ setlocale (LC_ALL, "");
+#endif
+
+ /* Set the text message domain. */
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ while ((optchar = getopt_long (argc, argv, "hio:Vw:", long_options, NULL))
+ != EOF)
+ switch (optchar)
+ {
+ case '\0':
+ /* long option */
+ break;
+
+ case 'e':
+ message_print_style_escape (0);
+ break;
+
+ case 'E':
+ message_print_style_escape (1);
+ break;
+
+ case 'h':
+ do_help = 1;
+ break;
+
+ case 'i':
+ message_print_style_indent ();
+ break;
+
+ case 'o':
+ output_file = optarg;
+ break;
+
+ case 'S':
+ message_print_style_uniforum ();
+ break;
+
+ case 'V':
+ do_version = 1;
+ break;
+
+ case 'w':
+ {
+ int value;
+ char *endp;
+ value = strtol (optarg, &endp, 10);
+ if (endp != optarg)
+ message_page_width_set (value);
+ }
+ break;
+
+ default:
+ usage (EXIT_FAILURE);
+ break;
+ }
+
+ /* Version information is requested. */
+ if (do_version)
+ {
+ printf ("%s (GNU %s) %s\n", basename (program_name), PACKAGE, VERSION);
+ /* xgettext: no-wrap */
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"),
+ "1995, 1996, 1997, 1998");
+ printf (_("Written by %s.\n"), "Ulrich Drepper");
+ exit (EXIT_SUCCESS);
+ }
+
+ /* Help is requested. */
+ if (do_help)
+ usage (EXIT_SUCCESS);
+
+ /* Read the given .mo file. */
+ if (optind < argc)
+ do
+ mlp = read_mo_file (mlp, argv[optind]);
+ while (++optind < argc);
+ else
+ mlp = read_mo_file (NULL, "-");
+
+ /* Write the resulting message list to the given .po file. */
+ message_list_print (mlp, output_file, force_po, 0);
+
+ /* No problems. */
+ exit (EXIT_SUCCESS);
+}
+
+
+/* Display usage information and exit. */
+static void
+usage (status)
+ int status;
+{
+ if (status != EXIT_SUCCESS)
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
+ program_name);
+ else
+ {
+ /* xgettext: no-wrap */
+ printf (_("\
+Usage: %s [OPTION] [FILE]...\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -e, --no-escape do not use C escapes in output (default)\n\
+ -E, --escape use C escapes in output, no extended chars\n\
+ --force-po write PO file even if empty\n\
+ -h, --help display this help and exit\n\
+ -i, --indent write indented output style\n\
+ -o, --output-file=FILE write output into FILE instead of standard output\n\
+ --strict write strict uniforum style\n\
+ -V, --version output version information and exit\n\
+ -w, --width=NUMBER set output page width\n"),
+ program_name);
+ /* xgettext: no-wrap */
+ fputs (_("\n\
+Convert binary .mo files to Uniforum style .po files.\n\
+Both little-endian and big-endian .mo files are handled.\n\
+If no input file is given or it is -, standard input is read.\n\
+By default the output is written to standard output.\n"), stdout);
+ fputs (_("Report bugs to <bug-gnu-utils@gnu.org>.\n"),
+ stdout);
+ }
+
+ exit (status);
+}
+
+
+/* The address of this function will be assigned to the hook in the error
+ functions. */
+static void
+error_print ()
+{
+ /* We don't want the program name to be printed in messages. Emacs'
+ compile.el does not like this. */
+}
+
+
+/* This function reads a 32-bit number from the file, and assembles it
+ according to the current ``endian'' setting. */
+static nls_uint32
+read32 (fp, fn)
+ FILE *fp;
+ const char *fn;
+{
+ int c1, c2, c3, c4;
+
+ c1 = getc (fp);
+ if (c1 == EOF)
+ {
+ bomb:
+ if (ferror (fp))
+ error (EXIT_FAILURE, errno, _("error while reading \"%s\""), fn);
+ error (EXIT_FAILURE, 0, _("file \"%s\" truncated"), fn);
+ }
+ c2 = getc (fp);
+ if (c2 == EOF)
+ goto bomb;
+ c3 = getc (fp);
+ if (c3 == EOF)
+ goto bomb;
+ c4 = getc (fp);
+ if (c4 == EOF)
+ goto bomb;
+ if (endian == MO_LITTLE_ENDIAN)
+ return (((nls_uint32) c1)
+ | ((nls_uint32) c2 << 8)
+ | ((nls_uint32) c3 << 16)
+ | ((nls_uint32) c4 << 24));
+
+ return (((nls_uint32) c1 << 24)
+ | ((nls_uint32) c2 << 16)
+ | ((nls_uint32) c3 << 8)
+ | ((nls_uint32) c4));
+}
+
+
+static void
+seek32 (fp, fn, offset)
+ FILE *fp;
+ const char *fn;
+ long offset;
+{
+ if (fseek (fp, offset, 0) < 0)
+ error (EXIT_FAILURE, errno, _("seek \"%s\" offset %ld failed"),
+ fn, offset);
+}
+
+
+static char *
+string32 (fp, fn, offset)
+ FILE *fp;
+ const char *fn;
+ long offset;
+{
+ long length;
+ char *buffer;
+ long n;
+
+ /* Read the string_desc structure, describing where in the file to
+ find the string. */
+ seek32 (fp, fn, offset);
+ length = read32 (fp, fn);
+ offset = read32 (fp, fn);
+
+ /* Allocate memory for the string to be read into. Leave space for
+ the NUL on the end. */
+ buffer = xmalloc (length + 1);
+
+ /* Read in the string. Complain if there is an error or it comes up
+ short. Add the NUL ourselves. */
+ seek32 (fp, fn, offset);
+ n = fread (buffer, 1, length, fp);
+ if (n != length)
+ {
+ if (ferror (fp))
+ error (EXIT_FAILURE, errno, _("error while reading \"%s\""), fn);
+ error (EXIT_FAILURE, 0, _("file \"%s\" truncated"), fn);
+ }
+ buffer[length] = 0;
+
+ /* Return the string to the caller. */
+ return buffer;
+}
+
+
+/* This function reads and existing .mo file. Return a message list. */
+static message_list_ty *
+read_mo_file (mlp, fn)
+ message_list_ty *mlp;
+ const char *fn;
+{
+ FILE *fp;
+ struct mo_file_header header;
+ int j;
+
+ if (strcmp (fn, "-") == 0 || strcmp (fn, "/dev/stdout") == 0)
+ fp = stdin;
+ else
+ {
+ fp = fopen (fn, "rb");
+ if (fp == NULL)
+ error (EXIT_FAILURE, errno,
+ _("error while opening \"%s\" for reading"), fn);
+ }
+
+ /* We must grope the file to determine which endian it is.
+ Perversity of the universe tends towards maximum, so it will
+ probably not match the currently executing architecture. */
+ endian = MO_BIG_ENDIAN;
+ header.magic = read32 (fp, fn);
+ if (header.magic != _MAGIC)
+ {
+ endian = MO_LITTLE_ENDIAN;
+ seek32 (fp, fn, 0L);
+ header.magic = read32 (fp, fn);
+ if (header.magic != _MAGIC)
+ {
+ unrecognised:
+ error (EXIT_FAILURE, 0, _("file \"%s\" is not in GNU .mo format"),
+ fn);
+ }
+ }
+
+ /* Fill the structure describing the header. */
+ header.revision = read32 (fp, fn);
+ if (header.revision != MO_REVISION_NUMBER)
+ goto unrecognised;
+ header.nstrings = read32 (fp, fn);
+ header.orig_tab_offset = read32 (fp, fn);
+ header.trans_tab_offset = read32 (fp, fn);
+ header.hash_tab_size = read32 (fp, fn);
+ header.hash_tab_offset = read32 (fp, fn);
+
+ if (mlp == NULL)
+ mlp = message_list_alloc ();
+ for (j = 0; j < header.nstrings; ++j)
+ {
+ static lex_pos_ty pos = { __FILE__, __LINE__ };
+ message_ty *mp;
+ char *msgid;
+ char *msgstr;
+
+ /* Read the msgid. */
+ msgid = string32 (fp, fn, header.orig_tab_offset + j * 8);
+
+ /* Read the msgstr. */
+ msgstr = string32 (fp, fn, header.trans_tab_offset + j * 8);
+
+ mp = message_alloc (msgid);
+ message_variant_append (mp, MESSAGE_DOMAIN_DEFAULT, msgstr, &pos);
+ message_list_append (mlp, mp);
+ }
+
+ if (fp != stdin)
+ fclose (fp);
+ return mlp;
+}
diff --git a/src/open-po.c b/src/open-po.c
new file mode 100644
index 0000000..aad7e61
--- /dev/null
+++ b/src/open-po.c
@@ -0,0 +1,131 @@
+/* open-po - search for .po file along search path list and open for reading
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#if defined STDC_HEADERS || HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#include "dir-list.h"
+#include "error.h"
+#include "system.h"
+
+#include <libintl.h>
+
+#define _(str) gettext (str)
+
+#ifndef errno
+extern int errno;
+#endif
+
+/* Prototypes for helper functions. */
+extern char *xstrdup PARAMS ((const char *string));
+
+/* This macro is used to determine the number of elements in an erray. */
+#define SIZEOF(a) (sizeof(a)/sizeof(a[0]))
+
+/* Open the input file with the name INPUT_NAME. The ending .po is added
+ if necessary. If INPUT_NAME is not an absolute file name and the file is
+ not found, the list of directories in INPUT_PATH_LIST is searched. */
+FILE *
+open_po_file (input_name, file_name)
+ const char *input_name;
+ char **file_name;
+{
+ static const char *extension[] = { "", ".po", ".pot", };
+ FILE *ret_val;
+ int j, k;
+ const char *dir;
+ const char *ext;
+
+ if (strcmp (input_name, "-") == 0 || strcmp (input_name, "/dev/stdin") == 0)
+ {
+ *file_name = xstrdup (_("<stdin>"));
+ return stdin;
+ }
+
+ /* We have a real name for the input file. If the name is absolute,
+ try the various extensions, but ignore the directory search list. */
+ if (*input_name == '/')
+ {
+ for (k = 0; k < SIZEOF (extension); ++k)
+ {
+ ext = extension[k];
+ *file_name = xmalloc (strlen (input_name) + strlen (ext) + 1);
+ stpcpy (stpcpy (*file_name, input_name), ext);
+
+ ret_val = fopen (*file_name, "r");
+ if (ret_val != NULL || errno != ENOENT)
+ /* We found the file. */
+ return ret_val;
+
+ free (*file_name);
+ }
+
+ /* File does not exist. */
+ *file_name = xstrdup (input_name);
+ errno = ENOENT;
+ return NULL;
+ }
+
+ /* For relative file names, look through the directory search list,
+ trying the various extensions. If no directory search list is
+ specified, the current directory is used. */
+ for (j = 0; (dir = dir_list_nth (j)) != NULL; ++j)
+ for (k = 0; k < SIZEOF (extension); ++k)
+ {
+ ext = extension[k];
+ if (dir[0] == '.' && dir[1] == '\0')
+ {
+ *file_name = xmalloc (strlen(input_name) + strlen(ext) + 1);
+ stpcpy (stpcpy (*file_name, input_name), ext);
+ }
+ else
+ {
+ *file_name = xmalloc (strlen (dir) + strlen (input_name)
+ + strlen (ext) + 2);
+ stpcpy (stpcpy (stpcpy (stpcpy (*file_name, dir), "/"),
+ input_name),
+ ext);
+ }
+
+ ret_val = fopen (*file_name, "r");
+ if (ret_val != NULL || errno != ENOENT)
+ return ret_val;
+
+ free (*file_name);
+ }
+
+ /* File does not exist. */
+ *file_name = xstrdup (input_name);
+ errno = ENOENT;
+ return NULL;
+}
diff --git a/src/po-gram-gen.c b/src/po-gram-gen.c
new file mode 100644
index 0000000..2632946
--- /dev/null
+++ b/src/po-gram-gen.c
@@ -0,0 +1,1026 @@
+
+/* A Bison parser, made from /home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y
+ by GNU Bison version 1.28 */
+
+#define YYBISON 1 /* Identify Bison output. */
+
+#define COMMENT 257
+#define DOMAIN 258
+#define JUNK 259
+#define MSGID 260
+#define MSGSTR 261
+#define NAME 262
+#define NUMBER 263
+#define STRING 264
+
+#line 20 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include "po-lex.h"
+#include "po-gram.h"
+#include "error.h"
+#include "system.h"
+#include <libintl.h>
+#include "po.h"
+
+#define _(str) gettext (str)
+
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
+ as well as gratuitiously global symbol names, so we can have multiple
+ yacc generated parsers in the same program. Note that these are only
+ the variables produced by yacc. If other parser generators (bison,
+ byacc, etc) produce additional global names that conflict at link time,
+ then those parser generators need to be fixed instead of adding those
+ names to this list. */
+
+#define yymaxdepth po_gram_maxdepth
+#define yyparse po_gram_parse
+#define yylex po_gram_lex
+#define yylval po_gram_lval
+#define yychar po_gram_char
+#define yydebug po_gram_debug
+#define yypact po_gram_pact
+#define yyr1 po_gram_r1
+#define yyr2 po_gram_r2
+#define yydef po_gram_def
+#define yychk po_gram_chk
+#define yypgo po_gram_pgo
+#define yyact po_gram_act
+#define yyexca po_gram_exca
+#define yyerrflag po_gram_errflag
+#define yynerrs po_gram_nerrs
+#define yyps po_gram_ps
+#define yypv po_gram_pv
+#define yys po_gram_s
+#define yy_yys po_gram_yys
+#define yystate po_gram_state
+#define yytmp po_gram_tmp
+#define yyv po_gram_v
+#define yy_yyv po_gram_yyv
+#define yyval po_gram_val
+#define yylloc po_gram_lloc
+#define yyreds po_gram_reds /* With YYDEBUG defined */
+#define yytoks po_gram_toks /* With YYDEBUG defined */
+#define yylhs po_gram_yylhs
+#define yylen po_gram_yylen
+#define yydefred po_gram_yydefred
+#define yydgoto po_gram_yydgoto
+#define yysindex po_gram_yysindex
+#define yyrindex po_gram_yyrindex
+#define yygindex po_gram_yygindex
+#define yytable po_gram_yytable
+#define yycheck po_gram_yycheck
+
+#line 92 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+typedef union
+{
+ char *string;
+ long number;
+ lex_pos_ty pos;
+} YYSTYPE;
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define YYFINAL 18
+#define YYFLAG -32768
+#define YYNTBASE 11
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 264 ? yytranslate[x] : 18)
+
+static const char yytranslate[] = { 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
+ 7, 8, 9, 10
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = { 0,
+ 0, 1, 4, 7, 10, 13, 16, 21, 24, 26,
+ 28, 30, 33
+};
+
+static const short yyrhs[] = { -1,
+ 11, 17, 0, 11, 12, 0, 11, 13, 0, 11,
+ 1, 0, 4, 10, 0, 14, 16, 15, 16, 0,
+ 14, 16, 0, 6, 0, 7, 0, 10, 0, 16,
+ 10, 0, 3, 0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+ 108, 109, 110, 111, 112, 116, 123, 127, 135, 142,
+ 149, 153, 168
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = { "$","error","$undefined.","COMMENT",
+"DOMAIN","JUNK","MSGID","MSGSTR","NAME","NUMBER","STRING","msgfmt","domain",
+"message","msgid","msgstr","string_list","comment", NULL
+};
+#endif
+
+static const short yyr1[] = { 0,
+ 11, 11, 11, 11, 11, 12, 13, 13, 14, 15,
+ 16, 16, 17
+};
+
+static const short yyr2[] = { 0,
+ 0, 2, 2, 2, 2, 2, 4, 2, 1, 1,
+ 1, 2, 1
+};
+
+static const short yydefact[] = { 1,
+ 0, 5, 13, 0, 9, 3, 4, 0, 2, 6,
+ 11, 8, 10, 12, 0, 7, 0, 0
+};
+
+static const short yydefgoto[] = { 1,
+ 6, 7, 8, 15, 12, 9
+};
+
+static const short yypact[] = {-32768,
+ 0,-32768,-32768, -3,-32768,-32768,-32768, -2,-32768,-32768,
+-32768, -5,-32768,-32768, -2, -1, 10,-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768,-32768,-32768,-32768, -4,-32768
+};
+
+
+#define YYLAST 11
+
+
+static const short yytable[] = { 17,
+ 2, 13, 3, 4, 14, 5, 10, 11, 14, 18,
+ 16
+};
+
+static const short yycheck[] = { 0,
+ 1, 7, 3, 4, 10, 6, 10, 10, 10, 0,
+ 15
+};
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+#line 3 "/usr/share/bison.simple"
+/* This file comes from bison-1.28. */
+
+/* Skeleton output parser for bison,
+ Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C. */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+ It is replaced by the list of actions, each action
+ as one case of the switch. */
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+ This remains here temporarily to ease the
+ transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
+#define YYRECOVERING() (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { yychar = (token), yylval = (value); \
+ yychar1 = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { yyerror ("syntax error: cannot back up"); YYERROR; } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+#ifndef YYPURE
+#define YYLEX yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int yychar; /* the lookahead symbol */
+YYSTYPE yylval; /* the semantic value of the */
+ /* lookahead symbol */
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc; /* location data for the lookahead */
+ /* symbol */
+#endif
+
+int yynerrs; /* number of parse errors so far */
+#endif /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug; /* nonzero means print parse trace */
+/* Since this is uninitialized, it does not stop multiple parsers
+ from coexisting. */
+#endif
+
+/* YYINITDEPTH indicates the initial size of the parser's stacks */
+
+#ifndef YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH is the maximum size the stacks can grow to
+ (effective only if the built-in stack extension method is used). */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Define __yy_memcpy. Note that the size argument
+ should be passed with type unsigned int, because that is what the non-GCC
+ definitions require. With GCC, __builtin_memcpy takes an arg
+ of type size_t, but it can handle unsigned int. */
+
+#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
+#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
+#else /* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (to, from, count)
+ char *to;
+ char *from;
+ unsigned int count;
+{
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (char *to, char *from, unsigned int count)
+{
+ register char *t = to;
+ register char *f = from;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 217 "/usr/share/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+ into yyparse. The argument should have type void *.
+ It should actually point to an object.
+ Grammar actions can access the variable by casting it
+ to the proper pointer type. */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+ YYPARSE_PARAM_DECL
+{
+ register int yystate;
+ register int yyn;
+ register short *yyssp;
+ register YYSTYPE *yyvsp;
+ int yyerrstatus; /* number of tokens to shift before error messages enabled */
+ int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+
+ short yyssa[YYINITDEPTH]; /* the state stack */
+ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+
+ short *yyss = yyssa; /* refer to the stacks thru separate pointers */
+ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
+
+#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK (yyvsp--, yyssp--)
+#endif
+
+ int yystacksize = YYINITDEPTH;
+ int yyfree_stacks = 0;
+
+#ifdef YYPURE
+ int yychar;
+ YYSTYPE yylval;
+ int yynerrs;
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylloc;
+#endif
+#endif
+
+ YYSTYPE yyval; /* the variable used to return */
+ /* semantic values from the action */
+ /* routines */
+
+ int yylen;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Starting parse\n");
+#endif
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss - 1;
+ yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in yystate . */
+/* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks. */
+yynewstate:
+
+ *++yyssp = yystate;
+
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /* Give user a chance to reallocate the stack */
+ /* Use copies of these so that the &'s don't force the real ones into memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+ YYLTYPE *yyls1 = yyls;
+#endif
+
+ /* Get the current used size of the three stacks, in elements. */
+ int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ /* Each stack pointer address is followed by the size of
+ the data in use in that stack, in bytes. */
+#ifdef YYLSP_NEEDED
+ /* This used to be a conditional around just the two extra args,
+ but that might be undefined if yyoverflow is a macro. */
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yyls1, size * sizeof (*yylsp),
+ &yystacksize);
+#else
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yystacksize);
+#endif
+
+ yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+ yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+ /* Extend the stack our own way. */
+ if (yystacksize >= YYMAXDEPTH)
+ {
+ yyerror("parser stack overflow");
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 2;
+ }
+ yystacksize *= 2;
+ if (yystacksize > YYMAXDEPTH)
+ yystacksize = YYMAXDEPTH;
+#ifndef YYSTACK_USE_ALLOCA
+ yyfree_stacks = 1;
+#endif
+ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss, (char *)yyss1,
+ size * (unsigned int) sizeof (*yyssp));
+ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+ size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls, (char *)yyls1,
+ size * (unsigned int) sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + size - 1;
+ yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+ if (yyssp >= yyss + yystacksize - 1)
+ YYABORT;
+ }
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+ goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* yychar is either YYEMPTY or YYEOF
+ or a valid token in external form. */
+
+ if (yychar == YYEMPTY)
+ {
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Reading a token: ");
+#endif
+ yychar = YYLEX;
+ }
+
+ /* Convert token to internal form (in yychar1) for indexing tables with */
+
+ if (yychar <= 0) /* This means end of input. */
+ {
+ yychar1 = 0;
+ yychar = YYEOF; /* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Now at end of input.\n");
+#endif
+ }
+ else
+ {
+ yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+ /* Give the individual parser a way to print the precise meaning
+ of a token, for further debugging info. */
+#ifdef YYPRINT
+ YYPRINT (stderr, yychar, yylval);
+#endif
+ fprintf (stderr, ")\n");
+ }
+#endif
+ }
+
+ yyn += yychar1;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ goto yydefault;
+
+ yyn = yytable[yyn];
+
+ /* yyn is what to do for this token type in this state.
+ Negative => reduce, -yyn is rule number.
+ Positive => shift, yyn is new state.
+ New state is final state => don't bother to shift,
+ just return success.
+ 0, or most negative number => error. */
+
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrlab;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ /* count tokens shifted since error; after three, turn off error status. */
+ if (yyerrstatus) yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+/* Do the default action for the current state. */
+yydefault:
+
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+
+/* Do a reduction. yyn is the number of a rule to reduce with. */
+yyreduce:
+ yylen = yyr2[yyn];
+ if (yylen > 0)
+ yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ int i;
+
+ fprintf (stderr, "Reducing via rule %d (line %d), ",
+ yyn, yyrline[yyn]);
+
+ /* Print the symbols being reduced, and their result. */
+ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+ fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+ fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+ }
+#endif
+
+
+ switch (yyn) {
+
+case 6:
+#line 117 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+{
+ po_callback_domain (yyvsp[0].string);
+ ;
+ break;}
+case 7:
+#line 124 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+{
+ po_callback_message (yyvsp[-2].string, &yyvsp[-3].pos, yyvsp[0].string, &yyvsp[-1].pos);
+ ;
+ break;}
+case 8:
+#line 128 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+{
+ gram_error_at_line (&yyvsp[-1].pos, _("missing `msgstr' section"));
+ free (yyvsp[0].string);
+ ;
+ break;}
+case 9:
+#line 136 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+{
+ yyval.pos = gram_pos;
+ ;
+ break;}
+case 10:
+#line 143 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+{
+ yyval.pos = gram_pos;
+ ;
+ break;}
+case 11:
+#line 150 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+{
+ yyval.string = yyvsp[0].string;
+ ;
+ break;}
+case 12:
+#line 154 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+{
+ size_t len1;
+ size_t len2;
+
+ len1 = strlen (yyvsp[-1].string);
+ len2 = strlen (yyvsp[0].string);
+ yyval.string = (char *) xmalloc (len1 + len2 + 1);
+ stpcpy (stpcpy (yyval.string, yyvsp[-1].string), yyvsp[0].string);
+ free (yyvsp[-1].string);
+ free (yyvsp[0].string);
+ ;
+ break;}
+case 13:
+#line 169 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
+{
+ po_callback_comment (yyvsp[0].string);
+ ;
+ break;}
+}
+ /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/share/bison.simple"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+ yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+ *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+ yylsp++;
+ if (yylen == 0)
+ {
+ yylsp->first_line = yylloc.first_line;
+ yylsp->first_column = yylloc.first_column;
+ yylsp->last_line = (yylsp-1)->last_line;
+ yylsp->last_column = (yylsp-1)->last_column;
+ yylsp->text = 0;
+ }
+ else
+ {
+ yylsp->last_line = (yylsp+yylen-1)->last_line;
+ yylsp->last_column = (yylsp+yylen-1)->last_column;
+ }
+#endif
+
+ /* Now "shift" the result of the reduction.
+ Determine what state that goes to,
+ based on the state we popped back to
+ and the rule number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTBASE];
+
+ goto yynewstate;
+
+yyerrlab: /* here on detecting error */
+
+ if (! yyerrstatus)
+ /* If not already recovering from an error, report this error. */
+ {
+ ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (yyn > YYFLAG && yyn < YYLAST)
+ {
+ int size = 0;
+ char *msg;
+ int x, count;
+
+ count = 0;
+ /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ size += strlen(yytname[x]) + 15, count++;
+ msg = (char *) malloc(size + 15);
+ if (msg != 0)
+ {
+ strcpy(msg, "parse error");
+
+ if (count < 5)
+ {
+ count = 0;
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ {
+ strcat(msg, count == 0 ? ", expecting `" : " or `");
+ strcat(msg, yytname[x]);
+ strcat(msg, "'");
+ count++;
+ }
+ }
+ yyerror(msg);
+ free(msg);
+ }
+ else
+ yyerror ("parse error; also virtual memory exceeded");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror("parse error");
+ }
+
+ goto yyerrlab1;
+yyerrlab1: /* here on error raised explicitly by an action */
+
+ if (yyerrstatus == 3)
+ {
+ /* if just tried and failed to reuse lookahead token after an error, discard it. */
+
+ /* return failure if at end of input */
+ if (yychar == YYEOF)
+ YYABORT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+ yychar = YYEMPTY;
+ }
+
+ /* Else will try to reuse lookahead token
+ after shifting the error token. */
+
+ yyerrstatus = 3; /* Each real token shifted decrements this */
+
+ goto yyerrhandle;
+
+yyerrdefault: /* current state does not do anything special for the error token. */
+
+#if 0
+ /* This is wrong; only states that explicitly want error tokens
+ should shift them. */
+ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
+ if (yyn) goto yydefault;
+#endif
+
+yyerrpop: /* pop the current state because it cannot handle the error token */
+
+ if (yyssp == yyss) YYABORT;
+ yyvsp--;
+ yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+ yylsp--;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "Error: state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+yyerrhandle:
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yyerrdefault;
+
+ yyn += YYTERROR;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+ goto yyerrdefault;
+
+ yyn = yytable[yyn];
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrpop;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrpop;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting error token, ");
+#endif
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ yystate = yyn;
+ goto yynewstate;
+
+ yyacceptlab:
+ /* YYACCEPT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 0;
+
+ yyabortlab:
+ /* YYABORT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 1;
+}
+#line 173 "/home/drepper/gnu/gettext/build/src/../../src/po-gram-gen.y"
diff --git a/src/po-gram-gen.h b/src/po-gram-gen.h
new file mode 100644
index 0000000..0a1f8ff
--- /dev/null
+++ b/src/po-gram-gen.h
@@ -0,0 +1,17 @@
+typedef union
+{
+ char *string;
+ long number;
+ lex_pos_ty pos;
+} YYSTYPE;
+#define COMMENT 257
+#define DOMAIN 258
+#define JUNK 259
+#define MSGID 260
+#define MSGSTR 261
+#define NAME 262
+#define NUMBER 263
+#define STRING 264
+
+
+extern YYSTYPE yylval;
diff --git a/src/po-gram-gen.y b/src/po-gram-gen.y
new file mode 100644
index 0000000..4d5023f
--- /dev/null
+++ b/src/po-gram-gen.y
@@ -0,0 +1,172 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <pmiller@agso.gov.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+%{
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include "po-lex.h"
+#include "po-gram.h"
+#include "error.h"
+#include "system.h"
+#include <libintl.h>
+#include "po.h"
+
+#define _(str) gettext (str)
+
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
+ as well as gratuitiously global symbol names, so we can have multiple
+ yacc generated parsers in the same program. Note that these are only
+ the variables produced by yacc. If other parser generators (bison,
+ byacc, etc) produce additional global names that conflict at link time,
+ then those parser generators need to be fixed instead of adding those
+ names to this list. */
+
+#define yymaxdepth po_gram_maxdepth
+#define yyparse po_gram_parse
+#define yylex po_gram_lex
+#define yylval po_gram_lval
+#define yychar po_gram_char
+#define yydebug po_gram_debug
+#define yypact po_gram_pact
+#define yyr1 po_gram_r1
+#define yyr2 po_gram_r2
+#define yydef po_gram_def
+#define yychk po_gram_chk
+#define yypgo po_gram_pgo
+#define yyact po_gram_act
+#define yyexca po_gram_exca
+#define yyerrflag po_gram_errflag
+#define yynerrs po_gram_nerrs
+#define yyps po_gram_ps
+#define yypv po_gram_pv
+#define yys po_gram_s
+#define yy_yys po_gram_yys
+#define yystate po_gram_state
+#define yytmp po_gram_tmp
+#define yyv po_gram_v
+#define yy_yyv po_gram_yyv
+#define yyval po_gram_val
+#define yylloc po_gram_lloc
+#define yyreds po_gram_reds /* With YYDEBUG defined */
+#define yytoks po_gram_toks /* With YYDEBUG defined */
+#define yylhs po_gram_yylhs
+#define yylen po_gram_yylen
+#define yydefred po_gram_yydefred
+#define yydgoto po_gram_yydgoto
+#define yysindex po_gram_yysindex
+#define yyrindex po_gram_yyrindex
+#define yygindex po_gram_yygindex
+#define yytable po_gram_yytable
+#define yycheck po_gram_yycheck
+%}
+
+%token COMMENT
+%token DOMAIN
+%token JUNK
+%token MSGID
+%token MSGSTR
+%token NAME
+%token NUMBER
+%token STRING
+
+%union
+{
+ char *string;
+ long number;
+ lex_pos_ty pos;
+}
+
+%type <string> STRING COMMENT string_list
+%type <number> NUMBER
+%type <pos> msgid msgstr
+
+%right MSGSTR
+
+%%
+
+msgfmt
+ : /* empty */
+ | msgfmt comment
+ | msgfmt domain
+ | msgfmt message
+ | msgfmt error
+ ;
+
+domain
+ : DOMAIN STRING
+ {
+ po_callback_domain ($2);
+ }
+ ;
+
+message
+ : msgid string_list msgstr string_list
+ {
+ po_callback_message ($2, &$1, $4, &$3);
+ }
+ | msgid string_list
+ {
+ gram_error_at_line (&$1, _("missing `msgstr' section"));
+ free ($2);
+ }
+ ;
+
+msgid
+ : MSGID
+ {
+ $$ = gram_pos;
+ }
+ ;
+
+msgstr
+ : MSGSTR
+ {
+ $$ = gram_pos;
+ }
+ ;
+
+string_list
+ : STRING
+ {
+ $$ = $1;
+ }
+ | string_list STRING
+ {
+ size_t len1;
+ size_t len2;
+
+ len1 = strlen ($1);
+ len2 = strlen ($2);
+ $$ = (char *) xmalloc (len1 + len2 + 1);
+ stpcpy (stpcpy ($$, $1), $2);
+ free ($1);
+ free ($2);
+ }
+ ;
+
+comment
+ : COMMENT
+ {
+ po_callback_comment ($1);
+ }
+ ;
diff --git a/src/po-gram.h b/src/po-gram.h
new file mode 100644
index 0000000..11c6222
--- /dev/null
+++ b/src/po-gram.h
@@ -0,0 +1,28 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _PO_GRAM_H
+#define _PO_GRAM_H
+
+/* Include some fundamental headers. */
+#include <sys/types.h>
+
+int po_gram_parse PARAMS ((void));
+
+#endif
diff --git a/src/po-hash-gen.y b/src/po-hash-gen.y
new file mode 100644
index 0000000..7b29427
--- /dev/null
+++ b/src/po-hash-gen.y
@@ -0,0 +1,276 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <pmiller@agso.gov.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+%{
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include <system.h>
+#include "po-hash.h"
+#include "po.h"
+
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
+ as well as gratuitiously global symbol names, so we can have multiple
+ yacc generated parsers in the same program. Note that these are only
+ the variables produced by yacc. If other parser generators (bison,
+ byacc, etc) produce additional global names that conflict at link time,
+ then those parser generators need to be fixed instead of adding those
+ names to this list. */
+
+#define yymaxdepth po_hash_maxdepth
+#define yyparse po_hash_parse
+#define yylex po_hash_lex
+#define yylval po_hash_lval
+#define yychar po_hash_char
+#define yydebug po_hash_debug
+#define yypact po_hash_pact
+#define yyr1 po_hash_r1
+#define yyr2 po_hash_r2
+#define yydef po_hash_def
+#define yychk po_hash_chk
+#define yypgo po_hash_pgo
+#define yyact po_hash_act
+#define yyexca po_hash_exca
+#define yyerrflag po_hash_errflag
+#define yynerrs po_hash_nerrs
+#define yyps po_hash_ps
+#define yypv po_hash_pv
+#define yys po_hash_s
+#define yy_yys po_hash_yys
+#define yystate po_hash_state
+#define yytmp po_hash_tmp
+#define yyv po_hash_v
+#define yy_yyv po_hash_yyv
+#define yyval po_hash_val
+#define yylloc po_hash_lloc
+#define yyreds po_hash_reds /* With YYDEBUG defined */
+#define yytoks po_hash_toks /* With YYDEBUG defined */
+#define yylhs po_hash_yylhs
+#define yylen po_hash_yylen
+#define yydefred po_hash_yydefred
+#define yydgoto po_hash_yydgoto
+#define yysindex po_hash_yysindex
+#define yyrindex po_hash_yyrindex
+#define yygindex po_hash_yygindex
+#define yytable po_hash_yytable
+#define yycheck po_hash_yycheck
+
+%}
+
+%token STRING
+%token NUMBER
+%token COLON
+%token COMMA
+%token FILE_KEYWORD
+%token LINE_KEYWORD
+%token NUMBER_KEYWORD
+
+%union
+{
+ char *string;
+ int number;
+}
+
+%type <number> NUMBER
+%type <string> STRING
+
+%{
+
+static const char *cur;
+
+
+void yyerror PARAMS ((char *));
+int yylex PARAMS ((void));
+
+
+int
+po_hash (s)
+ const char *s;
+{
+ extern int yyparse PARAMS ((void));
+
+ cur = s;
+ return yyparse ();
+}
+
+
+void
+yyerror (s)
+ char *s;
+{
+ /* Do nothing, the grammar is used as a recogniser. */
+}
+%}
+
+%%
+
+filepos_line
+ : /* empty */
+ | filepos_line filepos
+ ;
+
+filepos
+ : STRING COLON NUMBER
+ {
+ /* GNU style */
+ po_callback_comment_filepos ($1, $3);
+ free ($1);
+ }
+ | FILE_KEYWORD COLON STRING COMMA LINE_KEYWORD COLON NUMBER
+ {
+ /* SunOS style */
+ po_callback_comment_filepos ($3, $7);
+ free ($3);
+ }
+ | FILE_KEYWORD COLON STRING COMMA LINE_KEYWORD NUMBER_KEYWORD COLON NUMBER
+ {
+ /* Solaris style */
+ po_callback_comment_filepos ($3, $8);
+ free ($3);
+ }
+ | FILE_KEYWORD COLON NUMBER
+ {
+ /* GNU style, but STRING is `file'. Esoteric, but it
+ happened. */
+ po_callback_comment_filepos ("file", $3);
+ }
+ ;
+
+%%
+
+
+int
+yylex ()
+{
+ static char *buf;
+ static size_t bufmax;
+ size_t bufpos;
+ int n;
+ int c;
+
+ for (;;)
+ {
+ c = *cur++;
+ switch (c)
+ {
+ case 0:
+ --cur;
+ return 0;
+
+ case ' ':
+ case '\t':
+ case '\n':
+ break;
+
+ case ':':
+ return COLON;
+
+ case ',':
+ return COMMA;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ /* Accumulate a number. */
+ n = 0;
+ for (;;)
+ {
+ n = n * 10 + c - '0';
+ c = *cur++;
+ switch (c)
+ {
+ default:
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ continue;
+ }
+ break;
+ }
+ --cur;
+ yylval.number = n;
+ return NUMBER;
+
+ default:
+ /* Accumulate a string. */
+ bufpos = 0;
+ for (;;)
+ {
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buf = xrealloc (buf, bufmax);
+ }
+ buf[bufpos++] = c;
+
+ c = *cur++;
+ switch (c)
+ {
+ default:
+ continue;
+
+ case 0:
+ case ':':
+ case ',':
+ case ' ':
+ case '\t':
+ --cur;
+ break;
+ }
+ break;
+ }
+
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buf = xrealloc (buf, bufmax);
+ }
+ buf[bufpos] = 0;
+
+ if (strcmp (buf, "file") == 0 || strcmp (buf, "File") == 0)
+ return FILE_KEYWORD;
+ if (strcmp (buf, "line") == 0)
+ return LINE_KEYWORD;
+ if (strcmp (buf, "number") == 0)
+ return NUMBER_KEYWORD;
+ yylval.string = xstrdup (buf);
+ return STRING;
+ }
+ }
+}
diff --git a/src/po-hash.h b/src/po-hash.h
new file mode 100644
index 0000000..051ff03
--- /dev/null
+++ b/src/po-hash.h
@@ -0,0 +1,25 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef SRC_PO_HASH_H
+#define SRC_PO_HASH_H
+
+int po_hash PARAMS ((const char *__string));
+
+#endif
diff --git a/src/po-lex.c b/src/po-lex.c
new file mode 100644
index 0000000..2f305b5
--- /dev/null
+++ b/src/po-lex.c
@@ -0,0 +1,549 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#include <libintl.h>
+#define _(str) gettext(str)
+
+#if HAVE_VPRINTF || HAVE_DOPRNT
+# if __STDC__
+# include <stdarg.h>
+# define VA_START(args, lastarg) va_start(args, lastarg)
+# else
+# include <varargs.h>
+# define VA_START(args, lastarg) va_start(args)
+# endif
+#else
+# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
+# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
+#endif
+
+#include "po-lex.h"
+#include "po-gram.h"
+#include "system.h"
+#include "error.h"
+#include "po-gram-gen2.h"
+
+
+static FILE *fp;
+lex_pos_ty gram_pos;
+size_t gram_max_allowed_errors = 20;
+static int pass_comments = 0;
+static int pass_obsolete_entries = 0;
+
+
+/* Prototypes for local functions. */
+static int lex_getc PARAMS ((void));
+static void lex_ungetc PARAMS ((int __ch));
+static int keyword_p PARAMS ((char *__s));
+static int control_sequence PARAMS ((void));
+
+
+void
+lex_open (fname)
+ const char *fname;
+{
+ fp = open_po_file (fname, &gram_pos.file_name);
+ if (!fp)
+ error (EXIT_FAILURE, errno,
+ _("error while opening \"%s\" for reading"), fname);
+
+ gram_pos.line_number = 1;
+}
+
+
+void
+lex_close ()
+{
+ if (error_message_count > 0)
+ error (EXIT_FAILURE, 0, _("found %d fatal errors"), error_message_count);
+
+ if (fp != stdin)
+ fclose (fp);
+ fp = NULL;
+ gram_pos.file_name = 0;
+ gram_pos.line_number = 0;
+ error_message_count = 0;
+}
+
+
+/* CAUTION: If you change this function, you must also make identical
+ changes to the macro of the same name in src/po-lex.h */
+
+#if !__STDC__ || !defined __GNUC__ || __GNUC__ == 1
+/* VARARGS1 */
+void
+# if defined VA_START && __STDC__
+po_gram_error (const char *fmt, ...)
+# else
+po_gram_error (fmt, va_alist)
+ const char *fmt;
+ va_dcl
+# endif
+{
+# ifdef VA_START
+ va_list ap;
+ char *buffer;
+
+ VA_START (ap, fmt);
+
+ vasprintf (&buffer, fmt, ap);
+ va_end (ap);
+ error_at_line (0, 0, gram_pos.file_name, gram_pos.line_number, "%s", buffer);
+# else
+ error_at_line (0, 0, gram_pos.file_name, gram_pos.line_number, fmt,
+ a1, a2, a3, a4, a5, a6, a7, a8);
+# endif
+
+ /* Some messages need more than one line. Continuation lines are
+ indicated by using "..." at the start of the string. We don't
+ increment the error counter for these continuation lines. */
+ if (*fmt == '.')
+ --error_message_count;
+ else if (error_message_count >= gram_max_allowed_errors)
+ error (EXIT_FAILURE, 0, _("too many errors, aborting"));
+}
+
+
+/* CAUTION: If you change this function, you must also make identical
+ changes to the macro of the same name in src/po-lex.h */
+
+/* VARARGS2 */
+void
+# if defined VA_START && __STDC__
+gram_error_at_line (const lex_pos_ty *pp, const char *fmt, ...)
+# else
+gram_error_at_line (pp, fmt, va_alist)
+ const lex_pos_ty *pp;
+ const char *fmt;
+ va_dcl
+# endif
+{
+# ifdef VA_START
+ va_list ap;
+ char *buffer;
+
+ VA_START (ap, fmt);
+
+ vasprintf (&buffer, fmt, ap);
+ va_end (ap);
+ error_at_line (0, 0, pp->file_name, pp->line_number, "%s", buffer);
+# else
+ error_at_line (0, 0, pp->file_name, pp->line_number, fmt,
+ a1, a2, a3, a4, a5, a6, a7, a8);
+# endif
+
+ /* Some messages need more than one line, or more than one location.
+ Continuation lines are indicated by using "..." at the start of the
+ string. We don't increment the error counter for these
+ continuation lines. */
+ if (*fmt == '.')
+ --error_message_count;
+ else if (error_message_count >= gram_max_allowed_errors)
+ error (EXIT_FAILURE, 0, _("too many errors, aborting"));
+}
+#endif
+
+
+static int
+lex_getc ()
+{
+ int c;
+
+ for (;;)
+ {
+ c = getc (fp);
+ switch (c)
+ {
+ case EOF:
+ if (ferror (fp))
+ error (EXIT_FAILURE, errno, _("error while reading \"%s\""),
+ gram_pos.file_name);
+ return EOF;
+
+ case '\n':
+ ++gram_pos.line_number;
+ return '\n';
+
+ case '\\':
+ c = getc (fp);
+ if (c != '\n')
+ {
+ if (c != EOF)
+ ungetc (c, fp);
+ return '\\';
+ }
+ ++gram_pos.line_number;
+ break;
+
+ default:
+ return c;
+ }
+ }
+}
+
+
+static void
+lex_ungetc (c)
+ int c;
+{
+ switch (c)
+ {
+ case EOF:
+ break;
+
+ case '\n':
+ --gram_pos.line_number;
+ /* FALLTHROUGH */
+
+ default:
+ ungetc (c, fp);
+ break;
+ }
+}
+
+
+static int
+keyword_p (s)
+ char *s;
+{
+ if (!strcmp (s, "domain"))
+ return DOMAIN;
+ if (!strcmp (s, "msgid"))
+ return MSGID;
+ if (!strcmp (s, "msgstr"))
+ return MSGSTR;
+ po_gram_error (_("keyword \"%s\" unknown"), s);
+ return NAME;
+}
+
+
+static int
+control_sequence ()
+{
+ int c;
+ int val;
+ int max;
+
+ c = lex_getc ();
+ switch (c)
+ {
+ case 'n':
+ return '\n';
+
+ case 't':
+ return '\t';
+
+ case 'b':
+ return '\b';
+
+ case 'r':
+ return '\r';
+
+ case 'f':
+ return '\f';
+
+ case 'v':
+ return '\v';
+
+ case '\\':
+ case '"':
+ return c;
+
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ val = 0;
+ for (max = 0; max < 3; ++max)
+ {
+ /* Warning: not portable, can't depend on '0'..'7' ordering. */
+ val = val * 8 + c - '0';
+ c = lex_getc ();
+ switch (c)
+ {
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ continue;
+
+ default:
+ break;
+ }
+ break;
+ }
+ lex_ungetc (c);
+ return val;
+
+ case 'x': case 'X':
+ c = lex_getc ();
+ if (c == EOF || !isxdigit (c))
+ break;
+
+ val = 0;
+ for (;;)
+ {
+ val *= 16;
+ if (isdigit (c))
+ /* Warning: not portable, can't depend on '0'..'9' ordering */
+ val += c - '0';
+ else if (isupper (c))
+ /* Warning: not portable, can't depend on 'A'..'F' ordering */
+ val += c - 'A' + 10;
+ else
+ /* Warning: not portable, can't depend on 'a'..'f' ordering */
+ val += c - 'a' + 10;
+
+ c = lex_getc ();
+ switch (c)
+ {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ continue;
+
+ default:
+ break;
+ }
+ break;
+ }
+ return val;
+ }
+ po_gram_error (_("invalid control sequence"));
+ return ' ';
+}
+
+
+int
+po_gram_lex ()
+{
+ static char *buf;
+ static size_t bufmax;
+ int c;
+ size_t bufpos;
+
+ for (;;)
+ {
+ c = lex_getc ();
+ switch (c)
+ {
+ case EOF:
+ /* Yacc want this for end of file. */
+ return 0;
+
+ case ' ':
+ case '\t':
+ case '\n':
+ case '\r':
+ case '\f':
+ case '\v':
+ break;
+
+ case '#':
+ /* Accumulate comments into a buffer. If we have been asked
+ to pass comments, generate a COMMENT token, otherwise
+ discard it. */
+ c = lex_getc ();
+ if (c == '~' && pass_obsolete_entries)
+ /* A special comment beginning with #~ is found. This
+ is the format for obsolete entries and if we are
+ asked to return them is entries not as comments be
+ simply stop processing the comment here. The
+ following characters are expected to be well formed. */
+ break;
+
+ if (pass_comments)
+ {
+ bufpos = 0;
+ while (1)
+ {
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buf = xrealloc (buf, bufmax);
+ }
+ if (c == EOF || c == '\n')
+ break;
+
+ buf[bufpos++] = c;
+ c = lex_getc ();
+ }
+ buf[bufpos] = 0;
+
+ po_gram_lval.string = buf;
+ return COMMENT;
+ }
+ else
+ /* We do this in separate loop because collecting large
+ comments while they get not passed to the upper layers
+ is not very effective. */
+ while (c != EOF && c != '\n')
+ c = lex_getc ();
+ break;
+
+ case '"':
+ bufpos = 0;
+ while (1)
+ {
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buf = xrealloc (buf, bufmax);
+ }
+ c = lex_getc ();
+ if (c == '\n')
+ {
+ po_gram_error (_("end-of-line within string"));
+ break;
+ }
+ if (c == EOF)
+ {
+ po_gram_error (_("end-of-file within string"));
+ break;
+ }
+ if (c == '"')
+ break;
+
+ if (c == '\\')
+ c = control_sequence ();
+
+ buf[bufpos++] = c;
+ }
+ buf[bufpos] = 0;
+
+ po_gram_lval.string = xstrdup (buf);
+ return STRING;
+
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case '_': case '$':
+ bufpos = 0;
+ for (;;)
+ {
+ if (bufpos + 1 >= bufmax)
+ {
+ bufmax += 100;
+ buf = xrealloc (buf, bufmax);
+ }
+ buf[bufpos++] = c;
+ c = lex_getc ();
+ switch (c)
+ {
+ default:
+ break;
+ case 'a': case 'b': case 'c': case 'd':
+ case 'e': case 'f': case 'g': case 'h':
+ case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p':
+ case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case 'A': case 'B': case 'C': case 'D':
+ case 'E': case 'F': case 'G': case 'H':
+ case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P':
+ case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case '_': case '$':
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ continue;
+ }
+ break;
+ }
+ lex_ungetc (c);
+
+ buf[bufpos] = 0;
+
+ c = keyword_p (buf);
+ if (c == NAME)
+ po_gram_lval.string = xstrdup (buf);
+ return c;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ /* I know, we don't need numbers, yet. */
+ bufpos = 0;
+ for (;;)
+ {
+ if (bufpos + 1 >= bufmax)
+ {
+ bufmax += 100;
+ buf = xrealloc (buf, bufmax + 1);
+ }
+ buf[bufpos++] = c;
+ c = lex_getc ();
+ switch (c)
+ {
+ default:
+ break;
+
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ continue;
+ }
+ break;
+ }
+ lex_ungetc (c);
+
+ buf[bufpos] = 0;
+
+ po_gram_lval.number = atol (buf);
+ return NUMBER;
+
+ default:
+ /* This will cause a syntax error. */
+ return JUNK;
+ }
+ }
+}
+
+
+void
+po_lex_pass_comments (flag)
+ int flag;
+{
+ pass_comments = (flag != 0);
+}
+
+
+void
+po_lex_pass_obsolete_entries (flag)
+ int flag;
+{
+ pass_obsolete_entries = (flag != 0);
+}
diff --git a/src/po-lex.h b/src/po-lex.h
new file mode 100644
index 0000000..fd95d97
--- /dev/null
+++ b/src/po-lex.h
@@ -0,0 +1,83 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _PO_LEX_H
+#define _PO_LEX_H
+
+#include <sys/types.h>
+#include "error.h"
+
+typedef struct lex_pos_ty lex_pos_ty;
+struct lex_pos_ty
+{
+ char *file_name;
+ size_t line_number;
+};
+
+
+/* Global variables from po-lex.c. */
+extern lex_pos_ty gram_pos;
+extern size_t gram_max_allowed_errors;
+
+
+void lex_open PARAMS ((const char *__fname));
+void lex_close PARAMS ((void));
+int po_gram_lex PARAMS ((void));
+void po_lex_pass_comments PARAMS ((int __flag));
+void po_lex_pass_obsolete_entries PARAMS ((int __flag));
+
+
+/* GCC is smart enough to allow optimizations like this. */
+#if __STDC__ && defined __GNUC__ && __GNUC__ >= 2
+
+
+/* CAUTION: If you change this macro, you must also make identical
+ changes to the function of the same name in src/po-lex.c */
+
+# define po_gram_error(fmt, args...) \
+ do { \
+ error_at_line (0, 0, gram_pos.file_name, gram_pos.line_number, \
+ fmt, ## args); \
+ if (*fmt == '.') \
+ --error_message_count; \
+ else if (error_message_count >= gram_max_allowed_errors) \
+ error (1, 0, _("too many errors, aborting")); \
+ } while (0)
+
+
+/* CAUTION: If you change this macro, you must also make identical
+ changes to the function of the same name in src/po-lex.c */
+
+# define gram_error_at_line(pos, fmt, args...) \
+ do { \
+ error_at_line (0, 0, (pos)->file_name, (pos)->line_number, \
+ fmt, ## args); \
+ if (*fmt == '.') \
+ --error_message_count; \
+ else if (error_message_count >= gram_max_allowed_errors) \
+ error (1, 0, _("too many errors, aborting")); \
+ } while (0)
+#else
+void po_gram_error PARAMS ((const char *__fmt, ...));
+void gram_error_at_line PARAMS ((const lex_pos_ty *__pos, const char *__fmt,
+ ...));
+#endif
+
+
+#endif
diff --git a/src/po.c b/src/po.c
new file mode 100644
index 0000000..2bdadb7
--- /dev/null
+++ b/src/po.c
@@ -0,0 +1,253 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#include "po.h"
+#include "po-hash.h"
+#include "system.h"
+
+/* Prototypes for local functions. */
+static void po_parse_brief PARAMS ((po_ty *__pop));
+static void po_parse_debrief PARAMS ((po_ty *__pop));
+
+/* Methods used indirectly by po_scan. */
+static void po_directive_domain PARAMS ((po_ty *__pop, char *__name));
+static void po_directive_message PARAMS ((po_ty *__pop, char *__msgid,
+ lex_pos_ty *__msgid_pos,
+ char *__msgstr,
+ lex_pos_ty *__msgstr_pos));
+static void po_comment PARAMS ((po_ty *__pop, const char *__s));
+static void po_comment_dot PARAMS ((po_ty *__pop, const char *__s));
+static void po_comment_filepos PARAMS ((po_ty *__pop, const char *__name,
+ int __line));
+static void po_comment_special PARAMS ((po_ty *pop, const char *s));
+
+/* Local variables. */
+static po_ty *callback_arg;
+
+
+po_ty *
+po_alloc (pomp)
+ po_method_ty *pomp;
+{
+ po_ty *pop;
+
+ pop = xmalloc (pomp->size);
+ pop->method = pomp;
+ if (pomp->constructor)
+ pomp->constructor (pop);
+ return pop;
+}
+
+
+void
+po_free (pop)
+ po_ty *pop;
+{
+ if (pop->method->destructor)
+ pop->method->destructor (pop);
+ free (pop);
+}
+
+
+void
+po_scan (pop, filename)
+ po_ty *pop;
+ const char *filename;
+{
+ extern int po_gram_parse PARAMS ((void));
+
+ /* The parse will call the po_callback_... functions (see below)
+ when the various directive are recognised. The callback_arg
+ variable is used to tell these functions which instance is to
+ have the relevant method invoked. */
+ callback_arg = pop;
+
+ /* Open the file and parse it. */
+ lex_open (filename);
+ po_parse_brief (pop);
+ po_gram_parse ();
+ po_parse_debrief (pop);
+ lex_close ();
+ callback_arg = 0;
+}
+
+
+static void
+po_parse_brief (pop)
+ po_ty *pop;
+{
+ if (pop->method->parse_brief)
+ pop->method->parse_brief (pop);
+}
+
+
+static void
+po_parse_debrief (pop)
+ po_ty *pop;
+{
+ if (pop->method->parse_debrief)
+ pop->method->parse_debrief (pop);
+}
+
+
+static void
+po_directive_domain (pop, name)
+ po_ty *pop;
+ char *name;
+{
+ if (pop->method->directive_domain)
+ pop->method->directive_domain (pop, name);
+}
+
+
+void
+po_callback_domain (name)
+ char *name;
+{
+ /* assert(callback_arg); */
+ po_directive_domain (callback_arg, name);
+}
+
+
+static void
+po_directive_message (pop, msgid, msgid_pos, msgstr, msgstr_pos)
+ po_ty *pop;
+ char *msgid;
+ lex_pos_ty *msgid_pos;
+ char *msgstr;
+ lex_pos_ty *msgstr_pos;
+{
+ if (pop->method->directive_message)
+ pop->method->directive_message (pop, msgid, msgid_pos, msgstr, msgstr_pos);
+}
+
+
+void
+po_callback_message (msgid, msgid_pos, msgstr, msgstr_pos)
+ char *msgid;
+ lex_pos_ty *msgid_pos;
+ char *msgstr;
+ lex_pos_ty *msgstr_pos;
+{
+ /* assert(callback_arg); */
+ po_directive_message (callback_arg, msgid, msgid_pos, msgstr, msgstr_pos);
+}
+
+
+static void
+po_comment_special (pop, s)
+ po_ty *pop;
+ const char *s;
+{
+ if (pop->method->comment_special != NULL)
+ pop->method->comment_special (pop, s);
+}
+
+
+static void
+po_comment (pop, s)
+ po_ty *pop;
+ const char *s;
+{
+ if (pop->method->comment != NULL)
+ pop->method->comment (pop, s);
+}
+
+
+static void
+po_comment_dot (pop, s)
+ po_ty *pop;
+ const char *s;
+{
+ if (pop->method->comment_dot != NULL)
+ pop->method->comment_dot (pop, s);
+}
+
+
+/* This function is called by po_gram_lex() whenever a comment is
+ seen. It analyzes the comment to see what sort it is, and then
+ dispatces it to the appropriate method. */
+void
+po_callback_comment (s)
+ const char *s;
+{
+ /* assert(callback_arg); */
+ if (*s == '.')
+ po_comment_dot (callback_arg, s + 1);
+ else if (*s == ':')
+ {
+ /* Parse the file location string. If the parse succeeds, the
+ appropriate callback will be invoked. If the parse fails,
+ the po_hash_parse function will return non-zero - so pretend
+ it was a normal comment. */
+ if (po_hash (s + 1) == 0)
+ /* Do nothing, it is a GNU-style file pos line. */ ;
+ else
+ po_comment (callback_arg, s + 1);
+ }
+ else if (*s == ',' || *s == '!')
+ /* Get all entries in the special comment line. */
+ po_comment_special (callback_arg, s + 1);
+ else
+ {
+ /* It looks like a plain vanilla comment, but Solaris-style file
+ position lines do, too. Rather than parse the lot, only look
+ at lines that could start with "# File..." This minimizes
+ memory leaks on failed parses. If the parse succeeds, the
+ appropriate callback will be invoked. */
+ if (s[0] == ' ' && (s[1] == 'F' || s[1] == 'f') && s[2] == 'i'
+ && po_hash (s) == 0)
+ /* Do nothing, it is a Sun-style file pos line. */ ;
+ else
+ po_comment (callback_arg, s);
+ }
+}
+
+
+static void
+po_comment_filepos (pop, name, line)
+ po_ty *pop;
+ const char *name;
+ int line;
+{
+ if (pop->method->comment_filepos)
+ pop->method->comment_filepos (pop, name, line);
+}
+
+
+void
+po_callback_comment_filepos (name, line)
+ const char *name;
+ int line;
+{
+ /* assert(callback_arg); */
+ po_comment_filepos (callback_arg, name, line);
+}
diff --git a/src/po.h b/src/po.h
new file mode 100644
index 0000000..4800a6f
--- /dev/null
+++ b/src/po.h
@@ -0,0 +1,129 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef SRC_PO_H
+#define SRC_PO_H
+
+#include "po-lex.h"
+
+/* Note: the _t suffix is reserved by ANSI C, so the _ty suffix is
+ used to indicate a type name */
+
+/* The following pair of structures cooperate to create an "Object" in
+ the OO sense, we are simply doing it manually, rather than with the
+ help of an OO compiler. This implementation allows polymorphism
+ and inheritance - more than enough for the immediate needs.
+
+ This first structure contains pointers to functions. Each function
+ is a method for the class (base or derived).
+
+ Use a NULL pointer where no action is required. */
+
+/* Forward decaration. */
+struct po_ty;
+
+
+typedef struct po_method_ty po_method_ty;
+struct po_method_ty
+{
+ /* how many bytes to malloc for this class */
+ size_t size;
+
+ /* what to do immediately after the instance is malloc()ed */
+ void (*constructor) PARAMS ((struct po_ty *__pop));
+
+ /* what to do immediately before the instance is free()ed */
+ void (*destructor) PARAMS ((struct po_ty *__pop));
+
+ /* what to do with a domain directive */
+ void (*directive_domain) PARAMS ((struct po_ty *__pop, char *__name));
+
+ /* what to do with a message directive */
+ void (*directive_message) PARAMS ((struct po_ty *__pop, char *__msgid,
+ lex_pos_ty *__msgid_pos, char *__msgstr,
+ lex_pos_ty *__msgstr_pos));
+
+ /* This method is invoked before the parse, but after the file is
+ opened by the lexer. */
+ void (*parse_brief) PARAMS ((struct po_ty *__pop));
+
+ /* This method is invoked after the parse, but before the file is
+ closed by the lexer. The intention is to make consistency checks
+ against the file here, and emit the errors through the lex_error*
+ functions. */
+ void (*parse_debrief) PARAMS ((struct po_ty *__pop));
+
+ /* What to do with a plain-vanilla comment - the expectation is that
+ they will be accumulated, and added to the next message
+ definition seen. Or completely ignored. */
+ void (*comment) PARAMS ((struct po_ty *__pop, const char *__s));
+
+ /* What to do with a comment that starts with a dot (i.e. extracted
+ by xgettext) - the expectation is that they will be accumulated,
+ and added to the next message definition seen. Or completely
+ ignored. */
+ void (*comment_dot) PARAMS ((struct po_ty *__pop, const char *__s));
+
+ /* What to do with a file position seen in a comment (i.e. a message
+ location comment extracted by xgettext) - the expectation is that
+ they will be accumulated, and added to the next message
+ definition seen. Or completely ignored. */
+ void (*comment_filepos) PARAMS ((struct po_ty *__pop, const char *__s,
+ int __line));
+
+ /* What to do with a comment that starts with a `!' - this is a
+ special comment. One of the possible uses is to indicate a
+ inexact translation. */
+ void (*comment_special) PARAMS ((struct po_ty *__pop, const char *__s));
+};
+
+
+/* This next structure defines the base class passed to the methods.
+ Derived methods will often need to cast their first argument before
+ using it (this correponds to the implicit ``this'' argument of many
+ C++ implementations).
+
+ When declaring derived classes, use the PO_BASE_TY define at the
+ start of the structure, to declare inherited instance variables,
+ etc. */
+
+#define PO_BASE_TY \
+ po_method_ty *method;
+
+typedef struct po_ty po_ty;
+struct po_ty
+{
+ PO_BASE_TY
+};
+
+
+po_ty *po_alloc PARAMS ((po_method_ty *__jtable));
+void po_scan PARAMS ((po_ty *__pop, const char *__filename));
+void po_free PARAMS ((po_ty *__pop));
+
+/* Callbacks used by po-gram.y or po-hash.y or po-lex.c, indirectly
+ from po_scan. */
+void po_callback_domain PARAMS ((char *__name));
+void po_callback_message PARAMS ((char *__msgid, lex_pos_ty *__msgid_pos,
+ char *__msgstr, lex_pos_ty *__msgstr_pos));
+void po_callback_comment PARAMS ((const char *__s));
+void po_callback_comment_dot PARAMS ((const char *__s));
+void po_callback_comment_filepos PARAMS ((const char *__s, int __line));
+
+#endif
diff --git a/src/str-list.c b/src/str-list.c
new file mode 100644
index 0000000..4000745
--- /dev/null
+++ b/src/str-list.c
@@ -0,0 +1,146 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include "system.h"
+#include "str-list.h"
+
+
+string_list_ty *
+string_list_alloc ()
+{
+ string_list_ty *slp;
+
+ slp = (string_list_ty *) xmalloc (sizeof (*slp));
+ slp->item = NULL;
+ slp->nitems = 0;
+ slp->nitems_max = 0;
+
+ return slp;
+}
+
+
+void
+string_list_append (slp, s)
+ string_list_ty *slp;
+ const char *s;
+{
+ /* Grow the list. */
+ if (slp->nitems >= slp->nitems_max)
+ {
+ size_t nbytes;
+
+ slp->nitems_max = slp->nitems_max * 2 + 4;
+ nbytes = slp->nitems_max * sizeof (slp->item[0]);
+ slp->item = (const char **) xrealloc (slp->item, nbytes);
+ }
+
+ /* Add a copy of the string to the end of the list. */
+ slp->item[slp->nitems++] = xstrdup (s);
+}
+
+
+void
+string_list_append_unique (slp, s)
+ string_list_ty *slp;
+ const char *s;
+{
+ size_t j;
+
+ /* Do not if the string is already in the list. */
+ for (j = 0; j < slp->nitems; ++j)
+ if (strcmp (slp->item[j], s) == 0)
+ return;
+
+ /* Grow the list. */
+ if (slp->nitems >= slp->nitems_max)
+ {
+ slp->nitems_max = slp->nitems_max * 2 + 4;
+ slp->item = (const char **) xrealloc (slp->item,
+ slp->nitems_max
+ * sizeof (slp->item[0]));
+ }
+
+ /* Add a copy of the string to the end of the list. */
+ slp->item[slp->nitems++] = xstrdup (s);
+}
+
+
+void
+string_list_free (slp)
+ string_list_ty *slp;
+{
+ size_t j;
+
+ for (j = 0; j < slp->nitems; ++j)
+ free ((char *) slp->item[j]);
+ if (slp->item != NULL)
+ free (slp->item);
+ free (slp);
+}
+
+
+char *
+string_list_join (slp)
+ const string_list_ty *slp;
+{
+ size_t len;
+ size_t j;
+ char *result;
+ size_t pos;
+
+ len = 1;
+ for (j = 0; j < slp->nitems; ++j)
+ {
+ if (j)
+ ++len;
+ len += strlen (slp->item[j]);
+ }
+ result = xmalloc (len);
+ pos = 0;
+ for (j = 0; j < slp->nitems; ++j)
+ {
+ if (j)
+ result[pos++] = ' ';
+ len = strlen (slp->item[j]);
+ memcpy (result + pos, slp->item[j], len);
+ pos += len;
+ }
+ result[pos] = 0;
+ return result;
+}
+
+
+int
+string_list_member (slp, s)
+ const string_list_ty *slp;
+ const char *s;
+{
+ size_t j;
+
+ for (j = 0; j < slp->nitems; ++j)
+ if (strcmp (slp->item[j], s) == 0)
+ return 1;
+ return 0;
+}
diff --git a/src/str-list.h b/src/str-list.h
new file mode 100644
index 0000000..9e2b998
--- /dev/null
+++ b/src/str-list.h
@@ -0,0 +1,50 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef SRC_STR_LIST_H
+#define SRC_STR_LIST_H 1
+
+#ifdef STC_HEADERS
+# define __need_size_t
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <sys/types.h>
+# include <stdio.h>
+#endif
+
+/* Type describing list of strings implemented using a dynamic array. */
+typedef struct string_list_ty string_list_ty;
+struct string_list_ty
+{
+ const char **item;
+ size_t nitems;
+ size_t nitems_max;
+};
+
+
+string_list_ty *string_list_alloc PARAMS ((void));
+void string_list_append PARAMS ((string_list_ty *__slp, const char *__s));
+void string_list_append_unique PARAMS ((string_list_ty *__slp,
+ const char *__s));
+void string_list_free PARAMS ((string_list_ty *__slp));
+char *string_list_join PARAMS ((const string_list_ty *__slp));
+int string_list_member PARAMS ((const string_list_ty *__slp, const char *__s));
+
+#endif
diff --git a/src/xget-lex.c b/src/xget-lex.c
new file mode 100644
index 0000000..a838e4c
--- /dev/null
+++ b/src/xget-lex.c
@@ -0,0 +1,1319 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#include "dir-list.h"
+#include "error.h"
+#include "system.h"
+#include "libgettext.h"
+#include "str-list.h"
+#include "xget-lex.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+#define _(s) gettext(s)
+
+
+/* The ANSI C standard defines several phases of translation:
+
+ 1. Terminate line by \n, regardless of the external representation
+ of a text line. Stdio does this for us.
+
+ 2. Convert trigraphs to their single character equivalents.
+
+ 3. Concatenate each line ending in backslash (\) with the following
+ line.
+
+ 4. Replace each comment with a space character.
+
+ 5. Parse each resulting logical line as preprocessing tokens a
+ white space.
+
+ 6. Recognize and carry out directives (it also expands macros on
+ non-directive lines, which we do not do here).
+
+ 7. Replaces escape sequences within character strings with their
+ single character equivalents (we do this in step 5, because we
+ don't have to worry about the #include argument).
+
+ 8. Concatenates adjacent string literals to form single string
+ literals (because we don't expand macros, there are a few things
+ we will miss).
+
+ 9. Converts the remaining preprocessing tokens to C tokens and
+ discards any white space from the translation unit.
+
+ This lexer implements the above, and presents the scanner (in
+ xgettext.c) with a stream of C tokens. The comments are
+ accumulated in a buffer, and given to xgettext when asked for. */
+
+enum token_type_ty
+{
+ token_type_character_constant,
+ token_type_eof,
+ token_type_eoln,
+ token_type_hash,
+ token_type_lp,
+ token_type_comma,
+ token_type_name,
+ token_type_number,
+ token_type_string_literal,
+ token_type_symbol,
+ token_type_white_space
+};
+typedef enum token_type_ty token_type_ty;
+
+typedef struct token_ty token_ty;
+struct token_ty
+{
+ token_type_ty type;
+ char *string;
+ long number;
+ int line_number;
+};
+
+
+static const char *file_name;
+static char *logical_file_name;
+static int line_number;
+static FILE *fp;
+static int trigraphs;
+static int cplusplus_comments;
+static string_list_ty *comment;
+static string_list_ty *keywords;
+static int default_keywords = 1;
+
+/* These are for tracking whether comments count as immediately before
+ keyword. */
+static int last_comment_line = -1;
+static int last_non_comment_line = -1;
+static int newline_count = 0;
+
+
+/* Prototypes for local functions. */
+static int phase1_getc PARAMS ((void));
+static void phase1_ungetc PARAMS ((int __c));
+static int phase2_getc PARAMS ((void));
+static void phase2_ungetc PARAMS ((int __c));
+static int phase3_getc PARAMS ((void));
+static void phase3_ungetc PARAMS ((int __c));
+static int phase4_getc PARAMS ((void));
+static void phase4_ungetc PARAMS ((int __c));
+static int phase7_getc PARAMS ((void));
+static void phase7_ungetc PARAMS ((int __c));
+static void phase5_get PARAMS ((token_ty *__tp));
+static void phase5_unget PARAMS ((token_ty *__tp));
+static void phaseX_get PARAMS ((token_ty *__tp));
+static void phase6_get PARAMS ((token_ty *__tp));
+static void phase6_unget PARAMS ((token_ty *__tp));
+static void phase8_get PARAMS ((token_ty *__tp));
+
+
+
+void
+xgettext_lex_open (fn)
+ const char *fn;
+{
+ char *new_name;
+
+ if (strcmp (fn, "-") == 0)
+ {
+ new_name = xstrdup (_("standard input"));
+ logical_file_name = xstrdup (new_name);
+ fp = stdin;
+ }
+ else if (*fn == '/')
+ {
+ new_name = xstrdup (fn);
+ fp = fopen (fn, "r");
+ if (fp == NULL)
+ error (EXIT_FAILURE, errno, _("\
+error while opening \"%s\" for reading"), fn);
+ logical_file_name = xstrdup (new_name);
+ }
+ else
+ {
+ size_t len1, len2;
+ int j;
+ const char *dir;
+
+ len2 = strlen (fn);
+ for (j = 0; ; ++j)
+ {
+ dir = dir_list_nth (j);
+ if (dir == NULL)
+ error (EXIT_FAILURE, ENOENT, _("\
+error while opening \"%s\" for reading"), fn);
+
+ if (dir[0] =='.' && dir[1] == '\0')
+ new_name = xstrdup (fn);
+ else
+ {
+ len1 = strlen (dir);
+ new_name = xmalloc (len1 + len2 + 2);
+ stpcpy (stpcpy (stpcpy (new_name, dir), "/"), fn);
+ }
+
+ fp = fopen (new_name, "r");
+ if (fp != NULL)
+ break;
+
+ if (errno != ENOENT)
+ error (EXIT_FAILURE, errno, _("\
+error while opening \"%s\" for reading"), new_name);
+ free (new_name);
+ }
+
+ /* Note that the NEW_NAME variable contains the actual file name
+ and the logical file name is what is reported by xgettext. In
+ this case NEW_NAME is set to the file which was found along the
+ directory search path, and LOGICAL_FILE_NAME is is set to the
+ file name which was searched for. */
+ logical_file_name = xstrdup (fn);
+ }
+
+ file_name = new_name;
+ line_number = 1;
+}
+
+
+void
+xgettext_lex_close ()
+{
+ if (fp != stdin)
+ fclose (fp);
+ free ((char *) file_name);
+ free (logical_file_name);
+ fp = NULL;
+ file_name = NULL;
+ logical_file_name = NULL;
+ line_number = 0;
+}
+
+
+/* 1. Terminate line by \n, regardless of the external representation of
+ a text line. Stdio does this for us, we just need to check that
+ there are no I/O errors, and cope with potentially 2 characters of
+ pushback, not just the one that ungetc can cope with. */
+
+/* Maximum used guaranteed to be < 4. */
+static unsigned char phase1_pushback[4];
+static int phase1_pushback_length;
+
+
+static int
+phase1_getc ()
+{
+ int c;
+
+ if (phase1_pushback_length)
+ {
+ c = phase1_pushback[--phase1_pushback_length];
+ if (c == '\n')
+ ++line_number;
+ return c;
+ }
+ while (1)
+ {
+ c = getc (fp);
+ switch (c)
+ {
+ case EOF:
+ if (ferror (fp))
+ {
+ bomb:
+ error (EXIT_FAILURE, errno, _("\
+error while reading \"%s\""), file_name);
+ }
+ return EOF;
+
+ case '\n':
+ ++line_number;
+ return '\n';
+
+ case '\\':
+ c = getc (fp);
+ if (c == EOF)
+ {
+ if (ferror (fp))
+ goto bomb;
+ return '\\';
+ }
+ if (c != '\n')
+ {
+ ungetc (c, fp);
+ return '\\';
+ }
+ ++line_number;
+ break;
+
+ default:
+ return c;
+ }
+ }
+}
+
+
+static void
+phase1_ungetc (c)
+ int c;
+{
+ switch (c)
+ {
+ case EOF:
+ break;
+
+ case '\n':
+ --line_number;
+ /* FALLTHROUGH */
+
+ default:
+ phase1_pushback[phase1_pushback_length++] = c;
+ break;
+ }
+}
+
+
+/* 2. Convert trigraphs to their single character equivalents. Most
+ sane human beings vomit copiously at the mention of trigraphs, which
+ is why they are on option. */
+
+/* Maximum used guaranteed to be < 4. */
+static unsigned char phase2_pushback[4];
+static int phase2_pushback_length;
+
+
+static int
+phase2_getc ()
+{
+ int c;
+
+ if (phase2_pushback_length)
+ return phase2_pushback[--phase2_pushback_length];
+ if (!trigraphs)
+ return phase1_getc ();
+
+ c = phase1_getc ();
+ if (c != '?')
+ return c;
+ c = phase1_getc ();
+ if (c != '?')
+ {
+ phase1_ungetc (c);
+ return '?';
+ }
+ c = phase1_getc ();
+ switch (c)
+ {
+ case '(':
+ return '[';
+ case '/':
+ return '\\';
+ case ')':
+ return ']';
+ case '\'':
+ return '^';
+ case '<':
+ return '{';
+ case '!':
+ return '|';
+ case '>':
+ return '}';
+ case '-':
+ return '~';
+ case '#':
+ return '=';
+ }
+ phase1_ungetc (c);
+ phase1_ungetc ('?');
+ return '?';
+}
+
+
+static void
+phase2_ungetc (c)
+ int c;
+{
+ if (c != EOF)
+ phase2_pushback[phase2_pushback_length++] = c;
+}
+
+
+/* 3. Concatenate each line ending in backslash (\) with the following
+ line. Basically, all you need to do is elide "\\\n" sequences from
+ the input. */
+
+/* Maximum used guaranteed to be < 4. */
+static unsigned char phase3_pushback[4];
+static int phase3_pushback_length;
+
+
+static int
+phase3_getc ()
+{
+ if (phase3_pushback_length)
+ return phase3_pushback[--phase3_pushback_length];
+ for (;;)
+ {
+ int c = phase2_getc ();
+ if (c != '\\')
+ return c;
+ c = phase2_getc ();
+ if (c != '\n')
+ {
+ phase2_ungetc (c);
+ return '\\';
+ }
+ }
+}
+
+
+static void
+phase3_ungetc (c)
+ int c;
+{
+ if (c != EOF)
+ phase3_pushback[phase3_pushback_length++] = c;
+}
+
+
+/* 4. Replace each comment that is not inside a character constant or
+ string literal with a space character. We need to remember the
+ comment for later, because it may be attached to a keyword string.
+ We also optionally understand C++ comments. */
+
+static int
+phase4_getc ()
+{
+ static char *buffer;
+ static size_t bufmax;
+ size_t buflen;
+ int c;
+ int state;
+
+ c = phase3_getc ();
+ if (c != '/')
+ return c;
+ c = phase3_getc ();
+ switch (c)
+ {
+ default:
+ phase3_ungetc (c);
+ return '/';
+
+ case '*':
+ /* C comment. */
+ buflen = 0;
+ state = 0;
+ if (comment == NULL)
+ comment = string_list_alloc ();
+ while (1)
+ {
+ c = phase3_getc ();
+ if (c == EOF)
+ break;
+ /* We skip all leading white space, but not EOLs. */
+ if (buflen == 0 && isspace (c) && c != '\n')
+ continue;
+ if (buflen >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[buflen++] = c;
+ switch (c)
+ {
+ case '\n':
+ --buflen;
+ while (buflen >= 1 && (buffer[buflen - 1] == ' '
+ || buffer[buflen - 1] == '\t'))
+ --buflen;
+ buffer[buflen] = 0;
+ string_list_append (comment, buffer);
+ buflen = 0;
+ state = 0;
+ continue;
+
+ case '*':
+ state = 1;
+ continue;
+
+ case '/':
+ if (state == 1)
+ {
+ buflen -= 2;
+ while (buflen >= 1 && (buffer[buflen - 1] == ' '
+ || buffer[buflen - 1] == '\t'))
+ --buflen;
+ buffer[buflen] = 0;
+ string_list_append (comment, buffer);
+ break;
+ }
+ /* FALLTHROUGH */
+
+ default:
+ state = 0;
+ continue;
+ }
+ break;
+ }
+ last_comment_line = newline_count;
+ return ' ';
+
+ case '/':
+ /* C++ comment. */
+ if (!cplusplus_comments)
+ {
+ phase3_ungetc ('/');
+ return '/';
+ }
+ buflen = 0;
+ while (1)
+ {
+ c = phase3_getc ();
+ if (c == '\n' || c == EOF)
+ break;
+ if (buflen >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[buflen++] = c;
+ }
+ if (buflen >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[buflen] = 0;
+ if (comment == NULL)
+ comment = string_list_alloc ();
+ string_list_append (comment, buffer);
+ last_comment_line = newline_count;
+ return '\n';
+ }
+}
+
+
+static void
+phase4_ungetc (c)
+ int c;
+{
+ phase3_ungetc (c);
+}
+
+
+/* 7. Replace escape sequences within character strings with their
+ single character equivalents. This is called from phase 5, because
+ we don't have to worry about the #include argument. There are
+ pathological cases which could bite us (like the DOS directory
+ separator), but just pretend it can't happen. */
+
+#define P7_QUOTES (1000 + '"')
+#define P7_QUOTE (1000 + '\'')
+#define P7_NEWLINE (1000 + '\n')
+
+static int
+phase7_getc ()
+{
+ int c, n, j;
+
+ /* Use phase 3, because phase 4 elides comments. */
+ c = phase3_getc ();
+
+ /* Return a magic newline indicator, so that we can distinguish
+ between the user requesting a newline in the string (e.g. using
+ "\n" or "\15") from the user failing to terminate the string or
+ character constant. The ANSI C standard says: 3.1.3.4 Character
+ Constants contain ``any character except single quote, backslash or
+ newline; or an escape sequence'' and 3.1.4 String Literals contain
+ ``any character except double quote, backslash or newline; or an
+ escape sequence''.
+
+ Most compilers give a fatal error in this case, however gcc is
+ stupidly silent, even though this is a very common typo. OK, so
+ gcc --pedantic will tell me, but that gripes about too much other
+ stuff. Could I have a ``gcc -Wnewline-in-string'' option, or
+ better yet a ``gcc -fno-newline-in-string'' option, please? Gcc is
+ also inconsistent between string literals and character constants:
+ you may not embed newlines in character constants; try it, you get
+ a useful diagnostic. --PMiller */
+ if (c == '\n')
+ return P7_NEWLINE;
+
+ if (c == '"')
+ return P7_QUOTES;
+ if (c == '\'')
+ return P7_QUOTE;
+ if (c != '\\')
+ return c;
+ c = phase3_getc ();
+ switch (c)
+ {
+ default:
+ /* Unknown escape sequences really should be an error, but just
+ ignore them, and let the real compiler complain. */
+ phase3_ungetc (c);
+ return '\\';
+
+ case '"':
+ case '\'':
+ case '?':
+ case '\\':
+ return c;
+
+ /* The \a and \v escapes were added by the ANSI C Standard.
+ Prior to the Standard, most compilers did not have them.
+ Because we need the same program on all platforms we don't
+ provide support for them here.
+
+ The gcc sources comment that \a is commonly available in
+ pre-ANSI compilers. --PMiller */
+
+ case 'b':
+ return '\b';
+
+ /* The \e escape is preculiar to gcc, and assumes an ASCII
+ character set (or superset). We don't provide support for it
+ here. */
+
+ case 'f':
+ return '\f';
+ case 'n':
+ return '\n';
+ case 'r':
+ return '\r';
+ case 't':
+ return '\t';
+
+ case 'x':
+ c = phase3_getc ();
+ switch (c)
+ {
+ default:
+ phase3_ungetc (c);
+ phase3_ungetc ('x');
+ return '\\';
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ break;
+ }
+ n = 0;
+ for (;;)
+ {
+ switch (c)
+ {
+ default:
+ phase3_ungetc (c);
+ return n;
+ break;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ n = n * 16 + c - '0';
+ break;;
+
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ n = n * 16 + 10 + c - 'A';
+ break;
+
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ n = n * 16 + 10 + c - 'a';
+ break;
+ }
+ c = phase3_getc ();
+ }
+ return n;
+
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ n = 0;
+ for (j = 0; j < 3; ++j)
+ {
+ n = n * 8 + c - '0';
+ c = phase3_getc ();
+ switch (c)
+ {
+ default:
+ break;
+
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ continue;
+ }
+ break;
+ }
+ phase3_ungetc (c);
+ return n;
+ }
+}
+
+
+static void
+phase7_ungetc (c)
+ int c;
+{
+ phase3_ungetc (c);
+}
+
+
+/* 5. Parse each resulting logical line as preprocessing tokens and
+ white space. Preprocessing tokens and C tokens don't always match. */
+
+/* Maximum used guaranteed to be < 4. */
+static token_ty phase5_pushback[4];
+static int phase5_pushback_length;
+
+
+static void
+phase5_get (tp)
+ token_ty *tp;
+{
+ static char *buffer;
+ static int bufmax;
+ int bufpos;
+ int c;
+
+ if (phase5_pushback_length)
+ {
+ *tp = phase5_pushback[--phase5_pushback_length];
+ return;
+ }
+ tp->string = 0;
+ tp->number = 0;
+ tp->line_number = line_number;
+ c = phase4_getc ();
+ switch (c)
+ {
+ case EOF:
+ tp->type = token_type_eof;
+ return;
+
+ case '\n':
+ tp->type = token_type_eoln;
+ return;
+
+ case ' ':
+ case '\f':
+ case '\t':
+ for (;;)
+ {
+ c = phase4_getc ();
+ switch (c)
+ {
+ case ' ':
+ case '\f':
+ case '\t':
+ continue;
+
+ default:
+ phase4_ungetc (c);
+ break;
+ }
+ break;
+ }
+ tp->type = token_type_white_space;
+ return;
+
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G':
+ case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N':
+ case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U':
+ case 'V': case 'W': case 'X': case 'Y': case 'Z':
+ case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g':
+ case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
+ case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u':
+ case 'v': case 'w': case 'x': case 'y': case 'z':
+ bufpos = 0;
+ for (;;)
+ {
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[bufpos++] = c;
+ c = phase4_getc ();
+ switch (c)
+ {
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ continue;
+
+ default:
+ phase4_ungetc (c);
+ break;
+ }
+ break;
+ }
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[bufpos] = 0;
+ tp->string = xstrdup (buffer);
+ tp->type = token_type_name;
+ return;
+
+ case '.':
+ c = phase4_getc ();
+ phase4_ungetc (c);
+ switch (c)
+ {
+ default:
+ tp->type = token_type_symbol;
+ return;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ c = '.';
+ break;
+ }
+ /* FALLTHROUGH */
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ /* The preprocessing number token is more "generous" than the C
+ number tokens. This is mostly due to token pasting (another
+ thing we can ignore here). */
+ bufpos = 0;
+ while (1)
+ {
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[bufpos++] = c;
+ c = phase4_getc ();
+ switch (c)
+ {
+ case 'e':
+ case 'E':
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[bufpos++] = c;
+ c = phase4_getc ();
+ if (c != '+' || c != '-')
+ {
+ phase4_ungetc (c);
+ break;
+ }
+ continue;
+
+ case 'A': case 'B': case 'C': case 'D': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case 'a': case 'b': case 'c': case 'd': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case '.':
+ continue;
+
+ default:
+ phase4_ungetc (c);
+ break;
+ }
+ break;
+ }
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[bufpos] = 0;
+ tp->type = token_type_number;
+ tp->number = atol (buffer);
+ return;
+
+ case '\'':
+ /* We could worry about the 'L' before wide character constants,
+ but ignoring it has no effect unless one of the keywords is
+ "L". Just pretend it won't happen. Also, we don't need to
+ remember the character constant. */
+ while (1)
+ {
+ c = phase7_getc ();
+ if (c == P7_NEWLINE)
+ {
+ error (0, 0, _("%s:%d: warning: unterminated character constant"),
+ logical_file_name, line_number - 1);
+ phase7_ungetc ('\n');
+ break;
+ }
+ if (c == EOF || c == P7_QUOTE)
+ break;
+ }
+ tp->type = token_type_character_constant;
+ return;
+
+ case '"':
+ /* We could worry about the 'L' before wide string constants,
+ but since gettext's argument is not a wide character string,
+ let the compiler complain about the argument not matching the
+ prototype. Just pretend it won't happen. */
+ bufpos = 0;
+ while (1)
+ {
+ c = phase7_getc ();
+ if (c == P7_NEWLINE)
+ {
+ error (0, 0, _("%s:%d: warning: unterminated string literal"),
+ logical_file_name, line_number - 1);
+ phase7_ungetc ('\n');
+ break;
+ }
+ if (c == EOF || c == P7_QUOTES)
+ break;
+ if (c == P7_QUOTE)
+ c = '\'';
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[bufpos++] = c;
+ }
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buffer = xrealloc (buffer, bufmax);
+ }
+ buffer[bufpos] = 0;
+ tp->type = token_type_string_literal;
+ tp->string = xstrdup (buffer);
+ return;
+
+ case '(':
+ tp->type = token_type_lp;
+ return;
+
+ case ',':
+ tp->type = token_type_comma;
+ return;
+
+ case '#':
+ tp->type = token_type_hash;
+ return;
+
+ default:
+ /* We could carefully recognize each of the 2 and 3 character
+ operators, but it is not necessary, as we only need to recognize
+ gettext invocations. Don't bother. */
+ tp->type = token_type_symbol;
+ return;
+ }
+}
+
+
+static void
+phase5_unget (tp)
+ token_ty *tp;
+{
+ if (tp->type != token_type_eof)
+ phase5_pushback[phase5_pushback_length++] = *tp;
+}
+
+
+/* X. Recognize a leading # symbol. Leave leading hash as a hash, but
+ turn hash in the middle of a line into a plain symbol token. This
+ makes the phase 6 easier. */
+
+static void
+phaseX_get (tp)
+ token_ty *tp;
+{
+ static int middle;
+ token_ty tmp;
+
+ phase5_get (tp);
+ if (middle)
+ {
+ switch (tp->type)
+ {
+ case token_type_eoln:
+ case token_type_eof:
+ middle = 0;
+ break;
+
+ case token_type_hash:
+ tp->type = token_type_symbol;
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ switch (tp->type)
+ {
+ case token_type_eoln:
+ case token_type_eof:
+ break;
+
+ case token_type_white_space:
+ tmp = *tp;
+ phase5_get (tp);
+ if (tp->type != token_type_hash)
+ {
+ phase5_unget (tp);
+ *tp = tmp;
+ middle = 1;
+ return;
+ }
+
+ /* Discard the leading white space token, the hash is all
+ phase 6 is interested in. */
+ if (tp->type != token_type_eof && tp->type != token_type_eoln)
+ middle = 1;
+ break;
+
+ default:
+ middle = 1;
+ break;
+ }
+ }
+}
+
+
+/* 6. Recognize and carry out directives (it also expands macros on
+ non-directive lines, which we do not do here). The only directive
+ we care about is the #line directive. We throw all the others
+ away. */
+
+/* Maximum used guaranteed to be < 4. */
+static token_ty phase6_pushback[4];
+static int phase6_pushback_length;
+
+
+static void
+phase6_get (tp)
+ token_ty *tp;
+{
+ static token_ty *buf;
+ static int bufmax;
+ int bufpos;
+ int j;
+
+ if (phase6_pushback_length)
+ {
+ *tp = phase6_pushback[--phase6_pushback_length];
+ return;
+ }
+ while (1)
+ {
+ /* Get the next token. If it is not a '#' at the beginning of a
+ line, return immediately. Be careful of white space. */
+ phaseX_get (tp);
+ if (tp->type != token_type_hash)
+ return;
+
+ /* Accumulate the rest of the directive in a buffer. Work out
+ what it is later. */
+ bufpos = 0;
+ while (1)
+ {
+ phaseX_get (tp);
+ if (tp->type == token_type_eoln || tp->type == token_type_eof)
+ break;
+
+ /* White space would be important in the directive, if we
+ were interested in the #define directive. But we are
+ going to ignore the #define directive, so just throw
+ white space away. */
+ if (tp->type == token_type_white_space)
+ continue;
+
+ if (bufpos >= bufmax)
+ {
+ bufmax += 100;
+ buf = xrealloc (buf, bufmax * sizeof (buf[0]));
+ }
+ buf[bufpos++] = *tp;
+ }
+
+ /* If it is a #line directive, with no macros to expand, act on
+ it. Ignore all other directives. */
+ if (bufpos >= 3 && buf[0].type == token_type_name
+ && strcmp (buf[0].string, "line") == 0
+ && buf[1].type == token_type_number
+ && buf[2].type == token_type_string_literal)
+ {
+ free (logical_file_name);
+ logical_file_name = xstrdup (buf[2].string);
+ line_number = buf[1].number;
+ }
+ if (bufpos >= 2 && buf[0].type == token_type_number
+ && buf[1].type == token_type_string_literal)
+ {
+ free (logical_file_name);
+ logical_file_name = xstrdup (buf[1].string);
+ line_number = buf[0].number;
+ }
+
+ /* Release the storage held by the directive. */
+ for (j = 0; j < bufpos; ++j)
+ {
+ switch (buf[j].type)
+ {
+ case token_type_name:
+ case token_type_string_literal:
+ free (buf[j].string);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ /* We must reset the selected comments. */
+ xgettext_lex_comment_reset ();
+ }
+}
+
+
+static void
+phase6_unget (tp)
+ token_ty *tp;
+{
+ if (tp->type != token_type_eof)
+ phase6_pushback[phase6_pushback_length++] = *tp;
+}
+
+
+/* 8. Concatenate adjacent string literals to form single string
+ literals (because we don't expand macros, there are a few things we
+ will miss). */
+
+static void
+phase8_get (tp)
+ token_ty *tp;
+{
+ phase6_get (tp);
+ if (tp->type != token_type_string_literal)
+ return;
+ while (1)
+ {
+ token_ty tmp;
+ size_t len;
+
+ phase6_get (&tmp);
+ if (tmp.type == token_type_white_space)
+ continue;
+ if (tmp.type == token_type_eoln)
+ continue;
+ if (tmp.type != token_type_string_literal)
+ {
+ phase6_unget (&tmp);
+ return;
+ }
+ len = strlen (tp->string);
+ tp->string = xrealloc (tp->string, len + strlen (tmp.string) + 1);
+ strcpy (tp->string + len, tmp.string);
+ free (tmp.string);
+ }
+}
+
+
+/* 9. Convert the remaining preprocessing tokens to C tokens and
+ discards any white space from the translation unit. */
+
+void
+xgettext_lex (tp)
+ xgettext_token_ty *tp;
+{
+ while (1)
+ {
+ token_ty token;
+
+ phase8_get (&token);
+ switch (token.type)
+ {
+ case token_type_eof:
+ newline_count = 0;
+ last_comment_line = -1;
+ last_non_comment_line = -1;
+ tp->type = xgettext_token_type_eof;
+ return;
+
+ case token_type_white_space:
+ break;
+
+ case token_type_eoln:
+ /* We have to track the last occurrence of a string. One
+ mode of xgettext allows to group an extracted message
+ with a comment for documentation. The rule which states
+ which comment is assumed to be grouped with the message
+ says it should immediately precede it. Our
+ interpretation: between the last line of the comment and
+ the line in which the keyword is found must be no line
+ with non-white space tokens. */
+ ++newline_count;
+ if (last_non_comment_line > last_comment_line)
+ xgettext_lex_comment_reset ();
+ break;
+
+ case token_type_name:
+ last_non_comment_line = newline_count;
+
+ if (default_keywords)
+ {
+ xgettext_lex_keyword ("gettext");
+ xgettext_lex_keyword ("dgettext");
+ xgettext_lex_keyword ("dcgettext");
+ xgettext_lex_keyword ("gettext_noop");
+ default_keywords = 0;
+ }
+
+ if (string_list_member (keywords, token.string))
+ {
+ tp->type = (strcmp (token.string, "dgettext") == 0
+ || strcmp (token.string, "dcgettext") == 0)
+ ? xgettext_token_type_keyword2 : xgettext_token_type_keyword1;
+ }
+ else
+ tp->type = xgettext_token_type_symbol;
+ free (token.string);
+ return;
+
+ case token_type_lp:
+ last_non_comment_line = newline_count;
+
+ tp->type = xgettext_token_type_lp;
+ return;
+
+ case token_type_comma:
+ last_non_comment_line = newline_count;
+
+ tp->type = xgettext_token_type_comma;
+ return;
+
+ case token_type_string_literal:
+ last_non_comment_line = newline_count;
+
+ tp->type = xgettext_token_type_string_literal;
+ tp->string = token.string;
+ tp->line_number = token.line_number;
+ tp->file_name = logical_file_name;
+ return;
+
+ default:
+ last_non_comment_line = newline_count;
+
+ tp->type = xgettext_token_type_symbol;
+ return;
+ }
+ }
+}
+
+
+void
+xgettext_lex_keyword (name)
+ char *name;
+{
+ if (name == NULL)
+ default_keywords = 0;
+ else
+ {
+ if (keywords == NULL)
+ keywords = string_list_alloc ();
+
+ string_list_append_unique (keywords, name);
+ }
+}
+
+
+int
+xgettext_any_keywords ()
+{
+ return keywords != NULL || default_keywords;
+}
+
+
+const char *
+xgettext_lex_comment (n)
+ size_t n;
+{
+ if (comment == NULL || n >= comment->nitems)
+ return NULL;
+ return comment->item[n];
+}
+
+
+void
+xgettext_lex_comment_reset ()
+{
+ if (comment != NULL)
+ {
+ string_list_free (comment);
+ comment = NULL;
+ }
+}
+
+
+void
+xgettext_lex_cplusplus ()
+{
+ cplusplus_comments = 1;
+}
+
+
+void
+xgettext_lex_trigraphs ()
+{
+ trigraphs = 1;
+}
diff --git a/src/xget-lex.h b/src/xget-lex.h
new file mode 100644
index 0000000..18491ca
--- /dev/null
+++ b/src/xget-lex.h
@@ -0,0 +1,58 @@
+/* GNU gettext - internationalization aids
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef SRC_XGET_LEX_H
+#define SRC_XGET_LEX_H
+
+enum xgettext_token_type_ty
+{
+ xgettext_token_type_eof,
+ xgettext_token_type_keyword1,
+ xgettext_token_type_keyword2,
+ xgettext_token_type_lp,
+ xgettext_token_type_comma,
+ xgettext_token_type_string_literal,
+ xgettext_token_type_symbol
+};
+typedef enum xgettext_token_type_ty xgettext_token_type_ty;
+
+typedef struct xgettext_token_ty xgettext_token_ty;
+struct xgettext_token_ty
+{
+ xgettext_token_type_ty type;
+
+ /* These 3 are only set for xgettext_token_type_string_literal. */
+ char *string;
+ int line_number;
+ char *file_name;
+};
+
+
+void xgettext_lex_open PARAMS ((const char *__file_name));
+void xgettext_lex_close PARAMS ((void));
+void xgettext_lex PARAMS ((xgettext_token_ty *__tp));
+const char *xgettext_lex_comment PARAMS ((size_t __n));
+void xgettext_lex_comment_reset PARAMS ((void));
+/* void xgettext_lex_filepos PARAMS ((char **, int *)); FIXME needed? */
+void xgettext_lex_keyword PARAMS ((char *__name));
+int xgettext_any_keywords PARAMS ((void));
+void xgettext_lex_cplusplus PARAMS ((void));
+void xgettext_lex_trigraphs PARAMS ((void));
+
+#endif
diff --git a/src/xgettext.c b/src/xgettext.c
new file mode 100644
index 0000000..552a258
--- /dev/null
+++ b/src/xgettext.c
@@ -0,0 +1,1390 @@
+/* Extracts strings from C source file to Uniforum style .po file.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <getopt.h>
+#include <sys/param.h>
+#include <pwd.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/types.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifndef errno
+extern int errno;
+#endif
+
+#include "dir-list.h"
+#include "error.h"
+#include "hash.h"
+#include "getline.h"
+#include "system.h"
+#include "po.h"
+#include "message.h"
+#include "xget-lex.h"
+#include "printf-parse.h"
+
+#include "gettext.h"
+#include "domain.h"
+#include <libintl.h>
+
+#ifndef _POSIX_VERSION
+struct passwd *getpwuid ();
+#endif
+
+
+/* A convenience macro. I don't like writing gettext() every time. */
+#define _(str) gettext (str)
+
+
+/* If nonzero add all comments immediately preceding one of the keywords. */
+static int add_all_comments;
+
+/* If nonzero add comments for file name and line number for each msgid. */
+static int line_comment;
+
+/* Tag used in comment of prevailing domain. */
+static char *comment_tag;
+
+/* Name of default domain file. If not set defaults to messages.po. */
+static char *default_domain;
+
+/* If called with --debug option the output reflects whether format
+ string recognition is done automatically or forced by the user. */
+static int do_debug;
+
+/* Content of .po files with symbols to be excluded. */
+static message_list_ty *exclude;
+
+/* If nonzero extract all strings. */
+static int extract_all;
+
+/* Force output of PO file even if empty. */
+static int force_po;
+
+/* If nonzero a non GNU related user wants to use this. Omit the FSF
+ copyright in the output. */
+static int foreign_user;
+
+/* String used as prefix for msgstr. */
+static char *msgstr_prefix;
+
+/* String used as suffix for msgstr. */
+static char *msgstr_suffix;
+
+/* Directory in which output files are created. */
+static char *output_dir;
+
+/* If nonzero omit header with information about this run. */
+static int omit_header;
+
+/* String containing name the program is called with. */
+const char *program_name;
+
+/* String length from with on warning are given for possible problem
+ while exceeding tools limits. */
+static size_t warn_id_len;
+
+/* Long options. */
+static const struct option long_options[] =
+{
+ { "add-comments", optional_argument, NULL, 'c' },
+ { "add-location", no_argument, &line_comment, 1 },
+ { "c++", no_argument, NULL, 'C' },
+ { "debug", no_argument, &do_debug, 1 },
+ { "default-domain", required_argument, NULL, 'd' },
+ { "directory", required_argument, NULL, 'D' },
+ { "escape", no_argument, NULL, 'E' },
+ { "exclude-file", required_argument, NULL, 'x' },
+ { "extract-all", no_argument, &extract_all, 1 },
+ { "files-from", required_argument, NULL, 'f' },
+ { "force-po", no_argument, &force_po, 1 },
+ { "foreign-user", no_argument, &foreign_user, 1 },
+ { "help", no_argument, NULL, 'h' },
+ { "indent", no_argument, NULL, 'i' },
+ { "join-existing", no_argument, NULL, 'j' },
+ { "keyword", optional_argument, NULL, 'k' },
+ { "language", required_argument, NULL, 'L' },
+ { "msgstr-prefix", optional_argument, NULL, 'm' },
+ { "msgstr-suffix", optional_argument, NULL, 'M' },
+ { "no-escape", no_argument, NULL, 'e' },
+ { "no-location", no_argument, &line_comment, 0 },
+ { "omit-header", no_argument, &omit_header, 1 },
+ { "output", required_argument, NULL, 'o' },
+ { "output-dir", required_argument, NULL, 'p' },
+ { "sort-by-file", no_argument, NULL, 'F' },
+ { "sort-output", no_argument, NULL, 's' },
+ { "strict", no_argument, NULL, 'S' },
+ { "string-limit", required_argument, NULL, 'l' },
+ { "trigraphs", no_argument, NULL, 'T' },
+ { "version", no_argument, NULL, 'V' },
+ { "width", required_argument, NULL, 'w', },
+ { NULL, 0, NULL, 0 }
+};
+
+
+/* Prototypes for local functions. */
+static void usage PARAMS ((int status))
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ > 4) || __GNUC__ > 2)
+ __attribute__ ((noreturn))
+#endif
+;
+static void error_print PARAMS ((void));
+static string_list_ty *read_name_from_file PARAMS ((const char *__file_name));
+static void exclude_directive_domain PARAMS ((po_ty *__pop, char *__name));
+static void exclude_directive_message PARAMS ((po_ty *__pop, char *__msgid,
+ lex_pos_ty *__msgid_pos,
+ char *__msgstr,
+ lex_pos_ty *__msgstr_pos));
+static void read_exclusion_file PARAMS ((char *__file_name));
+static void remember_a_message PARAMS ((message_list_ty *__mlp,
+ xgettext_token_ty *__tp));
+static void scan_c_file PARAMS ((const char *__file_name,
+ message_list_ty *__mlp, int __is_cpp_file));
+static void extract_constructor PARAMS ((po_ty *__that));
+static void extract_directive_domain PARAMS ((po_ty *__that, char *__name));
+static void extract_directive_message PARAMS ((po_ty *__that, char *__msgid,
+ lex_pos_ty *__msgid_pos,
+ char *__msgstr,
+ lex_pos_ty *__msgstr_pos));
+static void extract_parse_brief PARAMS ((po_ty *__that));
+static void extract_comment PARAMS ((po_ty *__that, const char *__s));
+static void extract_comment_dot PARAMS ((po_ty *__that, const char *__s));
+static void extract_comment_filepos PARAMS ((po_ty *__that, const char *__name,
+ int __line));
+static void extract_comment_special PARAMS ((po_ty *that, const char *s));
+static void read_po_file PARAMS ((const char *__file_name,
+ message_list_ty *__mlp));
+static long difftm PARAMS ((const struct tm *__a, const struct tm *__b));
+static message_ty *construct_header PARAMS ((void));
+static enum is_c_format test_whether_c_format PARAMS ((const char *__s));
+
+
+/* The scanners must all be functions returning void and taking one
+ string argument and a message list argument. */
+typedef void (*scanner_fp) PARAMS ((const char *, message_list_ty *));
+
+static void scanner_c PARAMS ((const char *, message_list_ty *));
+static void scanner_cxx PARAMS ((const char *, message_list_ty *));
+static const char *extension_to_language PARAMS ((const char *));
+static scanner_fp language_to_scanner PARAMS ((const char *));
+
+
+int
+main (argc, argv)
+ int argc;
+ char *argv[];
+{
+ int cnt;
+ int optchar;
+ int do_help = 0;
+ int do_version = 0;
+ message_list_ty *mlp;
+ int join_existing = 0;
+ int sort_output = 0;
+ int sort_by_file = 0;
+ char *file_name;
+ const char *files_from = NULL;
+ string_list_ty *file_list;
+ char *output_file = NULL;
+ scanner_fp scanner = NULL;
+
+ /* Set program name for messages. */
+ program_name = argv[0];
+ error_print_progname = error_print;
+ warn_id_len = WARN_ID_LEN;
+
+#ifdef HAVE_SETLOCALE
+ /* Set locale via LC_ALL. */
+ setlocale (LC_ALL, "");
+#endif
+
+ /* Set the text message domain. */
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ /* Set initial value of variables. */
+ line_comment = -1;
+ default_domain = MESSAGE_DOMAIN_DEFAULT;
+
+ while ((optchar = getopt_long (argc, argv,
+ "ac::Cd:D:eEf:Fhijk::l:L:m::M::no:p:sTVw:x:",
+ long_options, NULL)) != EOF)
+ switch (optchar)
+ {
+ case '\0': /* Long option. */
+ break;
+ case 'a':
+ extract_all = 1;
+ break;
+ case 'c':
+ if (optarg == NULL)
+ {
+ add_all_comments = 1;
+ comment_tag = NULL;
+ }
+ else
+ {
+ add_all_comments = 0;
+ comment_tag = optarg;
+ /* We ignore leading white space. */
+ while (isspace (*comment_tag))
+ ++comment_tag;
+ }
+ break;
+ case 'C':
+ scanner = language_to_scanner ("C++");
+ break;
+ case 'd':
+ default_domain = optarg;
+ break;
+ case 'D':
+ dir_list_append (optarg);
+ break;
+ case 'e':
+ message_print_style_escape (0);
+ break;
+ case 'E':
+ message_print_style_escape (1);
+ break;
+ case 'f':
+ files_from = optarg;
+ break;
+ case 'F':
+ sort_by_file = 1;
+ break;
+ case 'h':
+ do_help = 1;
+ break;
+ case 'i':
+ message_print_style_indent ();
+ break;
+ case 'j':
+ join_existing = 1;
+ break;
+ case 'k':
+ if (optarg == NULL || *optarg != '\0')
+ xgettext_lex_keyword (optarg);
+ break;
+ case 'l':
+ {
+ char *endp;
+ size_t tmp_val = strtoul (optarg, &endp, 0);
+ if (endp[0] == '\0')
+ warn_id_len = tmp_val;
+ }
+ break;
+ case 'L':
+ scanner = language_to_scanner (optarg);
+ break;
+ case 'm':
+ /* -m takes an optional argument. If none is given "" is assumed. */
+ msgstr_prefix = optarg == NULL ? "" : optarg;
+ break;
+ case 'M':
+ /* -M takes an optional argument. If none is given "" is assumed. */
+ msgstr_suffix = optarg == NULL ? "" : optarg;
+ break;
+ case 'n':
+ line_comment = 1;
+ break;
+ case 'o':
+ output_file = optarg;
+ break;
+ case 'p':
+ {
+ size_t len = strlen (optarg);
+
+ if (output_dir != NULL)
+ free (output_dir);
+
+ if (optarg[len - 1] == '/')
+ output_dir = xstrdup (optarg);
+ else
+ {
+ asprintf (&output_dir, "%s/", optarg);
+ if (output_dir == NULL)
+ /* We are about to construct the absolute path to the
+ directory for the output files but asprintf failed. */
+ error (EXIT_FAILURE, errno, _("while preparing output"));
+ }
+ }
+ break;
+ case 's':
+ sort_output = 1;
+ break;
+ case 'S':
+ message_print_style_uniforum ();
+ break;
+ case 'T':
+ xgettext_lex_trigraphs ();
+ break;
+ case 'V':
+ do_version = 1;
+ break;
+ case 'w':
+ {
+ int value;
+ char *endp;
+ value = strtol (optarg, &endp, 10);
+ if (endp != optarg)
+ message_page_width_set (value);
+ }
+ break;
+ case 'x':
+ read_exclusion_file (optarg);
+ break;
+ default:
+ usage (EXIT_FAILURE);
+ /* NOTREACHED */
+ }
+
+ /* Normalize selected options. */
+ if (omit_header != 0 && line_comment < 0)
+ line_comment = 0;
+
+ if (!line_comment && sort_by_file)
+ error (EXIT_FAILURE, 0, _("%s and %s are mutually exclusive"),
+ "--no-location", "--sort-by-file");
+
+ if (sort_output && sort_by_file)
+ error (EXIT_FAILURE, 0, _("%s and %s are mutually exclusive"),
+ "--sort-output", "--sort-by-file");
+
+ if (join_existing && strcmp (default_domain, "-") == 0)
+ error (EXIT_FAILURE, 0, _("\
+--join-existing cannot be used when output is written to stdout"));
+
+ if (!xgettext_any_keywords ())
+ {
+ error (0, 0, _("\
+xgettext cannot work without keywords to look for"));
+ usage (EXIT_FAILURE);
+ }
+
+ /* Version information requested. */
+ if (do_version)
+ {
+ printf ("%s (GNU %s) %s\n", basename (program_name), PACKAGE, VERSION);
+ /* xgettext: no-wrap */
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"),
+ "1995, 1996, 1997, 1998");
+ printf (_("Written by %s.\n"), "Ulrich Drepper");
+ exit (EXIT_SUCCESS);
+ }
+
+ /* Help is requested. */
+ if (do_help)
+ usage (EXIT_SUCCESS);
+
+ /* Test whether we have some input files given. */
+ if (files_from == NULL && optind >= argc)
+ {
+ error (EXIT_SUCCESS, 0, _("no input file given"));
+ usage (EXIT_FAILURE);
+ }
+
+ /* Canonize msgstr prefix/suffix. */
+ if (msgstr_prefix != NULL && msgstr_suffix == NULL)
+ msgstr_suffix = "";
+ else if (msgstr_prefix == NULL && msgstr_suffix != NULL)
+ msgstr_prefix = NULL;
+
+ /* Default output directory is the current directory. */
+ if (output_dir == NULL)
+ output_dir = ".";
+
+ /* Construct the name of the ouput file. If the default domain has
+ the special name "-" we write to stdout. */
+ if (output_file)
+ {
+ if (output_file[0] == '/' ||
+ strcmp(output_dir, ".") == 0 || strcmp(output_file, "-") == 0)
+ file_name = xstrdup (output_file);
+ else
+ {
+ /* Please do NOT add a .po suffix! */
+ file_name = xmalloc (strlen (output_dir)
+ + strlen (default_domain) + 2);
+ stpcpy (stpcpy (stpcpy (file_name, output_dir), "/"), output_file);
+ }
+ }
+ else if (strcmp (default_domain, "-") == 0)
+ file_name = "-";
+ else
+ {
+ file_name = (char *) xmalloc (strlen (output_dir)
+ + strlen (default_domain)
+ + sizeof (".po") + 2);
+ stpcpy (stpcpy (stpcpy (stpcpy (file_name, output_dir), "/"),
+ default_domain), ".po");
+ }
+
+ /* Determine list of files we have to process. */
+ if (files_from != NULL)
+ file_list = read_name_from_file (files_from);
+ else
+ file_list = string_list_alloc ();
+ /* Append names from command line. */
+ for (cnt = optind; cnt < argc; ++cnt)
+ string_list_append_unique (file_list, argv[cnt]);
+
+ /* Allocate a message list to remember all the messages. */
+ mlp = message_list_alloc ();
+
+ /* Generate a header, so that we know how and when this PO file was
+ created. */
+ if (!omit_header)
+ message_list_append (mlp, construct_header ());
+
+ /* Read in the old messages, so that we can add to them. */
+ if (join_existing)
+ read_po_file (file_name, mlp);
+
+ /* Process all input files. */
+ for (cnt = 0; cnt < file_list->nitems; ++cnt)
+ {
+ const char *fname;
+ scanner_fp scan_file;
+
+ fname = file_list->item[cnt];
+
+ if (scanner)
+ scan_file = scanner;
+ else
+ {
+ const char *extension;
+ const char *language;
+
+ /* Work out what the file extension is. */
+ extension = strrchr (fname, '/');
+ if (!extension)
+ extension = fname;
+ extension = strrchr (extension, '.');
+ if (extension)
+ ++extension;
+ else
+ extension = "";
+
+ /* derive the language from the extension, and the scanner
+ function from the language. */
+ language = extension_to_language (extension);
+ if (language == NULL)
+ {
+ error (0, 0, _("\
+warning: file `%s' extension `%s' is unknown; will try C"), fname, extension);
+ language = "C";
+ }
+ scan_file = language_to_scanner (language);
+ }
+
+ /* Scan the file. */
+ scan_file (fname, mlp);
+ }
+ string_list_free (file_list);
+
+ /* Sorting the list of messages. */
+ if (sort_by_file)
+ message_list_sort_by_filepos (mlp);
+ else if (sort_output)
+ message_list_sort_by_msgid (mlp);
+
+ /* Write the PO file. */
+ message_list_print (mlp, file_name, force_po, do_debug);
+
+ exit (EXIT_SUCCESS);
+}
+
+
+/* Display usage information and exit. */
+static void
+usage (status)
+ int status;
+{
+ if (status != EXIT_SUCCESS)
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
+ program_name);
+ else
+ {
+ /* xgettext: no-wrap */
+ printf (_("\
+Usage: %s [OPTION] INPUTFILE ...\n\
+Extract translatable string from given input files.\n\
+\n\
+Mandatory arguments to long options are mandatory for short options too.\n\
+ -a, --extract-all extract all strings\n\
+ -c, --add-comments[=TAG] place comment block with TAG (or those\n\
+ preceding keyword lines) in output file\n\
+ -C, --c++ shorthand for --language=C++\n\
+ --debug more detailed formatstring recognision result\n\
+ -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n\
+ -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n\
+ -e, --no-escape do not use C escapes in output (default)\n\
+ -E, --escape use C escapes in output, no extended chars\n\
+ -f, --files-from=FILE get list of input files from FILE\n\
+ --force-po write PO file even if empty\n\
+ --foreign-user omit FSF copyright in output for foreign user\n\
+ -F, --sort-by-file sort output by file location\n"),
+ program_name);
+ /* xgettext: no-wrap */
+ printf (_("\
+ -h, --help display this help and exit\n\
+ -i, --indent write the .po file using indented style\n\
+ -j, --join-existing join messages with existing file\n\
+ -k, --keyword[=WORD] additonal keyword to be looked for (without\n\
+ WORD means not to use default keywords)\n\
+ -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n\
+ -L, --language=NAME recognise the specified language (C, C++, PO),\n\
+ otherwise is guessed from file extension\n\
+ -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n\
+ -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n\
+ --no-location do not write '#: filename:line' lines\n"),
+ WARN_ID_LEN);
+ /* xgettext: no-wrap */
+ fputs (_("\
+ -n, --add-location generate '#: filename:line' lines (default)\n\
+ --omit-header don't write header with `msgid \"\"' entry\n\
+ -o, --output=FILE write output to specified file\n\
+ -p, --output-dir=DIR output files will be placed in directory DIR\n\
+ -s, --sort-output generate sorted output and remove duplicates\n\
+ --strict write out strict Uniforum conforming .po file\n\
+ -T, --trigraphs understand ANSI C trigraphs for input\n\
+ -V, --version output version information and exit\n\
+ -w, --width=NUMBER set output page width\n\
+ -x, --exclude-file=FILE entries from FILE are not extracted\n\
+\n\
+If INPUTFILE is -, standard input is read.\n"), stdout);
+ fputs (_("Report bugs to <bug-gnu-utils@gnu.org>.\n"),
+ stdout);
+ }
+
+ exit (status);
+}
+
+
+/* The address of this function will be assigned to the hook in the error
+ functions. */
+static void
+error_print ()
+{
+ /* We don't want the program name to be printed in messages. */
+}
+
+
+/* Read list of files to process from file. */
+static string_list_ty *
+read_name_from_file (file_name)
+ const char *file_name;
+{
+ size_t line_len = 0;
+ char *line_buf = NULL;
+ FILE *fp;
+ string_list_ty *result;
+
+ if (strcmp (file_name, "-") == 0)
+ fp = stdin;
+ else
+ {
+ fp = fopen (file_name, "r");
+ if (fp == NULL)
+ error (EXIT_FAILURE, errno,
+ _("error while opening \"%s\" for reading"), file_name);
+ }
+
+ result = string_list_alloc ();
+
+ while (!feof (fp))
+ {
+ /* Read next line from file. */
+ int len = getline (&line_buf, &line_len, fp);
+
+ /* In case of an error leave loop. */
+ if (len < 0)
+ break;
+
+ /* Remove trailing '\n'. */
+ if (len > 0 && line_buf[len - 1] == '\n')
+ line_buf[--len] = '\0';
+
+ /* Test if we have to ignore the line. */
+ if (*line_buf == '\0' || *line_buf == '#')
+ continue;
+
+ string_list_append_unique (result, line_buf);
+ }
+
+ /* Free buffer allocated through getline. */
+ if (line_buf != NULL)
+ free (line_buf);
+
+ /* Close input stream. */
+ if (fp != stdin)
+ fclose (fp);
+
+ return result;
+}
+
+
+static void
+exclude_directive_domain (pop, name)
+ po_ty *pop;
+ char *name;
+{
+ po_gram_error (_("this file may not contain domain directives"));
+}
+
+
+static void
+exclude_directive_message (pop, msgid, msgid_pos, msgstr, msgstr_pos)
+ po_ty *pop;
+ char *msgid;
+ lex_pos_ty *msgid_pos;
+ char *msgstr;
+ lex_pos_ty *msgstr_pos;
+{
+ message_ty *mp;
+
+ /* See if this message ID has been seen before. */
+ if (exclude == NULL)
+ exclude = message_list_alloc ();
+ mp = message_list_search (exclude, msgid);
+ if (mp != NULL)
+ free (msgid);
+ else
+ {
+ mp = message_alloc (msgid);
+ /* Do not free msgid. */
+ message_list_append (exclude, mp);
+ }
+
+ /* All we care about is the msgid. Throw the msgstr away.
+ Don't even check for duplicate msgids. */
+ free (msgstr);
+}
+
+
+/* So that the one parser can be used for multiple programs, and also
+ use good data hiding and encapsulation practices, an object
+ oriented approach has been taken. An object instance is allocated,
+ and all actions resulting from the parse will be through
+ invocations of method functions of that object. */
+
+static po_method_ty exclude_methods =
+{
+ sizeof (po_ty),
+ NULL, /* constructor */
+ NULL, /* destructor */
+ exclude_directive_domain,
+ exclude_directive_message,
+ NULL, /* parse_brief */
+ NULL, /* parse_debrief */
+ NULL, /* comment */
+ NULL, /* comment_dot */
+ NULL, /* comment_filepos */
+ NULL, /* comment_special */
+};
+
+
+static void
+read_exclusion_file (file_name)
+ char *file_name;
+{
+ po_ty *pop;
+
+ pop = po_alloc (&exclude_methods);
+ po_scan (pop, file_name);
+ po_free (pop);
+}
+
+
+static void
+remember_a_message (mlp, tp)
+ message_list_ty *mlp;
+ xgettext_token_ty *tp;
+{
+ enum is_c_format is_c_format = undecided;
+ enum is_c_format do_wrap = undecided;
+ char *msgid;
+ message_ty *mp;
+ char *msgstr;
+
+ msgid = tp->string;
+
+ /* See whether we shall exclude this message. */
+ if (exclude != NULL && message_list_search (exclude, msgid) != NULL)
+ {
+ /* Tell the lexer to reset its comment buffer, so that the next
+ message gets the correct comments. */
+ xgettext_lex_comment_reset ();
+
+ return;
+ }
+
+ /* See if we have seen this message before. */
+ mp = message_list_search (mlp, msgid);
+ if (mp != NULL)
+ {
+ free (msgid);
+ is_c_format = mp->is_c_format;
+ do_wrap = mp->do_wrap;
+ }
+ else
+ {
+ static lex_pos_ty pos = { __FILE__, __LINE__ };
+
+ /* Allocate a new message and append the message to the list. */
+ mp = message_alloc (msgid);
+ /* Do not free msgid. */
+ message_list_append (mlp, mp);
+
+ /* Construct the msgstr from the prefix and suffix, otherwise use the
+ empty string. */
+ if (msgstr_prefix)
+ {
+ msgstr = (char *) xmalloc (strlen (msgstr_prefix)
+ + strlen (msgid)
+ + strlen(msgstr_suffix) + 1);
+ stpcpy (stpcpy (stpcpy (msgstr, msgstr_prefix), msgid),
+ msgstr_suffix);
+ }
+ else
+ msgstr = "";
+ message_variant_append (mp, MESSAGE_DOMAIN_DEFAULT, msgstr, &pos);
+ }
+
+ /* Ask the lexer for the comments it has seen. Only do this for the
+ first instance, otherwise there could be problems; especially if
+ the same comment appears before each. */
+ if (!mp->comment_dot)
+ {
+ int j;
+
+ for (j = 0; ; ++j)
+ {
+ const char *s = xgettext_lex_comment (j);
+ if (s == NULL)
+ break;
+
+ /* To reduce the possibility of unwanted matches be do a two
+ step match: the line must contains `xgettext:' and one of
+ the possible format description strings. */
+ if (strstr (s, "xgettext:") != NULL)
+ {
+ is_c_format = parse_c_format_description_string (s);
+ do_wrap = parse_c_width_description_string (s);
+
+ /* If we found a magic string we don't print it. */
+ if (is_c_format != undecided || do_wrap != undecided)
+ continue;
+ }
+ if (add_all_comments
+ || (comment_tag != NULL && strncmp (s, comment_tag,
+ strlen (comment_tag)) == 0))
+ message_comment_dot_append (mp, s);
+ }
+ }
+
+ /* If not already decided, examine the msgid. */
+ if (is_c_format == undecided)
+ is_c_format = test_whether_c_format (mp->msgid);
+
+ mp->is_c_format = is_c_format;
+ mp->do_wrap = do_wrap == no ? no : yes; /* By default we wrap. */
+
+ /* Remember where we saw this msgid. */
+ if (line_comment)
+ message_comment_filepos (mp, tp->file_name, tp->line_number);
+
+ /* Tell the lexer to reset its comment buffer, so that the next
+ message gets the correct comments. */
+ xgettext_lex_comment_reset ();
+}
+
+
+static void
+scan_c_file(filename, mlp, is_cpp_file)
+ const char *filename;
+ message_list_ty *mlp;
+ int is_cpp_file;
+{
+ int state;
+
+ /* Inform scanner whether we have C++ files or not. */
+ if (is_cpp_file)
+ xgettext_lex_cplusplus ();
+
+ /* The file is broken into tokens. Scan the token stream, looking for
+ a keyword, followed by a left paren, followed by a string. When we
+ see this sequence, we have something to remember. We assume we are
+ looking at a valid C or C++ program, and leave the complaints about
+ the grammar to the compiler. */
+ xgettext_lex_open (filename);
+
+ /* Start state is 0. */
+ state = 0;
+
+ while (1)
+ {
+ xgettext_token_ty token;
+
+ /* A simple state machine is used to do the recognising:
+ State 0 = waiting for something to happen
+ State 1 = seen one of our keywords with string in first parameter
+ State 2 = was in state 1 and now saw a left paren
+ State 3 = seen one of our keywords with string in second parameter
+ State 4 = was in state 3 and now saw a left paren
+ State 5 = waiting for comma after being in state 4
+ State 6 = saw comma after being in state 5 */
+ xgettext_lex (&token);
+ switch (token.type)
+ {
+ case xgettext_token_type_keyword1:
+ state = 1;
+ continue;
+
+ case xgettext_token_type_keyword2:
+ state = 3;
+ continue;
+
+ case xgettext_token_type_lp:
+ switch (state)
+ {
+ case 1:
+ state = 2;
+ break;
+ case 3:
+ state = 4;
+ break;
+ default:
+ state = 0;
+ }
+ continue;
+
+ case xgettext_token_type_comma:
+ state = state == 5 ? 6 : 0;
+ continue;
+
+ case xgettext_token_type_string_literal:
+ if (extract_all || state == 2 || state == 6)
+ {
+ remember_a_message (mlp, &token);
+ state = 0;
+ }
+ else
+ {
+ free (token.string);
+ state = (state == 4 || state == 5) ? 5 : 0;
+ }
+ continue;
+
+ case xgettext_token_type_symbol:
+ state = (state == 4 || state == 5) ? 5 : 0;
+ continue;
+
+ default:
+ state = 0;
+ continue;
+
+ case xgettext_token_type_eof:
+ break;
+ }
+ break;
+ }
+
+ /* Close scanner. */
+ xgettext_lex_close ();
+}
+
+
+typedef struct extract_class_ty extract_class_ty;
+struct extract_class_ty
+{
+ /* Inherited instance variables and methods. */
+ PO_BASE_TY
+
+ /* Cumulative list of messages. */
+ message_list_ty *mlp;
+
+ /* Cumulative comments for next message. */
+ string_list_ty *comment;
+ string_list_ty *comment_dot;
+
+ int is_fuzzy;
+ int is_c_format;
+ int do_wrap;
+
+ int filepos_count;
+ lex_pos_ty *filepos;
+};
+
+
+static void
+extract_constructor (that)
+ po_ty *that;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+
+ this->mlp = NULL; /* actually set in read_po_file, below */
+ this->comment = NULL;
+ this->comment_dot = NULL;
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+ this->filepos_count = 0;
+ this->filepos = NULL;
+}
+
+
+static void
+extract_directive_domain (that, name)
+ po_ty *that;
+ char *name;
+{
+ po_gram_error (_("this file may not contain domain directives"));
+}
+
+
+static void
+extract_directive_message (that, msgid, msgid_pos, msgstr, msgstr_pos)
+ po_ty *that;
+ char *msgid;
+ lex_pos_ty *msgid_pos;
+ char *msgstr;
+ lex_pos_ty *msgstr_pos;
+{
+ extract_class_ty *this = (extract_class_ty *)that;
+ message_ty *mp;
+ message_variant_ty *mvp;
+ size_t j;
+
+ /* See whether we shall exclude this message. */
+ if (exclude != NULL && message_list_search (exclude, msgid) != NULL)
+ goto discard;
+
+ /* If the msgid is the empty string, it is the old header.
+ Throw it away, we have constructed a new one. */
+ if (*msgid == '\0')
+ {
+ discard:
+ free (msgid);
+ free (msgstr);
+ if (this->comment != NULL)
+ string_list_free (this->comment);
+ if (this->comment_dot != NULL)
+ string_list_free (this->comment_dot);
+ if (this->filepos != NULL)
+ free (this->filepos);
+ this->comment = NULL;
+ this->comment_dot = NULL;
+ this->filepos_count = 0;
+ this->filepos = NULL;
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+ return;
+ }
+
+ /* See if this message ID has been seen before. */
+ mp = message_list_search (this->mlp, msgid);
+ if (mp)
+ free (msgid);
+ else
+ {
+ mp = message_alloc (msgid);
+ message_list_append (this->mlp, mp);
+ }
+
+ /* Add the accumulated comments to the message. Clear the
+ accumulation in preparation for the next message. */
+ if (this->comment != NULL)
+ {
+ for (j = 0; j < this->comment->nitems; ++j)
+ message_comment_append (mp, this->comment->item[j]);
+ string_list_free (this->comment);
+ this->comment = NULL;
+ }
+ if (this->comment_dot != NULL)
+ {
+ for (j = 0; j < this->comment_dot->nitems; ++j)
+ message_comment_dot_append (mp, this->comment_dot->item[j]);
+ string_list_free (this->comment_dot);
+ this->comment_dot = NULL;
+ }
+ mp->is_fuzzy = this->is_fuzzy;
+ mp->is_c_format = this->is_c_format;
+ mp->do_wrap = this->do_wrap;
+ for (j = 0; j < this->filepos_count; ++j)
+ {
+ lex_pos_ty *pp;
+
+ pp = &this->filepos[j];
+ message_comment_filepos (mp, pp->file_name, pp->line_number);
+ free (pp->file_name);
+ }
+ if (this->filepos != NULL)
+ free (this->filepos);
+ this->filepos_count = 0;
+ this->filepos = NULL;
+ this->is_fuzzy = 0;
+ this->is_c_format = undecided;
+ this->do_wrap = undecided;
+
+ /* See if this domain has been seen for this message ID. */
+ mvp = message_variant_search (mp, MESSAGE_DOMAIN_DEFAULT);
+ if (mvp != NULL && strcmp (msgstr, mvp->msgstr) != 0)
+ {
+ gram_error_at_line (msgid_pos, _("duplicate message definition"));
+ gram_error_at_line (&mvp->pos, _("\
+...this is the location of the first definition"));
+ free (msgstr);
+ }
+ else
+ message_variant_append (mp, MESSAGE_DOMAIN_DEFAULT, msgstr, msgstr_pos);
+}
+
+
+static void
+extract_parse_brief (that)
+ po_ty *that;
+{
+ po_lex_pass_comments (1);
+}
+
+
+static void
+extract_comment (that, s)
+ po_ty *that;
+ const char *s;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+
+ if (this->comment == NULL)
+ this->comment = string_list_alloc ();
+ string_list_append (this->comment, s);
+}
+
+
+static void
+extract_comment_dot (that, s)
+ po_ty *that;
+ const char *s;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+
+ if (this->comment_dot == NULL)
+ this->comment_dot = string_list_alloc ();
+ string_list_append (this->comment_dot, s);
+}
+
+
+static void
+extract_comment_filepos (that, name, line)
+ po_ty *that;
+ const char *name;
+ int line;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+ size_t nbytes;
+ lex_pos_ty *pp;
+
+ /* Write line numbers only if -n option is given. */
+ if (line_comment != 0)
+ {
+ nbytes = (this->filepos_count + 1) * sizeof (this->filepos[0]);
+ this->filepos = xrealloc (this->filepos, nbytes);
+ pp = &this->filepos[this->filepos_count++];
+ pp->file_name = xstrdup (name);
+ pp->line_number = line;
+ }
+}
+
+
+static void
+extract_comment_special (that, s)
+ po_ty *that;
+ const char *s;
+{
+ extract_class_ty *this = (extract_class_ty *) that;
+
+ if (strstr (s, "fuzzy") != NULL)
+ this->is_fuzzy = 1;
+ this->is_c_format = parse_c_format_description_string (s);
+ this->do_wrap = parse_c_width_description_string (s);
+}
+
+
+/* So that the one parser can be used for multiple programs, and also
+ use good data hiding and encapsulation practices, an object
+ oriented approach has been taken. An object instance is allocated,
+ and all actions resulting from the parse will be through
+ invocations of method functions of that object. */
+
+static po_method_ty extract_methods =
+{
+ sizeof (extract_class_ty),
+ extract_constructor,
+ NULL, /* destructor */
+ extract_directive_domain,
+ extract_directive_message,
+ extract_parse_brief,
+ NULL, /* parse_debrief */
+ extract_comment,
+ extract_comment_dot,
+ extract_comment_filepos,
+ extract_comment_special
+};
+
+
+/* Read the contents of the specified .po file into a message list. */
+
+static void
+read_po_file (file_name, mlp)
+ const char *file_name;
+ message_list_ty *mlp;
+{
+ po_ty *pop = po_alloc (&extract_methods);
+ ((extract_class_ty *) pop)->mlp = mlp;
+ po_scan (pop, file_name);
+ po_free (pop);
+}
+
+
+#define TM_YEAR_ORIGIN 1900
+
+/* Yield A - B, measured in seconds. */
+static long
+difftm (a, b)
+ const struct tm *a;
+ const struct tm *b;
+{
+ int ay = a->tm_year + (TM_YEAR_ORIGIN - 1);
+ int by = b->tm_year + (TM_YEAR_ORIGIN - 1);
+ /* Some compilers cannot handle this as a single return statement. */
+ long days = (
+ /* difference in day of year */
+ a->tm_yday - b->tm_yday
+ /* + intervening leap days */
+ + ((ay >> 2) - (by >> 2))
+ - (ay / 100 - by / 100)
+ + ((ay / 100 >> 2) - (by / 100 >> 2))
+ /* + difference in years * 365 */
+ + (long) (ay - by) * 365l);
+
+ return 60l * (60l * (24l * days + (a->tm_hour - b->tm_hour))
+ + (a->tm_min - b->tm_min))
+ + (a->tm_sec - b->tm_sec);
+}
+
+
+static message_ty *
+construct_header ()
+{
+ time_t now;
+ struct tm local_time;
+ message_ty *mp;
+ char *msgstr;
+ static lex_pos_ty pos = { __FILE__, __LINE__, };
+ char tz_sign;
+ long tz_min;
+
+ mp = message_alloc ("");
+
+ if (foreign_user)
+ message_comment_append (mp, "\
+SOME DESCRIPTIVE TITLE.\n\
+FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n");
+ else
+ message_comment_append (mp, "\
+SOME DESCRIPTIVE TITLE.\n\
+Copyright (C) YEAR Free Software Foundation, Inc.\n\
+FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n");
+
+ mp->is_fuzzy = 1;
+
+ time (&now);
+ local_time = *localtime (&now);
+ tz_sign = '+';
+ tz_min = difftm (&local_time, gmtime (&now)) / 60;
+ if (tz_min < 0)
+ {
+ tz_min = -tz_min;
+ tz_sign = '-';
+ }
+
+ asprintf (&msgstr, "\
+Project-Id-Version: PACKAGE VERSION\n\
+POT-Creation-Date: %d-%02d-%02d %02d:%02d%c%02d%02d\n\
+PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n\
+Last-Translator: FULL NAME <EMAIL@ADDRESS>\n\
+Language-Team: LANGUAGE <LL@li.org>\n\
+MIME-Version: 1.0\n\
+Content-Type: text/plain; charset=CHARSET\n\
+Content-Transfer-Encoding: ENCODING\n",
+ local_time.tm_year + TM_YEAR_ORIGIN,
+ local_time.tm_mon + 1,
+ local_time.tm_mday,
+ local_time.tm_hour,
+ local_time.tm_min,
+ tz_sign, tz_min / 60, tz_min % 60);
+
+ if (msgstr == NULL)
+ error (EXIT_FAILURE, errno, _("while preparing output"));
+
+ message_variant_append (mp, MESSAGE_DOMAIN_DEFAULT, msgstr, &pos);
+
+ return mp;
+}
+
+
+/* We make a pessimistic guess whether the given string is a format
+ string or not. Pessimistic means here that with the first
+ occurence of an unknown format element we say `impossible'. */
+static enum is_c_format
+test_whether_c_format (s)
+ const char *s;
+{
+ struct printf_spec spec;
+
+ if (s == NULL || *(s = find_spec (s)) == '\0')
+ /* We return `possible' here because sometimes strings are used
+ with printf even if they don't contain any format specifier.
+ If the translation in this case would contain a specifier, this
+ would result in an error. */
+ return impossible;
+
+ for (s = find_spec (s); *s != '\0'; s = spec.next_fmt)
+ {
+ size_t dummy;
+
+ (void) parse_one_spec (s, 0, &spec, &dummy);
+ if (strchr ("iduoxXeEfgGcspnm", spec.info.spec) == NULL)
+ return impossible;
+ }
+
+ return possible;
+}
+
+
+static void
+ scanner_c (filename, mlp)
+ const char *filename;
+ message_list_ty *mlp;
+{
+ scan_c_file (filename, mlp, 0);
+}
+
+
+static void
+scanner_cxx (filename, mlp)
+ const char *filename;
+ message_list_ty *mlp;
+{
+ scan_c_file (filename, mlp, 1);
+}
+
+
+#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+#define ENDOF(a) ((a) + SIZEOF(a))
+
+
+static scanner_fp
+language_to_scanner (name)
+ const char *name;
+{
+ typedef struct table_ty table_ty;
+ struct table_ty
+ {
+ const char *name;
+ scanner_fp func;
+ };
+
+ static table_ty table[] =
+ {
+ { "C", scanner_c, },
+ { "C++", scanner_cxx, },
+ { "PO", read_po_file, },
+ /* Here will follow more languages and their scanners: awk, perl,
+ etc... Make sure new scanners honor the --exlude-file option. */
+ };
+
+ table_ty *tp;
+
+ for (tp = table; tp < ENDOF(table); ++tp)
+ {
+ if (strcasecmp(name, tp->name) == 0)
+ return tp->func;
+ }
+ error (EXIT_FAILURE, 0, _("language `%s' unknown"), name);
+ /* NOTREACHED */
+ return NULL;
+}
+
+
+static const char *
+extension_to_language (extension)
+ const char *extension;
+{
+ typedef struct table_ty table_ty;
+ struct table_ty
+ {
+ const char *extension;
+ const char *language;
+ };
+
+ static table_ty table[] =
+ {
+ { "c", "C", },
+ { "C", "C++", },
+ { "c++", "C++", },
+ { "cc", "C++", },
+ { "cxx", "C++", },
+ { "h", "C", },
+ { "po", "PO", },
+ { "pot", "PO", },
+ { "pox", "PO", },
+ /* Here will follow more file extensions: sh, pl, tcl ... */
+ };
+
+ table_ty *tp;
+
+ for (tp = table; tp < ENDOF(table); ++tp)
+ {
+ if (strcmp(extension, tp->extension) == 0)
+ return tp->language;
+ }
+ return NULL;
+}
diff --git a/src/ylwrap b/src/ylwrap
new file mode 100755
index 0000000..fbae17b
--- /dev/null
+++ b/src/ylwrap
@@ -0,0 +1,101 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Usage:
+# ylwrap PROGRAM INPUT [OUTPUT DESIRED]... -- [ARGS]...
+# * PROGRAM is program to run.
+# * INPUT is the input file
+# * OUTPUT is file PROG generates
+# * DESIRED is file we actually want
+# * ARGS are passed to PROG
+# Any number of OUTPUT,DESIRED pairs may be used.
+
+# The program to run.
+prog="$1"
+shift
+
+# The input.
+input="$1"
+shift
+case "$input" in
+ /*)
+ # Absolute path; do nothing.
+ ;;
+ *)
+ # Relative path. Make it absolute. Why? Because otherwise any
+ # debugging info in the generated file will point to the wrong
+ # place. This is really gross.
+ input="`pwd`/$input"
+ ;;
+esac
+
+pairlist=
+while test "$#" -ne 0; do
+ if test "$1" = "--"; then
+ break
+ fi
+ pairlist="$pairlist $1"
+ shift
+done
+
+# FIXME: add hostname here for parallel makes that run commands on
+# other machines. But that might take us over the 14-char limit.
+dirname=ylwrap$$
+trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+mkdir $dirname || exit 1
+
+cd $dirname
+$prog ${1+"$@"} "$input"
+status=$?
+
+if test $status -eq 0; then
+ set X $pairlist
+ shift
+ first=yes
+ while test "$#" -ne 0; do
+ if test -f "$1"; then
+ # If $2 is an absolute path name, then just use that,
+ # otherwise prepend `../'.
+ case "$2" in
+ /*) target="$2";;
+ *) target="../$2";;
+ esac
+ mv "$1" "$target" || status=$?
+ else
+ # A missing file is only an error for the first file. This
+ # is a blatant hack to let us support using "yacc -d". If -d
+ # is not specified, we don't want an error when the header
+ # file is "missing".
+ if test $first = yes; then
+ status=1
+ fi
+ fi
+ shift
+ shift
+ first=no
+ done
+else
+ status=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+exit $status
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/stamp-h.in
@@ -0,0 +1 @@
+timestamp
diff --git a/tests/ChangeLog b/tests/ChangeLog
new file mode 100644
index 0000000..2310d0d
--- /dev/null
+++ b/tests/ChangeLog
@@ -0,0 +1,385 @@
+1997-08-01 15:46 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Require version 1.2.
+
+1997-05-01 03:30 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgmerge-2: Update message after last change of the program code.
+
+ * Makefile.am (TESTS_ENVIRONMENT): Define environment variable
+ specifying program names to take care of --program-prefix option
+ to configure.
+
+Fri Dec 6 14:10:05 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (TESTS_ENVIRONMENT): Add $(SHELL) to explicitly use
+ the shell for starting the shell script.
+
+Fri Nov 22 00:35:58 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (TESTS_ENVIRONMENT): Change references to checks/
+ into tests/.
+ * gettext-1: Likewise.
+ * gettext-2: Likewise.
+ * msgfmt-1: Likewise.
+ * msgfmt-2: Likewise.
+ * xgettext-1: Likewise.
+
+Tue Nov 12 17:36:50 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgmerge-1: Fix typo.
+ Reported by Guido Flohr <gufl0000@stud.uni-sb.de>.
+
+Tue Sep 3 18:03:54 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (cmline_TESTS): Remove. Not used in automake-1.1.
+
+ * Makefile.am (TESTS_ENVIRONMENT): Add definition of PATH to find
+ newly built programs. Reported by Kaveh R. Ghazi.
+
+Sun Sep 1 04:43:56 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext-1, gettext-2, msgcmp-1, msgcmp-2, msgfmt-1,
+ msgfmt-2, msgfmt-3, msgfmt-4, msgmerge-1, msgmerge-2,
+ msgmerge-3, msgmerge-4, msgmerge-5, msgunfmt-1,
+ xgettext-1, xgettext-2, xgettext-3, xgettext-4,
+ xgettext-5, xgettext-6, xgettext-7, xgettext-8,
+ xgettext-9: Correct file mode preservation script.
+
+Sat Aug 31 05:17:29 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (TESTS_ENVIRONMENT): Define top_srcdir variable for
+ test files.
+
+ * xgettext-1: Don't define top_srcdir from argument. Assume it in
+ environment.
+ * xgettext-3: Likewise.
+ * gettext-1: Likewise.
+ * gettext-2: Likewise.
+ * msgcmp-1: Likewise.
+ * msgcmp-2: Likewise.
+
+Sun Aug 18 18:53:02 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (distdir): It's not anymore necessary to explicitely
+ mention the dependency.
+
+Mon Jul 15 22:16:03 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext-1, gettext-2, msgcmp-1, msgcmp-2, msgfmt-1, msgfmt-2,
+ msgfmt-3, msgfmt-4, msgmerge-1, msgmerge-2, msgmerge-3,
+ msgmerge-4, msgmerge-5, msgunfmt-1, xgettext-1, xgettext-2,
+ xgettext-3, xgettext-4, xgettext-5, xgettext-6, xgettext-7,
+ xgettext-8, xgettext-9: Change all `${xxx:-yyy}' to (hopefully)
+ portable `: ${xxx=yyy}'. Thank you, Ultrix.
+
+Sat Jul 6 02:01:56 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgfmt-1, msgfmt-2: Add \n to end of first message to prevent
+ error message of new msgfmt.
+
+ * msgfmt-1 (tmpfiles): Correct argument to gettext.
+
+Thu Jun 20 12:48:32 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgmerge-5: Correct result.
+
+Wed Jun 19 03:09:27 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (TESTS): Add msgmerge-5.
+
+ * msgmerge-5: New file.
+
+Fri Jun 14 18:23:51 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgcmp-1: Correct again wrong kind of redirection: use >
+ instead of &>. Reported by Kaveh R. Ghazi.
+
+Fri Jun 14 03:44:01 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgfmt-1, msgfmt-2, gettext-1, gettext-2: Don't set LANG to
+ `checks' but instead `LANGUAGE'. Some systems warn about a
+ non-existing locale `checks', but LANGUAGE is a GNU extension.
+ Reported by Kaveh R. Ghazi.
+
+ * gettext-2, msgfmt-2: Work around echo's not knowing about
+ -n option. Reported by Kaveh R. Ghazi.
+
+Tue Jun 11 15:29:28 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Add variable. Must be defined
+ in all subdirs.
+
+Thu Jun 6 23:40:58 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgcmp-1: Use &> instead of >& for avoiding error messages on
+ screen. Reported by Kaveh Ghazi.
+
+Wed Jun 5 03:51:47 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * gettext-1, gettext-2, msgcmp-1, msgcmp-2, msgfmt-1, msgfmt-2,
+ msgfmt-3, msgfmt-4, msgmerge-1, msgmerge-2, msgmerge-3,
+ msgmerge-4, msgunfmt-1, xgettext-1, xgettext-2, xgettext-3,
+ xgettext-4, xgettext-5, xgettext-6, xgettext-7, xgettext-8,
+ xgettext-9: Add Noah's ELisp trick to preserve the executable
+ bits.
+
+Tue Jun 4 23:56:41 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgmerge-1: Adjust ok file after enable wrapping.
+
+Tue Jun 4 01:00:14 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgmerge-3: Change for situation now that translator comments
+ are copied.
+
+Mon Jun 3 19:40:25 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am (distdir): Make sure xg-test1.ok.po file is up to
+ date before distributing.
+
+ * msgmerge-4: Initial revision.
+
+Mon Jun 3 01:11:03 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.am: New file.
+
+Sun Jun 2 21:10:16 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * msgfmt-2, xgettext-2, msgfmt-1 (tmpfiles): Correct file names.
+
+ * msgfmt-1, msgfmt-2, gettext-2, msgfmt-4, msgfmt-3, msgcmp-2,
+ msgmerge-2, msgmerge-1, msgmerge-3, msgunfmt-1, Makefile.am,
+ msgcmp-1, xgettext-2, xgettext-1, xgettext-3, xgettext-4,
+ xgettext-5, xgettext-6, xgettext-7, xgettext-8, xgettext-9,
+ gettext-1: Initial revision. New test suite for use in automake
+ generated Makefiles.
+
+Fri Apr 5 19:48:53 1996 Ulrich Drepper <drepper@myware>
+
+ * xg-test8.ok: Adapt for fuzzy flag normalization.
+
+ * xg-test8.in.po: Add text so that fuzzy gets copied.
+
+ * Makefile.in (msgmerge): Call msgmerge with -q parameter.
+
+ * mf-test4.in.po: Fill in fields in header entry because of checks
+ in msgfmt.
+
+Tue Apr 2 18:52:23 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Add mf-test4.in.po.
+ (all-gettest): New goal. Same as all.
+ (msgfmt-4): New test for msgfmt.
+
+Tue Apr 2 10:42:09 1996 Ulrich Drepper <drepper@myware>
+
+ * xg-test2.po, xg-test4.ok, xg-test5.ok, xg-test6.ok, xg-test7.ok,
+ xg-test8.ok, xg-test9.ok: Adapt for recent xgettext. No more
+ `possible' comments anymore.
+
+Sun Mar 31 23:49:14 1996 François Pinard <pinard@iro.umontreal.ca>
+
+ * Makefile.in (xgettext-3): Add echo command.
+
+Thu Mar 28 18:45:29 1996 Ulrich Drepper <drepper@myware>
+
+ * xg-test9.ok, xg-test8.ok, xg-test7.ok, xg-test6.ok, xg-test5.ok,
+ xg-test4.ok: Adopt for change in C format string detection.
+
+ * xg-test2.in.c: Add some no-c-format lines to test C format flag
+ handling.
+ * xg-test2.ok-po: Adopt result for above change.
+
+ * Makefile.in (DIFF): Define as `diff $(DIFFARGS)'. This permits
+ to set DIFFARGS=-u in the environment and get rid of those
+ unreadable context diffs.
+
+Wed Mar 27 03:24:43 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (xgettext-9): Add new test for xgettext. This one
+ test extraction of comments.
+ (TESTSRCS): Add xg-test9.c
+ (OKFILES): Add xg-test9.ok
+
+ * xg-test9.c, xg-test9.ok: New files. Input and expected result
+ for test 9 of xgettext.
+
+Tue Mar 26 00:00:34 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Add test 3 for msgmerge.
+ * mm-test3.in1, mm-test3.in2, mm-test3.ok: New files.
+ Test 3 for msgmerge. Tests handling of obsolete entries.
+
+ * Makefile.in: Use reasonable names for msgfmt tests. Suggested
+ by Franc,ois Pinard.
+
+ * Makefile.in (msgunfmt-1): New msgunfmt program interface
+ requires -o option.
+
+Mon Mar 25 03:27:12 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check): Rewritten by Franc,ois Pinard.
+
+ * xg-test8.ok, xg-test8.in.po: Adopt for new implementation of
+ special comments.
+
+Sun Mar 24 01:51:42 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Add check 8 for xgettext. Adopt for input file
+ type recognision of xgettext by renaming files to *.c, *.cc, or
+ *.C.
+
+Fri Mar 1 13:32:53 1996 Ulrich Drepper <drepper@myware>
+
+ * mm-test2.ok: New error message format.
+
+Tue Dec 19 22:13:03 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (Makefile): Explicitly use $(SHELL) for running
+ shell scripts.
+
+Sat Dec 9 12:18:07 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (clean): Correct xg-text2.po to xg-test2.po.
+ Reported by Eric Backus.
+
+Mon Dec 4 01:05:50 1995 Ulrich Drepper <drepper@myware>
+
+ * mm-test1.ok:
+ For now we have long lines. Undo this change when LINE_WIDTH in
+ acconfig.h is changed back.
+
+Sun Dec 3 03:09:43 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (clean): Add xg-test7.po.
+
+ * xg-test7.ok, xg-test7.in: Initial revision
+
+ * Makefile.in (check): Add another test for xgettext.
+
+Fri Nov 17 00:21:37 1995 Ulrich Drepper <drepper@myware>
+
+ * mm-test1.in1, mm-test1.in2, mm-test1.ok, mm-test2.in1,
+ mm-test2.in2, mm-test2.ok, mu-test1.in, xg-test4.in, xg-test4.ok,
+ xg-test5.in, xg-test5.ok, xg-test6.in, xg-test6.ok:
+ Initial revision.
+
+ * Makefile.in: Add additional test by Peter Miller.
+
+Sat Nov 11 17:58:42 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (clean): Remove xg-text2.po.
+
+ * xg-test2.ok.po: Adapt for new xgettext.
+
+Thu Nov 9 00:56:57 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist):
+ Write newly created xg-test1.ok.po file to $(srcdir).
+
+Tue Nov 7 01:33:49 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check):
+ Make message for successful completion more visible.
+
+Sun Nov 5 19:40:18 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist-gettext): Make synonym for dist.
+
+Sun Nov 5 11:37:20 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (dist): Suppress error message when ln failed.
+ Get files from $(srcdir) explicitly.
+
+Sun Oct 29 12:22:48 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check):
+ In msgcmp test2 pipe result through sed to remove $(prefix).
+
+ * Makefile.in (check):
+ Add some missing $(srcdir)/. Reported by Franc,ois Pinard.
+
+Sat Oct 28 15:35:36 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Remove Emacs local variables setting.
+
+ * Makefile.in (check):
+ Don't print out command for msgcmp test 1 because it contains
+ the word `failed'.
+
+ * mc-test1.in1, mc-test1.in2, mc-test2.in1, mc-test2.in2,
+ mc-test2.ok, test5.po, xg-test1.ok.po, xg-test2.in, xg-test2.ok.po:
+ Initial revision.
+
+ * Makefile.in (MSGCMP):
+ New variable. The file name includes actions on env.vars
+ because be test for the error messages we get.
+ (TESTSRCS, OKFILES): Add files for new tests.
+ (check): Add some test. Taken from Peter Miller's version.
+
+Fri Oct 27 02:10:46 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check): Buglix's sh workaround by Christian von Roques.
+
+Wed Sep 20 09:30:46 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check): Add test for -x option of xgettext.
+ (clean): Remove test file for above test.
+
+Tue Aug 15 06:06:51 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check):
+ Correct TEXTDOMAINDIR value for msgfmt tests: is really `..', but
+ $(top_srcdir) for the gettext tests.
+
+Mon Aug 14 23:51:53 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): New no-op goal.
+
+Wed Aug 9 00:48:08 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check):
+ After extending the locale specification by processing `LANGUAGE'
+ it is necessary to clear this environment variable, too.
+
+Fri Aug 4 16:31:58 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (clean): Remove LC_MESSAGES/gen.mo.
+
+ * Makefile.in (dist): Change mode of LC_MESSAGE directory to 777.
+ Remove `copying instead' message.
+
+Wed Aug 2 23:35:08 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (check): Add check for msgfmt and gettext.
+
+ * test2.ok, test1.ok: Initial revision.
+
+Sat Jul 15 23:45:53 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Change head comment.
+ (check): Remove msgfmt tests for now (does not handle
+ big<->little endian difference).
+ (check): Add success messages.
+ (install, uninstall): Add missing dummy goals.
+
+Sat Jul 15 00:24:55 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (OKFILES, check, clean):
+ Use shortened names for .mo files.
+
+ * module1.po (help_domain, error_domain):
+ Shorten names for file systems with 14 char limit.
+
+ * module2.po (error_domain, window_domain):
+ Shorten names for file systems with 14 char limit.
+
+Thu Jul 13 00:54:14 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Add ChangeLog and OKFILES.
+
+Wed Jul 12 22:12:05 1995 Ulrich Drepper <drepper@myware>
+
+ * module2.po, module1.po, help_domain.ok, error_domain.ok,
+ window_domain.ok, messages.ok, Makefile.in: Initial revision.
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..98e970a
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,43 @@
+## Makefile for the check subdirectory of the GNU NLS Utilities
+## Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+## Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+TESTS = gettext-1 gettext-2 msgcmp-1 msgcmp-2 msgfmt-1 msgfmt-2 msgfmt-3 \
+ msgfmt-4 msgmerge-1 msgmerge-2 msgmerge-3 msgmerge-4 msgmerge-5 \
+ msgunfmt-1 xgettext-1 xgettext-2 xgettext-3 xgettext-4 xgettext-5 \
+ xgettext-6 xgettext-7 xgettext-8 xgettext-9
+
+EXTRA_DIST = $(TESTS) test.mo xg-test1.ok.po
+
+XGETTEXT = ../src/xgettext
+
+TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=../src:$$PATH \
+ GETTEXT=`echo gettext|sed '$(transform)'` \
+ XGETTEXT=`echo xgettext|sed '$(transform)'` \
+ MSGFMT=`echo msgfmt|sed '$(transform)'` \
+ MSGCMP=`echo msgcmp|sed '$(transform)'` \
+ MSGMERGE=`echo msgmerge|sed '$(transform)'` \
+ MSGUNFMT=`echo msgunfmt|sed '$(transform)'` $(SHELL)
+
+xg-test1.ok.po: $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \
+ $(top_srcdir)/src/gettextp.c
+ $(XGETTEXT) -d xg-test1.ok -p $(srcdir) -k_ --omit-header \
+ $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \
+ $(top_srcdir)/src/gettextp.c
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..b37ff34
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,249 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+ACLOCAL_VERSION = @ACLOCAL_VERSION@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+EMACS = @EMACS@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LIBOBJS = @LIBOBJS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+YACC = @YACC@
+aclocaldir = @aclocaldir@
+l = @l@
+lispdir = @lispdir@
+
+AUTOMAKE_OPTIONS = 1.2 gnits
+
+TESTS = gettext-1 gettext-2 msgcmp-1 msgcmp-2 msgfmt-1 msgfmt-2 msgfmt-3 msgfmt-4 msgmerge-1 msgmerge-2 msgmerge-3 msgmerge-4 msgmerge-5 msgunfmt-1 xgettext-1 xgettext-2 xgettext-3 xgettext-4 xgettext-5 xgettext-6 xgettext-7 xgettext-8 xgettext-9
+
+
+EXTRA_DIST = $(TESTS) test.mo xg-test1.ok.po
+
+XGETTEXT = ../src/xgettext
+
+TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=../src:$$PATH GETTEXT=`echo gettext|sed '$(transform)'` XGETTEXT=`echo xgettext|sed '$(transform)'` MSGFMT=`echo msgfmt|sed '$(transform)'` MSGCMP=`echo msgcmp|sed '$(transform)'` MSGMERGE=`echo msgmerge|sed '$(transform)'` MSGUNFMT=`echo msgunfmt|sed '$(transform)'` $(SHELL)
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = ChangeLog Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = tests
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits tests/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+check-TESTS: $(TESTS)
+ @failed=0; all=0; \
+ srcdir=$(srcdir); export srcdir; \
+ for tst in $(TESTS); do \
+ if test -f $$tst; then dir=.; \
+ else dir="$(srcdir)"; fi; \
+ if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+ all=`expr $$all + 1`; \
+ echo "PASS: $$tst"; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="$$failed of $$all tests failed"; \
+ fi; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+xg-test1.ok.po: $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \
+ $(top_srcdir)/src/gettextp.c
+ $(XGETTEXT) -d xg-test1.ok -p $(srcdir) -k_ --omit-header \
+ $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \
+ $(top_srcdir)/src/gettextp.c
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/gettext-1 b/tests/gettext-1
new file mode 100755
index 0000000..2e8b967
--- /dev/null
+++ b/tests/gettext-1
@@ -0,0 +1,47 @@
+#! /bin/sh
+# One argument is required which is the path to the toplevel directory
+# of the distribution.
+
+TEXTDOMAINDIR=..
+LANGUAGE=tests
+LC_ALL=
+LC_MESSAGES=
+LANG=
+export TEXTDOMAINDIR LANGUAGE LC_ALL LC_MESSAGES LANG
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# Create binary test file in correct position.
+tmpfiles="LC_MESSAGES"
+test -d LC_MESSAGES || mkdir LC_MESSAGES
+cp $top_srcdir/tests/test.mo LC_MESSAGES
+
+tmpfiles="$tmpfiles gt-test1.out"
+: ${GETTEXT=gettext}
+${GETTEXT} test 'SYS_(C)' > gt-test1.out
+
+# Create correct file.
+tmpfile="$tmpfiles gtmf-test1.ok"
+cat <<EOF > gtmf-test1.ok
+MSGFMT(3) portable message object file compiler
+Copyright (C) 1995 Free Software Foundation
+Report bugs to <bug-gnu-utils@gnu.ai.mit.edu>
+EOF
+
+: ${DIFF=diff}
+${DIFF} gtmf-test1.ok gt-test1.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/gettext-2 b/tests/gettext-2
new file mode 100755
index 0000000..87f4022
--- /dev/null
+++ b/tests/gettext-2
@@ -0,0 +1,55 @@
+#! /bin/sh
+# One argument is required which is the path to the toplevel directory
+# of the distribution.
+
+TEXTDOMAINDIR=..
+LANGUAGE=tests
+LC_ALL=
+LC_MESSAGES=
+LANG=
+export TEXTDOMAINDIR LANGUAGE LC_ALL LC_MESSAGES LANG
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# Create binary test file in correct position.
+tmpfiles="LC_MESSAGES"
+test -d LC_MESSAGES || mkdir LC_MESSAGES
+cp $top_srcdir/tests/test.mo LC_MESSAGES
+
+tmpfiles="$tmpfiles gt-test2.out"
+: ${GETTEXT=gettext}
+${GETTEXT} test 'error 3' > gt-test2.out
+
+# Create correct file.
+tmpfile="$tmpfiles gtmf-test2.ok"
+echo $ac_n "error 3 translation$ac_c" > gtmf-test2.ok
+
+: ${DIFF=diff}
+${DIFF} gtmf-test2.ok gt-test2.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgcmp-1 b/tests/msgcmp-1
new file mode 100755
index 0000000..55683a0
--- /dev/null
+++ b/tests/msgcmp-1
@@ -0,0 +1,34 @@
+#! /bin/sh
+# One argument is required which is the path to the toplevel directory
+# of the distribution.
+
+tmpfiles="mc-test1.in1 mc-test1.in2"
+cat <<EOF > mc-test1.in1
+msgid "one" msgstr "first"
+msgid "two" msgstr "second"
+msgid "three" msgstr "third"
+EOF
+
+cat <<EOF > mc-test1.in2
+msgid "three" msgstr ""
+msgid "one" msgstr ""
+msgid "two" msgstr ""
+EOF
+
+: ${MSGCMP=msgcmp}
+${MSGCMP} mc-test1.in1 mc-test1.in2 > /dev/null 2>&1
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgcmp-2 b/tests/msgcmp-2
new file mode 100755
index 0000000..b0bbc91
--- /dev/null
+++ b/tests/msgcmp-2
@@ -0,0 +1,53 @@
+#! /bin/sh
+# One argument is required which is the path to the toplevel directory
+# of the distribution.
+
+LANGUAGE=
+LC_ALL=
+LC_MESSAGES=
+LANG=
+export LANGUAGE LC_ALL LC_MESSAGES LANG
+
+tmpfiles="mc-test2.in1 mc-test2.in2"
+cat <<EOF > mc-test2.in1
+msgid "one" msgstr "first"
+msgid "two" msgstr "second"
+msgid "three" msgstr "third"
+msgid "four" msgstr "fourth"
+EOF
+
+cat <<EOF > mc-test2.in2
+msgid "thre" msgstr "" #i.e. pretend a typo in the program
+msgid "one" msgstr ""
+msgid "two" msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mc-test2.out"
+: ${MSGCMP=msgcmp}
+${MSGCMP} mc-test2.in1 mc-test2.in2 > mc-test2.out 2>&1
+
+tmpfiles="$tmpfiles mc-test2.ok"
+cat <<EOF > mc-test2.ok
+mc-test2.in2:1: this message is used but not defined...
+mc-test2.in1:3: ...but this definition is similar
+mc-test2.in1:4: warning: this message is not used
+found 1 fatal errors
+EOF
+
+: ${DIFF=diff}
+${DIFF} mc-test2.ok mc-test2.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgfmt-1 b/tests/msgfmt-1
new file mode 100755
index 0000000..033843d
--- /dev/null
+++ b/tests/msgfmt-1
@@ -0,0 +1,80 @@
+#! /bin/sh
+
+TEXTDOMAINDIR=..
+LANGUAGE=tests
+LC_ALL=
+LC_MESSAGES=
+LANG=
+export TEXTDOMAINDIR LANGUAGE LC_ALL LC_MESSAGES LANG
+
+tmpfiles="LC_MESSAGES"
+test -d LC_MESSAGES || mkdir LC_MESSAGES
+
+tmpfiles="$tmpfiles module1.po module2.po"
+cat <<EOF > module1.po
+#default domain "messages.mo"
+msgid "SYS_(C)\n"
+msgstr "MSGFMT(3) portable message object file compiler\n"
+"Copyright (C) 1995 Free Software Foundation\n"
+"Report bugs to <bug-gnu-utils@gnu.ai.mit.edu>\n"
+msgid "msg 1"
+msgstr "msg 1 translation"
+#
+domain "help_dom"
+msgid "help 2 %d"
+msgstr "help 2 translation"
+#
+domain "error_dom"
+msgid "error 3"
+msgstr "error 3 translation"
+EOF
+
+cat <<EOF > module2.po
+# ---
+#default domain "messages.mo"
+msgid "mesg 4"
+msgstr "mesg 4 translation"
+#
+domain "error_dom"
+msgid "error 3"
+msgstr "alternate error 2 translation"
+msgid "error 5"
+msgstr "error 5 translation"
+#
+domain "window_dom"
+msgid "window 6"
+msgstr "window 6 translation"
+EOF
+
+: ${MSGFMT=msgfmt}
+${MSGFMT} module1.po module2.po -o LC_MESSAGES/gen.mo
+
+tmpfiles="$tmpfiles mf-test1.out"
+: ${GETTEXT=gettext}
+${GETTEXT} gen 'SYS_(C)
+' > mf-test1.out
+
+tmpfiles="$tmpfiles gtmf-test1.ok"
+cat <<EOF > gtmf-test1.ok
+MSGFMT(3) portable message object file compiler
+Copyright (C) 1995 Free Software Foundation
+Report bugs to <bug-gnu-utils@gnu.ai.mit.edu>
+EOF
+
+: ${DIFF=diff}
+${DIFF} gtmf-test1.ok mf-test1.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgfmt-2 b/tests/msgfmt-2
new file mode 100755
index 0000000..5acc2db
--- /dev/null
+++ b/tests/msgfmt-2
@@ -0,0 +1,89 @@
+#! /bin/sh
+
+TEXTDOMAINDIR=..
+LANGUAGE=tests
+LC_ALL=
+LC_MESSAGES=
+LANG=
+export TEXTDOMAINDIR LANGUAGE LC_ALL LC_MESSAGES LANG
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="LC_MESSAGES"
+test -d LC_MESSAGES || mkdir LC_MESSAGES
+
+tmpfiles="$tmpfiles module1.po module2.po"
+cat <<EOF > module1.po
+#default domain "messages.mo"
+msgid "SYS_(C)\n"
+msgstr "MSGFMT(3) portable message object file compiler\n"
+"Copyright (C) 1995 Free Software Foundation\n"
+"Report bugs to <bug-gnu-utils@gnu.ai.mit.edu>\n"
+msgid "msg 1"
+msgstr "msg 1 translation"
+#
+domain "help_dom"
+msgid "help 2 %d"
+msgstr "help 2 translation"
+#
+domain "error_dom"
+msgid "error 3"
+msgstr "error 3 translation"
+EOF
+
+cat <<EOF > module2.po
+# ---
+#default domain "messages.mo"
+msgid "mesg 4"
+msgstr "mesg 4 translation"
+#
+domain "error_dom"
+msgid "error 3"
+msgstr "alternate error 2 translation"
+msgid "error 5"
+msgstr "error 5 translation"
+#
+domain "window_dom"
+msgid "window 6"
+msgstr "window 6 translation"
+EOF
+
+: ${MSGFMT=msgfmt}
+${MSGFMT} module1.po module2.po -o LC_MESSAGES/gen.mo
+
+tmpfiles="$tmpfiles mf-test2.out"
+: ${GETTEXT=gettext}
+${GETTEXT} gen 'error 3' > mf-test2.out
+
+tmpfiles="$tmpfiles gtmf-test2.ok"
+echo $ac_n "error 3 translation$ac_c" > gtmf-test2.ok
+
+: ${DIFF=diff}
+${DIFF} gtmf-test2.ok mf-test2.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgfmt-3 b/tests/msgfmt-3
new file mode 100755
index 0000000..3aeb9d1
--- /dev/null
+++ b/tests/msgfmt-3
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mf-test3.po"
+cat <<EOF >mf-test3.po
+#
+# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+# xxxxxxxxxxxxxxxxxxxx
+#
+# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+msgid ""
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mftest3.mo"
+: ${MSGFMT=msgfmt}
+${MSGFMT} mf-test3.po -o mftest3.mo
+
+test ! -f mftest3.mo
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgfmt-4 b/tests/msgfmt-4
new file mode 100755
index 0000000..2a22fac
--- /dev/null
+++ b/tests/msgfmt-4
@@ -0,0 +1,51 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mf-test4.po"
+cat <<EOF >mf-test4.po
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: msgfmt test 4\n"
+"PO-Revision-Date: 1996-04-05 19:47+0200\n"
+"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
+"Language-Team: test <test@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+#
+#, no-c-format
+msgid "no percent"
+msgstr "but here %d is one"
+#
+#, c-format
+msgid "in the %d normal %c order %s\n"
+msgstr "but %2$c not %3$s here %1$d\n"
+#
+# If no c-format is given no check is wanted, not only if no-c-format is there.
+msgid "This is a string %s"
+msgstr "...but this $s not"
+EOF
+
+: ${MSGFMT=msgfmt}
+${MSGFMT} mf-test4.po -o /dev/null 2> /dev/null
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgmerge-1 b/tests/msgmerge-1
new file mode 100755
index 0000000..65ea1e5
--- /dev/null
+++ b/tests/msgmerge-1
@@ -0,0 +1,81 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mm-test1.in1 mm-test1.in2"
+cat <<EOF > mm-test1.in1
+# first
+#. this should be discarded
+msgid "1"
+msgstr "1x"
+# second
+#: bogus:1
+msgid "2"
+msgstr "this is a really long msgstr "
+ "used to test the wrapping to "
+ "make sure it works after all "
+ "what is a test for if not to test things?"
+# third
+msgid "3"
+msgstr "3z"
+EOF
+
+cat <<EOF > mm-test1.in2
+#. this is the first
+#: snark.c:345
+msgid "1"
+msgstr ""
+#. this is the second
+#: hunt.c:759
+msgid "2"
+msgstr ""
+#. this is the third
+#: boojum.c:300
+msgid "3"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mm-test1.out"
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} -q mm-test1.in1 mm-test1.in2 -o mm-test1.out
+
+tmpfiles="$tmpfiles mm-test1.ok"
+cat << EOF > mm-test1.ok
+# first
+#. this is the first
+#: snark.c:345
+msgid "1"
+msgstr "1x"
+
+# second
+#. this is the second
+#: hunt.c:759
+msgid "2"
+msgstr ""
+"this is a really long msgstr used to test the wrapping to make sure it works "
+"after all what is a test for if not to test things?"
+
+# third
+#. this is the third
+#: boojum.c:300
+msgid "3"
+msgstr "3z"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test1.ok mm-test1.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgmerge-2 b/tests/msgmerge-2
new file mode 100755
index 0000000..73f8249
--- /dev/null
+++ b/tests/msgmerge-2
@@ -0,0 +1,52 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+LANGUAGE=
+LC_ALL=
+LC_MESSAGES=
+LANG=
+export LANGUAGE LC_ALL LC_MESSAGES LANG
+
+tmpfiles="mm-test2.in1 mm-test2.in2"
+cat <<EOF > mm-test2.in1
+msgid "2" msgstr "2"
+msgid "3" msgstr "3"
+msgid "2" msgstr "ha ha"
+EOF
+
+cat <<EOF > mm-test2.in2
+msgid "1" msgstr ""
+msgid "2" msgstr ""
+msgid "3" msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mm-test2.out"
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} -q mm-test2.in1 mm-test2.in2 -o /dev/stdout \
+ 2> mm-test2.out
+
+tmpfiles="$tmpfiles mm-test2.ok"
+cat << EOF > mm-test2.ok
+mm-test2.in1:3: duplicate message definition
+mm-test2.in1:1: ...this is the location of the first definition
+found 1 fatal errors
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test2.ok mm-test2.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgmerge-3 b/tests/msgmerge-3
new file mode 100755
index 0000000..3a3dd4f
--- /dev/null
+++ b/tests/msgmerge-3
@@ -0,0 +1,92 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mm-test3.in1 mm-test3.in2"
+cat <<EOF > mm-test3.in1
+#
+# def.po
+#
+#: file:100
+msgid ""
+"not existing"
+msgstr "but with translation"
+
+#: file2:101
+msgid "not existing without translation"
+msgstr ""
+
+#: file3:102
+msgid "still existing"
+msgstr "translation"
+
+#: should-not-be-here:10
+#~ msgid "former obsolete"
+#~ msgstr ""
+#~ "but again useful"
+
+#~ msgid "this stays obsolete"
+#~ msgstr "even after running msgmerge"
+
+#
+# trailing comments should be removed
+EOF
+
+cat <<EOF > mm-test3.in2
+#
+# ref.po
+#
+#: file3:102
+msgid "still existing"
+msgstr "here is normally no comment"
+
+#: file4:10
+msgid ""
+"former obsolete"
+msgstr ""
+
+#
+# trailing comments should be removed, even here
+EOF
+
+tmpfiles="$tmpfiles mm-test3.out"
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} -q mm-test3.in1 mm-test3.in2 -o mm-test3.out
+
+tmpfiles="$tmpfiles mm-test3.ok"
+cat << EOF > mm-test3.ok
+#: file3:102
+msgid "still existing"
+msgstr "translation"
+
+#: file4:10
+msgid "former obsolete"
+msgstr "but again useful"
+
+#
+# def.po
+#
+#~ msgid "not existing"
+#~ msgstr "but with translation"
+
+#~ msgid "this stays obsolete"
+#~ msgstr "even after running msgmerge"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test3.ok mm-test3.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgmerge-4 b/tests/msgmerge-4
new file mode 100755
index 0000000..63c0551
--- /dev/null
+++ b/tests/msgmerge-4
@@ -0,0 +1,65 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mm-test4.in1.po mm-test4.in2.po"
+cat <<EOF > mm-test4.in1.po
+msgid "one"
+msgstr "eins"
+# This comment should be copied.
+msgid "two"
+msgstr "zwei"
+
+
+# And this one, too.
+#~ msgid "four"
+#~ msgstr "vier"
+EOF
+
+cat <<EOF > mm-test4.in2.po
+msgid "one"
+msgstr ""
+# This is a comment in the POT file.
+msgid "three"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mm-test4.out"
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} -q mm-test4.in1.po mm-test4.in2.po -o mm-test4.out
+
+tmpfiles="$tmpfiles mm-test4.ok"
+cat <<EOF > mm-test4.ok
+msgid "one"
+msgstr "eins"
+
+# This is a comment in the POT file.
+msgid "three"
+msgstr ""
+
+# This comment should be copied.
+#~ msgid "two"
+#~ msgstr "zwei"
+
+# And this one, too.
+#~ msgid "four"
+#~ msgstr "vier"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test4.ok mm-test4.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgmerge-5 b/tests/msgmerge-5
new file mode 100755
index 0000000..45cca00
--- /dev/null
+++ b/tests/msgmerge-5
@@ -0,0 +1,83 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mm-test5.in1.po mm-test5.in2.po"
+cat <<EOF > mm-test5.in1.po
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Content-Transfer-Encoding: ENCODING\n"
+"MIME-Version: 1.0\n"
+"Test: bla bla\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Project-Id-Version: PACKAGE VERSION\n"
+
+msgid ""
+"whatever, doesn't matter\n"
+msgstr ""
+"blah blah blah blah blah blah blah blah blah blah blah blah blah bla bla bla\n"
+EOF
+
+cat <<EOF > mm-test5.in2.po
+msgid ""
+msgstr ""
+
+msgid ""
+"whatever, doesn't matter\n"
+msgstr ""
+"blah blah blah blah blah blah blah blah blah blah blah blah blah bla bla bla\n"
+EOF
+
+tmpfiles="$tmpfiles mm-test5.out"
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} -q mm-test5.in1.po mm-test5.in2.po -o mm-test5.out
+
+tmpfiles="$tmpfiles mm-test5.ok"
+cat <<EOF > mm-test5.ok
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+"Test: bla bla\n"
+
+msgid "whatever, doesn't matter\n"
+msgstr ""
+"blah blah blah blah blah blah blah blah blah blah blah blah blah bla bla "
+"bla\n"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test5.ok mm-test5.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/msgunfmt-1 b/tests/msgunfmt-1
new file mode 100755
index 0000000..89ffffd
--- /dev/null
+++ b/tests/msgunfmt-1
@@ -0,0 +1,56 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mu-test1.in"
+cat <<EOF > mu-test1.in
+msgid "eight"
+msgstr "eighth"
+
+msgid "five"
+msgstr "fifth"
+
+msgid "four"
+msgstr "fourth"
+
+msgid "one"
+msgstr "first"
+
+msgid "seven"
+msgstr "seventh"
+
+msgid "six"
+msgstr "sixth"
+
+msgid "three"
+msgstr "third"
+
+msgid "two"
+msgstr "second"
+EOF
+
+tmpfiles="$tmpfiles mu-test1.mo"
+: ${MSGFMT=msgfmt}
+${MSGFMT} mu-test1.in -o mu-test1.mo
+
+tmpfiles="$tmpfiles mu-test1.out"
+: ${MSGUNFMT=msgunfmt}
+${MSGUNFMT} mu-test1.mo -o mu-test1.out
+
+: ${DIFF=diff}
+${DIFF} mu-test1.in mu-test1.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/test.mo b/tests/test.mo
new file mode 100644
index 0000000..f8dbf70
--- /dev/null
+++ b/tests/test.mo
Binary files differ
diff --git a/tests/xg-test1.ok.po b/tests/xg-test1.ok.po
new file mode 100644
index 0000000..49366c4
--- /dev/null
+++ b/tests/xg-test1.ok.po
@@ -0,0 +1,235 @@
+msgid "while preparing output"
+msgstr ""
+
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr ""
+
+msgid "--join-existing cannot be used when output is written to stdout"
+msgstr ""
+
+msgid "xgettext cannot work without keywords to look for"
+msgstr ""
+
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+msgid "no input file given"
+msgstr ""
+
+#, c-format
+msgid "warning: file `%s' extension `%s' is unknown; will try C"
+msgstr ""
+
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr ""
+
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] INPUTFILE ...\n"
+"Extract translatable string from given input files.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --extract-all extract all strings\n"
+" -c, --add-comments[=TAG] place comment block with TAG (or those\n"
+" preceding keyword lines) in output file\n"
+" -C, --c++ shorthand for --language=C++\n"
+" --debug more detailed formatstring recognision result\n"
+" -d, --default-domain=NAME use NAME.po for output (instead of messages.po)\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -e, --no-escape do not use C escapes in output (default)\n"
+" -E, --escape use C escapes in output, no extended chars\n"
+" -f, --files-from=FILE get list of input files from FILE\n"
+" --force-po write PO file even if empty\n"
+" --foreign-user omit FSF copyright in output for foreign user\n"
+" -F, --sort-by-file sort output by file location\n"
+msgstr ""
+
+#, c-format, no-wrap
+msgid ""
+" -h, --help display this help and exit\n"
+" -i, --indent write the .po file using indented style\n"
+" -j, --join-existing join messages with existing file\n"
+" -k, --keyword[=WORD] additonal keyword to be looked for (without\n"
+" WORD means not to use default keywords)\n"
+" -l, --string-limit=NUMBER set string length limit to NUMBER instead %u\n"
+" -L, --language=NAME recognise the specified language (C, C++, PO),\n"
+" otherwise is guessed from file extension\n"
+" -m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n"
+" -M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n"
+" --no-location do not write '#: filename:line' lines\n"
+msgstr ""
+
+#, no-wrap
+msgid ""
+" -n, --add-location generate '#: filename:line' lines (default)\n"
+" --omit-header don't write header with `msgid \"\"' entry\n"
+" -o, --output=FILE write output to specified file\n"
+" -p, --output-dir=DIR output files will be placed in directory DIR\n"
+" -s, --sort-output generate sorted output and remove duplicates\n"
+" --strict write out strict Uniforum conforming .po file\n"
+" -T, --trigraphs understand ANSI C trigraphs for input\n"
+" -V, --version output version information and exit\n"
+" -w, --width=NUMBER set output page width\n"
+" -x, --exclude-file=FILE entries from FILE are not extracted\n"
+"\n"
+"If INPUTFILE is -, standard input is read.\n"
+msgstr ""
+
+msgid "Report bugs to <bug-gnu-utils@gnu.org>.\n"
+msgstr ""
+
+#, c-format
+msgid "error while opening \"%s\" for reading"
+msgstr ""
+
+msgid "this file may not contain domain directives"
+msgstr ""
+
+msgid "duplicate message definition"
+msgstr ""
+
+msgid "...this is the location of the first definition"
+msgstr ""
+
+#, c-format
+msgid "language `%s' unknown"
+msgstr ""
+
+#, c-format
+msgid "error while opening \"%s\" for writing"
+msgstr ""
+
+#, c-format
+msgid "%d translated messages"
+msgstr ""
+
+#, c-format
+msgid ", %d fuzzy translations"
+msgstr ""
+
+#, c-format
+msgid ", %d untranslated messages"
+msgstr ""
+
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] filename.po ...\n"
+"Generate binary message catalog from textual translation description.\n"
+"\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -a, --alignment=NUMBER align strings to NUMBER bytes (default: %d)\n"
+" -c, --check perform language dependent checks on strings\n"
+" -D, --directory=DIRECTORY add DIRECTORY to list for input files search\n"
+" -f, --use-fuzzy use fuzzy entries in output\n"
+" -h, --help display this help and exit\n"
+" --no-hash binary file will not include the hash table\n"
+" -o, --output-file=FILE specify output file name as FILE\n"
+" --statistics print statistics about translations\n"
+" --strict enable strict Uniforum mode\n"
+" -v, --verbose list input file anomalies\n"
+" -V, --version output version information and exit\n"
+"\n"
+"Giving the -v option more than once increases the verbosity level.\n"
+"\n"
+"If input file is -, standard input is read. If output file is -,\n"
+"output is written to standard output.\n"
+msgstr ""
+
+msgid "while creating hash table"
+msgstr ""
+
+#, c-format
+msgid "%s: warning: PO file header missing, fuzzy, or invalid"
+msgstr ""
+
+#, c-format
+msgid "domain name \"%s\" not suitable as file name"
+msgstr ""
+
+#, c-format
+msgid "domain name \"%s\" not suitable as file name: will use prefix"
+msgstr ""
+
+#, c-format
+msgid "`domain %s' directive ignored"
+msgstr ""
+
+msgid "empty `msgstr' entry ignored"
+msgstr ""
+
+msgid "fuzzy `msgstr' entry ignored"
+msgstr ""
+
+#, c-format
+msgid "headerfield `%s' missing in header"
+msgstr ""
+
+#, c-format
+msgid "header field `%s' should start at beginning of line"
+msgstr ""
+
+msgid "some header fields still have the initial default value"
+msgstr ""
+
+#, c-format
+msgid "field `%s' still has initial default value"
+msgstr ""
+
+#, c-format
+msgid "%s: warning: source file contains fuzzy translation"
+msgstr ""
+
+msgid "`msgid' and `msgstr' entries do not both begin with '\\n'"
+msgstr ""
+
+msgid "`msgid' and `msgstr' entries do not both end with '\\n'"
+msgstr ""
+
+msgid "number of format specifications in `msgid' and `msgstr' does not match"
+msgstr ""
+
+#, c-format
+msgid "format specifications for argument %u are not the same"
+msgstr ""
+
+msgid "missing arguments"
+msgstr ""
+
+msgid "too many arguments"
+msgstr ""
+
+#, c-format, no-wrap
+msgid ""
+"Usage: %s [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID]...]]\n"
+" -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"
+" -e enable expansion of some escape sequences\n"
+" -E (ignored for compatibility)\n"
+" -h, --help display this help and exit\n"
+" -n suppress trailing newline\n"
+" -V, --version display version information and exit\n"
+" [TEXTDOMAIN] MSGID retrieve translated message corresponding\n"
+" to MSGID from TEXTDOMAIN\n"
+msgstr ""
+
+#, c-format, no-wrap
+msgid ""
+"\n"
+"If the TEXTDOMAIN parameter is not given, the domain is determined from the\n"
+"environment variable TEXTDOMAIN. If the message catalog is not found in the\n"
+"regular directory, another location can be specified with the environment\n"
+"variable TEXTDOMAINDIR.\n"
+"When used with the -s option the program behaves like the `echo' command.\n"
+"But it does not simply copy its arguments to stdout. Instead those messages\n"
+"found in the selected catalog are translated.\n"
+"Standard search directory: %s\n"
+msgstr ""
diff --git a/tests/xgettext-1 b/tests/xgettext-1
new file mode 100755
index 0000000..84cb1e8
--- /dev/null
+++ b/tests/xgettext-1
@@ -0,0 +1,28 @@
+#! /bin/sh
+# One argument is required which is the path to the toplevel directory
+# of the distribution.
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="xg-test1.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} -d xg-test1 -k_ --omit-header \
+ $top_srcdir/src/xgettext.c $top_srcdir/src/msgfmt.c $top_srcdir/src/gettextp.c
+
+: ${DIFF=diff}
+${DIFF} $top_srcdir/tests/xg-test1.ok.po xg-test1.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/xgettext-2 b/tests/xgettext-2
new file mode 100755
index 0000000..c525a66
--- /dev/null
+++ b/tests/xgettext-2
@@ -0,0 +1,51 @@
+#! /bin/sh
+
+tmpfiles="xg-test2.in.c"
+cat <<EOF > xg-test2.in.c
+This is a test of the xgettext functionality.
+/* xgettext:no-c-format */
+_("extract me")
+Sometimes keywords can be spread apart
+xgettext:no-c-format
+_ ( "what about me" )
+And even further on accasion
+_
+(
+"hello"
+)
+EOF
+
+tmpfiles="$tmpfiles xg-test2.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} -d xg-test2 -k_ --omit-header xg-test2.in.c
+
+tmpfiles="$tmpfiles xg-test2.ok"
+cat <<EOF > xg-test2.ok
+#, no-c-format
+msgid "extract me"
+msgstr ""
+
+msgid "what about me"
+msgstr ""
+
+msgid "hello"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test2.ok xg-test2.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/xgettext-3 b/tests/xgettext-3
new file mode 100755
index 0000000..50e7a10
--- /dev/null
+++ b/tests/xgettext-3
@@ -0,0 +1,28 @@
+#! /bin/sh
+# One argument is required which is the path to the toplevel directory
+# of the distribution.
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="zero-domain.po"
+rm -f zero-domain.po
+: ${XGETTEXT=xgettext}
+${XGETTEXT} -k_ -d zero-domain -x $top_srcdir/po/gettext.pot \
+ $top_srcdir/src/xgettext.c
+
+test ! -f zero-domain.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/xgettext-4 b/tests/xgettext-4
new file mode 100755
index 0000000..62eeb56
--- /dev/null
+++ b/tests/xgettext-4
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="xg-test4.in.c"
+cat <<EOF > xg-test4.in.c
+#line 42 "bozo"
+main(){printf(gettext("Hello, World!\n"));}
+# 6 "clown"
+gettext("nothing");
+EOF
+
+tmpfiles="$tmpfiles xg-test4.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --add-location xg-test4.in.c -d xg-test4
+
+tmpfiles="$tmpfiles xg-test4.ok"
+cat <<EOF > xg-test4.ok
+#: bozo:42
+msgid "Hello, World!\n"
+msgstr ""
+
+#: clown:6
+msgid "nothing"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test4.ok xg-test4.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/xgettext-5 b/tests/xgettext-5
new file mode 100755
index 0000000..d231fe8
--- /dev/null
+++ b/tests/xgettext-5
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-test5.in.c"
+cat <<EOF > xg-test5.in.c
+main()??<printf(gettext("Hello, " "World!" "??/n")); ??>
+EOF
+
+tmpfiles="$tmpfiles xg-test5.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --trigraphs xg-test5.in.c -d xg-test5
+
+tmpfiles="$tmpfiles xg-test5.ok"
+cat <<EOF > xg-test5.ok
+msgid "Hello, World!\n"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test5.ok xg-test5.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/xgettext-6 b/tests/xgettext-6
new file mode 100755
index 0000000..88a139a
--- /dev/null
+++ b/tests/xgettext-6
@@ -0,0 +1,38 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-test6.in.cc"
+cat <<EOF > xg-test6.in.cc
+main(){printf(gettext/*puke*/(/*barf*/"Hello, " "World!" "\n")); }
+EOF
+
+tmpfiles="$tmpfiles xg-test6.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --add-comments xg-test6.in.cc -d xg-test6
+
+tmpfiles="$tmpfiles xg-test6.ok"
+cat <<EOF > xg-test6.ok
+#. puke
+#. barf
+msgid "Hello, World!\n"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test6.ok xg-test6.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/xgettext-7 b/tests/xgettext-7
new file mode 100755
index 0000000..b456f64
--- /dev/null
+++ b/tests/xgettext-7
@@ -0,0 +1,58 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-test7.in.C"
+cat <<EOF > xg-test7.in.C
+/* This comment will not be extracted. */
+gettext ("help");
+
+/* XXX: But this one will. */
+gettext_noop ("me");
+
+//XXX: ..and this
+dcgettext ("foo", "quick", LC_MESSAGES);
+
+ /* not not not */
+dgettext ("bar", "!");
+EOF
+
+tmpfiles="$tmpfiles xg-test7.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --add-comments=XXX xg-test7.in.C \
+ -d xg-test7
+
+tmpfiles="$tmpfiles xg-test7.ok"
+cat <<EOF > xg-test7.ok
+msgid "help"
+msgstr ""
+
+#. XXX: But this one will.
+msgid "me"
+msgstr ""
+
+#. XXX: ..and this
+msgid "quick"
+msgstr ""
+
+msgid "!"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test7.ok xg-test7.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/xgettext-8 b/tests/xgettext-8
new file mode 100755
index 0000000..eb4f4f2
--- /dev/null
+++ b/tests/xgettext-8
@@ -0,0 +1,91 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-test8.in.po xg-test8.c xg-test8.cc"
+cat <<EOF > xg-test8.in.po
+#: file1.c:199
+#, fuzzy
+msgid "extract me"
+msgstr "some text to get fuzzy copied to result"
+
+#: file2.cc:200
+msgid "what about me"
+msgstr ""
+
+#: file3.c:10
+#, c-format, fuzzy
+msgid "hello"
+msgstr "Again some text for fuzzy"
+EOF
+
+cat <<EOF > xg-test8.c
+#include <libintl.h>
+#include <stdio.h>
+int
+main (int argc, char *argv[])
+{
+ printf (dcgettext ("hello", "Hello, world."));
+ return 0;
+}
+EOF
+
+cat <<EOF > xg-test8.cc
+#include <iostream.h>
+#include <libintl.h>
+#include <locale.h>
+int
+main (int argc, char *argv[])
+{
+ cout << dcgettext ("hello", "Hello world!", LC_MESSAGES) << endl;
+ return 0;
+}
+EOF
+
+tmpfiles="$tmpfiles xg-test8.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header -n xg-test8.in.po \
+ xg-test8.c xg-test8.cc -d xg-test8
+
+tmpfiles="$tmpfiles xg-test8.ok"
+cat <<EOF > xg-test8.ok
+#: file1.c:199
+#, fuzzy
+msgid "extract me"
+msgstr "some text to get fuzzy copied to result"
+
+#: file2.cc:200
+msgid "what about me"
+msgstr ""
+
+#: file3.c:10
+#, fuzzy, c-format
+msgid "hello"
+msgstr "Again some text for fuzzy"
+
+#: xg-test8.c:6
+msgid "Hello, world."
+msgstr ""
+
+#: xg-test8.cc:7
+msgid "Hello world!"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test8.ok xg-test8.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End:
diff --git a/tests/xgettext-9 b/tests/xgettext-9
new file mode 100755
index 0000000..c1d17dc
--- /dev/null
+++ b/tests/xgettext-9
@@ -0,0 +1,97 @@
+#! /bin/sh
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-test9.c"
+cat <<EOF > xg-test9.c
+int
+main()
+{
+ /* This is a comment which immediately before a keyword. */
+ gettext ("1");
+
+ // This
+ // one
+ // too
+ // although many blank lines come before the token itself.
+
+
+
+
+ gettext("2");
+
+ /* this one also counts */ gettext ("3");
+
+ gettext("4");
+
+ /* this one is also copied */ nada
+ gettext ("5");
+
+ /* I hope you do not see the following */
+ break;
+ gettext("6");
+
+ /* An unnice
+ multi-line comment */ evil;
+ gettext("7");
+}
+EOF
+
+tmpfiles="$tmpfiles xg-test9.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header -c --c++ -d xg-test9 xg-test9.c
+
+tmpfiles="$tmpfiles xg-test9.ok"
+cat <<EOF > xg-test9.ok
+#. This is a comment which immediately before a keyword.
+msgid "1"
+msgstr ""
+
+#. This
+#. one
+#. too
+#. although many blank lines come before the token itself.
+msgid "2"
+msgstr ""
+
+#. this one also counts
+msgid "3"
+msgstr ""
+
+msgid "4"
+msgstr ""
+
+#. this one is also copied
+msgid "5"
+msgstr ""
+
+msgid "6"
+msgstr ""
+
+#. An unnice
+#. multi-line comment
+msgid "7"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test9.ok xg-test9.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
+
+Local Variables:
+ nuke-trailing-whitespace-p:nil
+End:
+
+# Preserve executable bits for this shell script.
+# Thanks to Noah Friedman for this great trick.
+Local Variables:
+eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
+eval:(make-local-variable 'file-mode)
+eval:(setq file-mode (file-modes (buffer-file-name)))
+eval:(make-local-variable 'after-save-hook)
+eval:(add-hook 'after-save-hook 'frobme)
+End: